]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/netdevice.h
net: replace hooks in __netif_receive_skb V5
[net-next-2.6.git] / include / linux / netdevice.h
index bd6b75317d5f175e2430bf54e499dad1ffda61bf..5156b806924c01565cb7aefc8152fc91460aba5e 100644 (file)
@@ -381,6 +381,8 @@ enum gro_result {
 };
 typedef enum gro_result gro_result_t;
 
+typedef struct sk_buff *rx_handler_func_t(struct sk_buff *skb);
+
 extern void __napi_schedule(struct napi_struct *n);
 
 static inline int napi_disable_pending(struct napi_struct *n)
@@ -957,6 +959,7 @@ struct net_device {
 #endif
 
        struct netdev_queue     rx_queue;
+       rx_handler_func_t       *rx_handler;
 
        struct netdev_queue     *_tx ____cacheline_aligned_in_smp;
 
@@ -1689,6 +1692,10 @@ static inline void napi_free_frags(struct napi_struct *napi)
        napi->skb = NULL;
 }
 
+extern int netdev_rx_handler_register(struct net_device *dev,
+                                     rx_handler_func_t *rx_handler);
+extern void netdev_rx_handler_unregister(struct net_device *dev);
+
 extern void            netif_nit_deliver(struct sk_buff *skb);
 extern int             dev_valid_name(const char *name);
 extern int             dev_ioctl(struct net *net, unsigned int cmd, void __user *);