From c7286343586b84dfabed7f4cf26303213386573e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 11 May 2003 23:17:18 -0700 Subject: [NET]: Network packet type using RCU. * packet type converted from linked list to list_macro * writer lock replaced with spin lock, readers use RCU * add __dev_remove_pack for callers that cant sleep. * af_packet changes to handle and sleeping requirements, and possible races that could cause. --- include/linux/netdevice.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 080084cc3afc..9ebb267411df 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -456,7 +456,7 @@ struct packet_type int (*func) (struct sk_buff *, struct net_device *, struct packet_type *); void *data; /* Private to the packet type */ - struct packet_type *next; + struct list_head list; }; @@ -472,6 +472,7 @@ extern int netdev_boot_setup_check(struct net_device *dev); extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr); extern void dev_add_pack(struct packet_type *pt); extern void dev_remove_pack(struct packet_type *pt); +extern void __dev_remove_pack(struct packet_type *pt); extern int dev_get(const char *name); extern struct net_device *dev_get_by_flags(unsigned short flags, unsigned short mask); -- cgit v1.2.3