* [PATCH] Move sk_setup_caps out of line
@ 2007-04-05 10:46 Andi Kleen
2007-04-21 0:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2007-04-05 10:46 UTC (permalink / raw)
To: davem; +Cc: netdev
It is far too large to be an inline and not in any hot paths.
Signed-off-by: Andi Kleen <ak@suse.de>
Index: linux-2.6.21-rc1-net/include/net/sock.h
===================================================================
--- linux-2.6.21-rc1-net.orig/include/net/sock.h
+++ linux-2.6.21-rc1-net/include/net/sock.h
@@ -1083,19 +1083,7 @@ static inline int sk_can_gso(const struc
return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type);
}
-static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
-{
- __sk_dst_set(sk, dst);
- sk->sk_route_caps = dst->dev->features;
- if (sk->sk_route_caps & NETIF_F_GSO)
- sk->sk_route_caps |= NETIF_F_GSO_MASK;
- if (sk_can_gso(sk)) {
- if (dst->header_len)
- sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
- else
- sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
- }
-}
+extern void sk_setup_caps(struct sock *sk, struct dst_entry *dst);
static inline void sk_charge_skb(struct sock *sk, struct sk_buff *skb)
{
Index: linux-2.6.21-rc1-net/net/core/sock.c
===================================================================
--- linux-2.6.21-rc1-net.orig/net/core/sock.c
+++ linux-2.6.21-rc1-net/net/core/sock.c
@@ -970,6 +970,21 @@ out:
EXPORT_SYMBOL_GPL(sk_clone);
+void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
+{
+ __sk_dst_set(sk, dst);
+ sk->sk_route_caps = dst->dev->features;
+ if (sk->sk_route_caps & NETIF_F_GSO)
+ sk->sk_route_caps |= NETIF_F_GSO_MASK;
+ if (sk_can_gso(sk)) {
+ if (dst->header_len)
+ sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
+ else
+ sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
+ }
+}
+EXPORT_SYMBOL_GPL(sk_setup_caps);
+
void __init sk_init(void)
{
if (num_physpages <= 4096) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Move sk_setup_caps out of line
2007-04-05 10:46 [PATCH] Move sk_setup_caps out of line Andi Kleen
@ 2007-04-21 0:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-04-21 0:12 UTC (permalink / raw)
To: ak; +Cc: netdev
From: Andi Kleen <ak@suse.de>
Date: Thu, 5 Apr 2007 12:46:21 +0200
> It is far too large to be an inline and not in any hot paths.
>
> Signed-off-by: Andi Kleen <ak@suse.de>
Also applied, thanks Andi.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-21 0:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 10:46 [PATCH] Move sk_setup_caps out of line Andi Kleen
2007-04-21 0:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).