aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/sock.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-04-20 20:12:43 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:29:26 -0400
commit9958089a43ae8a9af07402461c0b2b7548c7341e (patch)
tree6d07cf01f9f6cc647dd6b01d0a16757f025845f8 /net/core/sock.c
parent4ac02bab77438b484a5cf855a002fb6a1d592894 (diff)
[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 <ak@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock.c')
-rw-r--r--net/core/sock.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 73a8018029a8..043bdc05d211 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -979,6 +979,21 @@ out:
979 979
980EXPORT_SYMBOL_GPL(sk_clone); 980EXPORT_SYMBOL_GPL(sk_clone);
981 981
982void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
983{
984 __sk_dst_set(sk, dst);
985 sk->sk_route_caps = dst->dev->features;
986 if (sk->sk_route_caps & NETIF_F_GSO)
987 sk->sk_route_caps |= NETIF_F_GSO_MASK;
988 if (sk_can_gso(sk)) {
989 if (dst->header_len)
990 sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
991 else
992 sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
993 }
994}
995EXPORT_SYMBOL_GPL(sk_setup_caps);
996
982void __init sk_init(void) 997void __init sk_init(void)
983{ 998{
984 if (num_physpages <= 4096) { 999 if (num_physpages <= 4096) {