Network Namespace ARP support
dlezcano at fr.ibm.com
Thu Sep 4 07:50:10 PDT 2008
Eelco Chaudron wrote:
> Hi All,
> I was looking at the network namespaces implementation for ARP, and I
> was wondering why the struct net abstraction was done in the core
> neighbour functions, and not at the struct neigh_table arp_tbl level
> (i.e. one arp_tbl per namespace)?
> One problem I could find with the current implementation is that the
> "struct neigh_statistics *stats" are global for all namespaces,
> whereas you might want to see these statistics per namespace.
> It would be nice if I could get some insight in some of the design
> decisions, as I'm new to this area...
In order to not waste memory duplicating redundant information with the
tables, the neighbour per namespace has be made in the core neighbour
functions which is the common code between the different protocols ipv4
As you mention, the statistics are in the table and because there is a
single table there is a no statistics per namespace. Making this
resource per namespace will consist in moving the stats structure to the
network namespace structure, I guess, and not creating multiple neigh
This decision has been made for the socket hash tables and for the
routing cache table too, AFAIR this is for avoiding memory fragmentation
and cache misses.
More information about the Containers