Skip to contentSkip to conversation

(1/5) Brlock removal - core

PATCH New Stephen Hemminger 1 participant 1 message Mar 13, 2003

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 (1/5) Brlock removal - core

This patch removes brlock from network receive core. Packet type is changed to an RCU list.

The netfilter code also uses RCU list. Had to recode/remove the nf_iterate procedure to use list_for_each macro which was preferable to propagating the RCU special stuff into this code.

Also added barrier() to avoid possible compiler optimization when a reference to a hook could change between when it is tested and used.

include/linux/netdevice.h +1 -1
diff -urN -X dontdiff linux-2.5.64/include/linux/netdevice.h linux-2.5-nobrlock/include/linux/netdevice.h
@@ -452,7 +452,7 @@
 	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	packet_list;
 };
 
 
net/core/dev.c +68 -49

264 lines not on this page · raw message

net/core/netfilter.c +90 -100

314 lines not on this page · raw message