]> err.no Git - linux-2.6/commitdiff
[NET]: Move sk_setup_caps() out of line.
authorAndi Kleen <ak@suse.de>
Sat, 21 Apr 2007 00:12:43 +0000 (17:12 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:29:26 +0000 (22:29 -0700)
It is far too large to be an inline and not in any hot paths.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h
net/core/sock.c

index 390c0470059032019e13195ab46f54586bbccccf..25c37e34bfdce0cd854debc57d34ed2fdfaa1b59 100644 (file)
@@ -1075,19 +1075,7 @@ static inline int sk_can_gso(const struct sock *sk)
        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 73a8018029a82e96726110f0f2c5632c78e9fcc0..043bdc05d2116acbee230e61a5aa7824aa34cffb 100644 (file)
@@ -979,6 +979,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) {