mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
1cc523271e
commit
808f5114a9
3 changed files with 43 additions and 33 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue