diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-06-22 03:07:29 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-23 02:07:36 -0700 |
commit | 37c3185a02d4b85fbe134bf5204535405dd2c957 (patch) | |
tree | 7712fb706bb446b5b6a8ae25f365b4e135d9a1fb /include/net/sock.h | |
parent | f4c50d990dcf11a296679dc05de3873783236711 (diff) | |
download | kernel_samsung_espresso10-37c3185a02d4b85fbe134bf5204535405dd2c957.zip kernel_samsung_espresso10-37c3185a02d4b85fbe134bf5204535405dd2c957.tar.gz kernel_samsung_espresso10-37c3185a02d4b85fbe134bf5204535405dd2c957.tar.bz2 |
[NET]: Added GSO toggle
This patch adds a generic segmentation offload toggle that can be turned
on/off for each net device. For now it only supports in TCPv4.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index d10dfec..a897f05 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1030,9 +1030,13 @@ 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_TSO; if (sk->sk_route_caps & NETIF_F_TSO) { if (sock_flag(sk, SOCK_NO_LARGESEND) || dst->header_len) sk->sk_route_caps &= ~NETIF_F_TSO; + else + sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; } } |