[Devel] Re: Network Namespace ARP support

Daniel Lezcano 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...
> 
> Thanks,
> 

Hi Eelco,

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 
and ipv6.

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 
tables.

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.

   -- Daniel
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list