"NETIF_RX_()" This patch is for helping fully layered network interface mechanism so that not only the send-path, but also the reception path are wrapped with possible intermediate protocol module. This is against 2.3.99-pre7-3 It provides a mechanism. Person *using* it needs at device configuration time to define that: subdev->netif_rx = my_l2_dev_receive_routine; Which also presumes that there is only one receive routine for any given device, and that routine must do demux, update skb->dev to that (new) l2_dev, which then either has a callback upwards, or not. If not, default L3 netif_rx_() gets called. This enables things like bridgeNNN which underneath has device ethNNN, just for an example. It would enable us to remove BRIDGE code from present netif_rx() by moving it into a "bridge device".. (Hmm.. back into bridge-device ?) --- linux/include/linux/netdevice.h~ Wed May 3 14:06:46 2000 +++ linux/include/linux/netdevice.h Wed May 3 14:17:36 2000 @@ -342,6 +342,7 @@ int (*stop)(struct net_device *dev); int (*hard_start_xmit) (struct sk_buff *skb, struct net_device *dev); + int (*netif_rx) (struct sk_buff *skb); int (*hard_header) (struct sk_buff *skb, struct net_device *dev, unsigned short type, @@ -542,7 +543,15 @@ extern void net_call_rx_atomic(void (*fn)(void)); #define HAVE_NETIF_RX 1 -extern void netif_rx(struct sk_buff *skb); +extern void netif_rx_(struct sk_buff *skb); +extern __inline__ void netif_rx(struct sk_buff *skb) +{ + if (skb->dev->netif_rx) + (skb->dev->netif_rx)(skb); + else + netif_rx_(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); --- linux/net/core/dev.c~ Wed May 3 14:06:46 2000 +++ linux/net/core/dev.c Wed May 3 14:19:17 2000 @@ -942,7 +942,7 @@ * protocol layers. */ -void netif_rx(struct sk_buff *skb) +void netif_rx_(struct sk_buff *skb) { int this_cpu = smp_processor_id(); struct softnet_data *queue; --- linux/net/netsyms.c~ Mon Apr 24 23:43:05 2000 +++ linux/net/netsyms.c Wed May 3 19:39:58 2000 @@ -498,7 +498,7 @@ EXPORT_SYMBOL(__kfree_skb); EXPORT_SYMBOL(skb_clone); EXPORT_SYMBOL(skb_copy); -EXPORT_SYMBOL(netif_rx); +EXPORT_SYMBOL(netif_rx_); EXPORT_SYMBOL(dev_add_pack); EXPORT_SYMBOL(dev_remove_pack); EXPORT_SYMBOL(dev_get);