From: Erik H. <eri...@er...> - 2012-10-18 06:29:11
|
I have started looking in to the details of how to support network namespaces in TIPC. I was thinking as a first approach to identify all global structures, variables and lists unique to a TIPC instance. These should be wrapped in a new struct (tipc_net) that is instantiated for each new netns. A reference to the correct instance can be fetched with a call to: > static inline void *net_generic(const struct net *net, int id) Other than the global parameters (tipc_own_addr, tipc_net_id etc..) we should store the list head pointers for the nametable, tipc_ref_table, bearer_list, media_list, node_htable.. When a packet is received from the network, we fetch a reference to the tipc_net struct and pass this along in packet delivery chain (maybe we can store the pointer directly in the sk_buff->cb field?). It's tempting to start littering the code with 'struct net' references, but i think we should be careful with this. Thoughts, questions and input is very welcome. //E |