[NET]: Generalise TSO-specific bits from skb_setup_caps
This patch generalises the TSO-specific bits from sk_setup_caps by adding the sk_gso_type member to struct sock. This makes sk_setup_caps generic so that it can be used by TCPv6 or UFO. The only catch is that whoever uses this must provide a GSO implementation for their protocol which I think is a fair deal :) For now UFO continues to live without a GSO implementation which is OK since it doesn't use the sock caps field at the moment. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
adcfc7d0b4
commit
bcd7611117
@@ -751,7 +751,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
|
||||
if (in_flight >= tp->snd_cwnd)
|
||||
return 1;
|
||||
|
||||
if (!(sk->sk_route_caps & NETIF_F_TSO))
|
||||
if (!sk_can_gso(sk))
|
||||
return 0;
|
||||
|
||||
left = tp->snd_cwnd - in_flight;
|
||||
|
Reference in New Issue
Block a user