[ovs-dev] [PATCH] lib: route-table improvements.

Ben Pfaff blp at nicira.com
Tue Feb 1 01:13:13 UTC 2011


On Sun, Jan 30, 2011 at 07:11:57PM -0800, Ethan Jackson wrote:
> This commit makes several changes to the route_table code used to
> populate tunnel_egress_iface.
> 
> - It removes name_table code from netdev-vport and puts it into
>   route-table.
> 
> - It no longer attempts to build the name_table dynamically by
>   listening to rtnetlink-link notifications.  Instead it dumps the
>   entire table, and uses rtnetlink-link notifications to indicate a
>   re-dump is required.
> 
> - It forces rtnetlink-link notifications to re-dump the routing
>   table.  This fixes an issue where bringing an interface down or
>   removing it all together would not have the expected effect on
>   related tunnel_egress_ifaces.

This change makes it clearer to me now that we have two almost
completely separate name->ifindex caches in the source tree.  One is the
one that you are moving around in this patch.  The other one is in
netdev-linux.c.  I'm not sure it makes sense to have two of them.

That said, I think that this patch improves upon what we have in the
source tree now, so I wouldn't mind if it went in.

I understand why it's better to flush the routing table when anything
changes.  But it looks like it also flushes the name translation table
when anything changes.  Is that necessary?  I am surprised, if so--the
version in netdev-linux.c only flushes its knowledge of one translation
at a time, and I haven't heard of problems there.

I didn't see any problems in the code.




More information about the dev mailing list