Skip to contentSkip to conversation

Network Namespace ARP support

DISCUSSION Eelco Chaudron 2 participants 2 messages Sep 4, 2008 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

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,

Eelco

________________________________
DISCLAIMER:
This e-mail and any attachments to it may contain confidential and proprietary material and is solely for the use of the intended recipient. Any review, use, disclosure, distribution or copying of this transmittal is prohibited except by or on behalf of the intended recipient. If you have received this transmittal in error, please notify the sender and destroy this e-mail and any attachments and all copies, whether electronic or printed.

#2 lore raw
In reply to a message not in the archive
Quoted 7 lines · Eelco Chaudron

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)?

Quoted 9 lines

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