aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-24 08:41:41 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-24 13:07:53 -0400
commit816724e65c72a90a44fbad0ef0b59b186c85fa90 (patch)
tree421fa29aedff988e392f92780637553e275d37a0 /include/linux/netdevice.h
parent70ac4385a13f78bc478f26d317511893741b05bd (diff)
parentd384ea691fe4ea8c2dd5b9b8d9042eb181776f18 (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Conflicts: fs/nfs/inode.c fs/super.c Fix conflicts between patch 'NFS: Split fs/nfs/inode.c' and patch 'VFS: Permit filesystem to override root dentry on mount'
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5e8e2d50429a..bc747e5d7138 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -232,6 +232,7 @@ enum netdev_state_t
232 __LINK_STATE_RX_SCHED, 232 __LINK_STATE_RX_SCHED,
233 __LINK_STATE_LINKWATCH_PENDING, 233 __LINK_STATE_LINKWATCH_PENDING,
234 __LINK_STATE_DORMANT, 234 __LINK_STATE_DORMANT,
235 __LINK_STATE_QDISC_RUNNING,
235}; 236};
236 237
237 238
@@ -307,9 +308,13 @@ struct net_device
307#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */ 308#define NETIF_F_HW_VLAN_RX 256 /* Receive VLAN hw acceleration */
308#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */ 309#define NETIF_F_HW_VLAN_FILTER 512 /* Receive filtering on VLAN */
309#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */ 310#define NETIF_F_VLAN_CHALLENGED 1024 /* Device cannot handle VLAN packets */
310#define NETIF_F_TSO 2048 /* Can offload TCP/IP segmentation */ 311#define NETIF_F_GSO 2048 /* Enable software GSO. */
311#define NETIF_F_LLTX 4096 /* LockLess TX */ 312#define NETIF_F_LLTX 4096 /* LockLess TX */
312#define NETIF_F_UFO 8192 /* Can offload UDP Large Send*/ 313
314 /* Segmentation offload features */
315#define NETIF_F_GSO_SHIFT 16
316#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
317#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT)
313 318
314#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) 319#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
315#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) 320#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
@@ -401,6 +406,9 @@ struct net_device
401 struct list_head qdisc_list; 406 struct list_head qdisc_list;
402 unsigned long tx_queue_len; /* Max frames per queue allowed */ 407 unsigned long tx_queue_len; /* Max frames per queue allowed */
403 408
409 /* Partially transmitted GSO packet. */
410 struct sk_buff *gso_skb;
411
404 /* ingress path synchronizer */ 412 /* ingress path synchronizer */
405 spinlock_t ingress_lock; 413 spinlock_t ingress_lock;
406 struct Qdisc *qdisc_ingress; 414 struct Qdisc *qdisc_ingress;
@@ -535,6 +543,7 @@ struct packet_type {
535 struct net_device *, 543 struct net_device *,
536 struct packet_type *, 544 struct packet_type *,
537 struct net_device *); 545 struct net_device *);
546 struct sk_buff *(*gso_segment)(struct sk_buff *skb, int sg);
538 void *af_packet_priv; 547 void *af_packet_priv;
539 struct list_head list; 548 struct list_head list;
540}; 549};
@@ -685,7 +694,8 @@ extern int dev_change_name(struct net_device *, char *);
685extern int dev_set_mtu(struct net_device *, int); 694extern int dev_set_mtu(struct net_device *, int);
686extern int dev_set_mac_address(struct net_device *, 695extern int dev_set_mac_address(struct net_device *,
687 struct sockaddr *); 696 struct sockaddr *);
688extern void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev); 697extern int dev_hard_start_xmit(struct sk_buff *skb,
698 struct net_device *dev);
689 699
690extern void dev_init(void); 700extern void dev_init(void);
691 701
@@ -959,6 +969,7 @@ extern int netdev_max_backlog;
959extern int weight_p; 969extern int weight_p;
960extern int netdev_set_master(struct net_device *dev, struct net_device *master); 970extern int netdev_set_master(struct net_device *dev, struct net_device *master);
961extern int skb_checksum_help(struct sk_buff *skb, int inward); 971extern int skb_checksum_help(struct sk_buff *skb, int inward);
972extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int sg);
962#ifdef CONFIG_BUG 973#ifdef CONFIG_BUG
963extern void netdev_rx_csum_fault(struct net_device *dev); 974extern void netdev_rx_csum_fault(struct net_device *dev);
964#else 975#else
@@ -978,6 +989,13 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
978 989
979extern void linkwatch_run_queue(void); 990extern void linkwatch_run_queue(void);
980 991
992static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
993{
994 int feature = skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT;
995 return skb_shinfo(skb)->gso_size &&
996 (dev->features & feature) != feature;
997}
998
981#endif /* __KERNEL__ */ 999#endif /* __KERNEL__ */
982 1000
983#endif /* _LINUX_DEV_H */ 1001#endif /* _LINUX_DEV_H */