packet: convert socket list to RCU (v3)

Convert AF_PACKET to use RCU, eliminating one more reader/writer lock.

There is no need for a real sk_del_node_init_rcu(), because sk_del_node_init
is doing the equivalent thing to hlst_del_init_rcu already; but added
some comments to try and make that obvious.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
stephen hemminger 2010-02-22 07:57:18 +00:00 committed by David S. Miller
parent 1cc523271e
commit 808f5114a9
3 changed files with 43 additions and 33 deletions

View file

@ -4,11 +4,11 @@
#ifndef __NETNS_PACKET_H__
#define __NETNS_PACKET_H__
#include <linux/list.h>
#include <linux/rculist.h>
#include <linux/spinlock.h>
struct netns_packet {
rwlock_t sklist_lock;
spinlock_t sklist_lock;
struct hlist_head sklist;
};