patch-2.4.0-test10 linux/include/linux/netdevice.h

Next file: linux/include/linux/netlink.h
Previous file: linux/include/linux/module.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test9/linux/include/linux/netdevice.h linux/include/linux/netdevice.h
@@ -39,6 +39,8 @@
 #include <net/profile.h>
 #endif
 
+struct divert_blk;
+
 #define NET_XMIT_SUCCESS	0
 #define NET_XMIT_DROP		1	/* skb dropped			*/
 #define NET_XMIT_CN		2	/* congestion notification	*/
@@ -47,6 +49,14 @@
 					   (TC use only - dev_queue_xmit
 					   returns this as NET_XMIT_SUCCESS) */
 
+/* Backlog congestion levels */
+#define NET_RX_SUCCESS		0   /* keep 'em coming, baby */
+#define NET_RX_CN_LOW		1   /* storm alert, just in case */
+#define NET_RX_CN_MOD		2   /* Storm on its way! */
+#define NET_RX_CN_HIGH		5   /* The storm is here */
+#define NET_RX_DROP		-1  /* packet dropped */
+#define NET_RX_BAD		-2  /* packet dropped due to kernel error */
+
 #define net_xmit_errno(e)	((e) != NET_XMIT_CN ? -ENOBUFS : 0)
 
 #endif
@@ -382,6 +392,10 @@
 	rwlock_t		fastpath_lock;
 	struct dst_entry	*fastpath[NETDEV_FASTROUTE_HMASK+1];
 #endif
+#ifdef CONFIG_NET_DIVERT
+	/* this will get initialized at each interface type init routine */
+	struct divert_blk	*divert;
+#endif /* CONFIG_NET_DIVERT */
 };
 
 
@@ -440,6 +454,8 @@
 struct softnet_data
 {
 	int			throttle;
+	int			cng_level;
+	int			avg_blog;
 	struct sk_buff_head	input_pkt_queue;
 	struct net_device	*output_queue;
 	struct sk_buff		*completion_queue;
@@ -526,7 +542,7 @@
 
 extern void		net_call_rx_atomic(void (*fn)(void));
 #define HAVE_NETIF_RX 1
-extern void		netif_rx(struct sk_buff *skb);
+extern int		netif_rx(struct sk_buff *skb);
 extern int		dev_ioctl(unsigned int cmd, void *);
 extern int		dev_change_flags(struct net_device *, unsigned);
 extern void		dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
@@ -628,6 +644,7 @@
 extern void		netdev_unregister_fc(int bit);
 extern int		netdev_max_backlog;
 extern unsigned long	netdev_fc_xoff;
+extern atomic_t netdev_dropping;
 extern int		netdev_set_master(struct net_device *dev, struct net_device *master);
 #ifdef CONFIG_NET_FASTROUTE
 extern int		netdev_fastroute;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)