mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
[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:
parent
adcfc7d0b4
commit
bcd7611117
6 changed files with 26 additions and 14 deletions
|
@ -242,6 +242,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
|
|||
goto failure;
|
||||
|
||||
/* OK, now commit destination to socket. */
|
||||
sk->sk_gso_type = SKB_GSO_TCPV4;
|
||||
sk_setup_caps(sk, &rt->u.dst);
|
||||
|
||||
if (!tp->write_seq)
|
||||
|
@ -884,6 +885,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
|
|||
if (!newsk)
|
||||
goto exit;
|
||||
|
||||
newsk->sk_gso_type = SKB_GSO_TCPV4;
|
||||
sk_setup_caps(newsk, dst);
|
||||
|
||||
newtp = tcp_sk(newsk);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue