diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-30 18:40:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-30 18:40:17 -0400 |
commit | e37a72de84d27ee8bc0e7dbb5c2f1774ed306dbb (patch) | |
tree | f9da35cbd79b52a5bd08d4a0f960bde6af741da0 /include/linux | |
parent | 93fdf10d4c28edaa1b9f80e7f9c3002359186d00 (diff) | |
parent | f83ef8c0b58dac17211a4c0b6df0e2b1bd6637b1 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[IPV6]: Added GSO support for TCPv6
[NET]: Generalise TSO-specific bits from skb_setup_caps
[IPV6]: Added GSO support for TCPv6
[IPV6]: Remove redundant length check on input
[NETFILTER]: SCTP conntrack: fix crash triggered by packet without chunks
[TG3]: Update version and reldate
[TG3]: Add TSO workaround using GSO
[TG3]: Turn on hw fix for ASF problems
[TG3]: Add rx BD workaround
[TG3]: Add tg3_netif_stop() in vlan functions
[TCP]: Reset gso_segs if packet is dodgy
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 17 | ||||
-rw-r--r-- | include/linux/skbuff.h | 6 |
2 files changed, 16 insertions, 7 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index aa2d3c12c4d8..85f99f60deea 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -313,10 +313,12 @@ struct net_device | |||
313 | 313 | ||
314 | /* Segmentation offload features */ | 314 | /* Segmentation offload features */ |
315 | #define NETIF_F_GSO_SHIFT 16 | 315 | #define NETIF_F_GSO_SHIFT 16 |
316 | #define NETIF_F_GSO_MASK 0xffff0000 | ||
316 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) | 317 | #define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) |
317 | #define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT) | 318 | #define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT) |
318 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) | 319 | #define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) |
319 | #define NETIF_F_TSO_ECN (SKB_GSO_TCPV4_ECN << NETIF_F_GSO_SHIFT) | 320 | #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) |
321 | #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) | ||
320 | 322 | ||
321 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) | 323 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) |
322 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) | 324 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) |
@@ -991,13 +993,18 @@ extern void dev_seq_stop(struct seq_file *seq, void *v); | |||
991 | 993 | ||
992 | extern void linkwatch_run_queue(void); | 994 | extern void linkwatch_run_queue(void); |
993 | 995 | ||
994 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 996 | static inline int net_gso_ok(int features, int gso_type) |
995 | { | 997 | { |
996 | int feature = skb_shinfo(skb)->gso_size ? | 998 | int feature = gso_type << NETIF_F_GSO_SHIFT; |
997 | skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0; | ||
998 | return (features & feature) == feature; | 999 | return (features & feature) == feature; |
999 | } | 1000 | } |
1000 | 1001 | ||
1002 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | ||
1003 | { | ||
1004 | return net_gso_ok(features, skb_shinfo(skb)->gso_size ? | ||
1005 | skb_shinfo(skb)->gso_type : 0); | ||
1006 | } | ||
1007 | |||
1001 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) | 1008 | static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) |
1002 | { | 1009 | { |
1003 | return !skb_gso_ok(skb, dev->features); | 1010 | return !skb_gso_ok(skb, dev->features); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 59918be91d0a..57d7d4965f9a 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -171,13 +171,15 @@ enum { | |||
171 | 171 | ||
172 | enum { | 172 | enum { |
173 | SKB_GSO_TCPV4 = 1 << 0, | 173 | SKB_GSO_TCPV4 = 1 << 0, |
174 | SKB_GSO_UDPV4 = 1 << 1, | 174 | SKB_GSO_UDP = 1 << 1, |
175 | 175 | ||
176 | /* This indicates the skb is from an untrusted source. */ | 176 | /* This indicates the skb is from an untrusted source. */ |
177 | SKB_GSO_DODGY = 1 << 2, | 177 | SKB_GSO_DODGY = 1 << 2, |
178 | 178 | ||
179 | /* This indicates the tcp segment has CWR set. */ | 179 | /* This indicates the tcp segment has CWR set. */ |
180 | SKB_GSO_TCPV4_ECN = 1 << 3, | 180 | SKB_GSO_TCP_ECN = 1 << 3, |
181 | |||
182 | SKB_GSO_TCPV6 = 1 << 4, | ||
181 | }; | 183 | }; |
182 | 184 | ||
183 | /** | 185 | /** |