diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-06-30 16:36:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-30 17:12:08 -0400 |
commit | bcd76111178ebccedd46a9b3eaff65c78e5a70af (patch) | |
tree | b0f059f3cb19d425d30cf42b2088aca4cae12a0a /net/ipv4/tcp_ipv4.c | |
parent | adcfc7d0b4d7bc3c7edac6fdde9f3ae510bd6054 (diff) |
[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>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 4c6ef47eb1c3..38e001076a5f 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -242,6 +242,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) | |||
242 | goto failure; | 242 | goto failure; |
243 | 243 | ||
244 | /* OK, now commit destination to socket. */ | 244 | /* OK, now commit destination to socket. */ |
245 | sk->sk_gso_type = SKB_GSO_TCPV4; | ||
245 | sk_setup_caps(sk, &rt->u.dst); | 246 | sk_setup_caps(sk, &rt->u.dst); |
246 | 247 | ||
247 | if (!tp->write_seq) | 248 | if (!tp->write_seq) |
@@ -884,6 +885,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
884 | if (!newsk) | 885 | if (!newsk) |
885 | goto exit; | 886 | goto exit; |
886 | 887 | ||
888 | newsk->sk_gso_type = SKB_GSO_TCPV4; | ||
887 | sk_setup_caps(newsk, dst); | 889 | sk_setup_caps(newsk, dst); |
888 | 890 | ||
889 | newtp = tcp_sk(newsk); | 891 | newtp = tcp_sk(newsk); |