Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9958089a43ae8a9af07402461c0b2b7548c7341e
Commit:     9958089a43ae8a9af07402461c0b2b7548c7341e
Parent:     4ac02bab77438b484a5cf855a002fb6a1d592894
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Fri Apr 20 17:12:43 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:29:26 2007 -0700

    [NET]: Move sk_setup_caps() out of line.
    
    It is far too large to be an inline and not in any hot paths.
    
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/net/sock.h |   14 +-------------
 net/core/sock.c    |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index 390c047..25c37e3 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -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)
 {
diff --git a/net/core/sock.c b/net/core/sock.c
index 73a8018..043bdc0 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -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) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to