aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 20:43:43 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 20:43:43 -0400
commit74e651f0aa100f3e5d3432a8dd8869c089e8d72f (patch)
tree457e8d6ec4c28f3b1f3f4fcbf45df9b91f9ee9c7 /include/linux/netdevice.h
parent6002e45045a190a112bc3bc2134d0ff4fac7ced7 (diff)
parent0702056f9f41274a06e21cb05f12b4265b4867a2 (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: (30 commits) [TIPC]: Initial activation message now includes TIPC version number [TIPC]: Improve response to requests for node/link information [TIPC]: Fixed skb_under_panic caused by tipc_link_bundle_buf [IrDA]: Fix the AU1000 FIR dependencies [IrDA]: Fix RCU lock pairing on error path [XFRM]: unexport xfrm_state_mtu [NET]: make skb_release_data() static [NETFILTE] ipv4: Fix typo (Bugzilla #6753) [IrDA]: MCS7780 usb_driver struct should be static [BNX2]: Turn off link during shutdown [BNX2]: Use dev_kfree_skb() instead of the _irq version [ATM]: basic sysfs support for ATM devices [ATM]: [suni] change suni_init to __devinit [ATM]: [iphase] should be __devinit not __init [ATM]: [idt77105] should be __devinit not __init [BNX2]: Add NETIF_F_TSO_ECN [NET]: Add ECN support for TSO [AF_UNIX]: Datagram getpeersec [NET]: Fix logical error in skb_gso_ok [PKT_SCHED]: PSCHED_TADD() and PSCHED_TADD2() can result,tv_usec >= 1000000 ...
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 03cd7551a7a1..aa2d3c12c4d8 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -315,6 +315,8 @@ struct net_device
315#define NETIF_F_GSO_SHIFT 16 315#define NETIF_F_GSO_SHIFT 16
316#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) 316#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
317#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT) 317#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT)
318#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)
318 320
319#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) 321#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
320#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) 322#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
@@ -543,7 +545,8 @@ struct packet_type {
543 struct net_device *, 545 struct net_device *,
544 struct packet_type *, 546 struct packet_type *,
545 struct net_device *); 547 struct net_device *);
546 struct sk_buff *(*gso_segment)(struct sk_buff *skb, int sg); 548 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
549 int features);
547 void *af_packet_priv; 550 void *af_packet_priv;
548 struct list_head list; 551 struct list_head list;
549}; 552};
@@ -968,7 +971,7 @@ extern int netdev_max_backlog;
968extern int weight_p; 971extern int weight_p;
969extern int netdev_set_master(struct net_device *dev, struct net_device *master); 972extern int netdev_set_master(struct net_device *dev, struct net_device *master);
970extern int skb_checksum_help(struct sk_buff *skb, int inward); 973extern int skb_checksum_help(struct sk_buff *skb, int inward);
971extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int sg); 974extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features);
972#ifdef CONFIG_BUG 975#ifdef CONFIG_BUG
973extern void netdev_rx_csum_fault(struct net_device *dev); 976extern void netdev_rx_csum_fault(struct net_device *dev);
974#else 977#else
@@ -988,11 +991,16 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
988 991
989extern void linkwatch_run_queue(void); 992extern void linkwatch_run_queue(void);
990 993
994static inline int skb_gso_ok(struct sk_buff *skb, int features)
995{
996 int feature = skb_shinfo(skb)->gso_size ?
997 skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0;
998 return (features & feature) == feature;
999}
1000
991static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) 1001static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
992{ 1002{
993 int feature = skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT; 1003 return !skb_gso_ok(skb, dev->features);
994 return skb_shinfo(skb)->gso_size &&
995 (dev->features & feature) != feature;
996} 1004}
997 1005
998#endif /* __KERNEL__ */ 1006#endif /* __KERNEL__ */