mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 06:21:31 +00:00
tipc: make bearer list support net namespace
Bearer list defined as a global variable is used to store bearer instances. When tipc supports net namespace, bearers created in one namespace must be isolated with others allocated in other namespaces, which requires us that the bearer list(bearer_list) must be moved to tipc_net structure. As a result, a net namespace pointer has to be passed to functions which access the bearer list. Signed-off-by: Ying Xue <ying.xue@windriver.com> Tested-by: Tero Aho <Tero.Aho@coriant.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f2f9800d49
commit
7f9f95d9d9
10 changed files with 110 additions and 73 deletions
|
@ -60,6 +60,7 @@
|
|||
#include <net/netns/generic.h>
|
||||
|
||||
#include "node.h"
|
||||
#include "bearer.h"
|
||||
|
||||
#define TIPC_MOD_VER "2.0.0"
|
||||
|
||||
|
@ -87,6 +88,9 @@ struct tipc_net {
|
|||
struct list_head node_list;
|
||||
u32 num_nodes;
|
||||
u32 num_links;
|
||||
|
||||
/* Bearer list */
|
||||
struct tipc_bearer __rcu *bearer_list[MAX_BEARERS + 1];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue