[ovs-dev] [PATCH 2/2] lib: Show tunnel egress interface in ovsdb

Ben Pfaff blp at nicira.com
Tue Jan 4 17:41:47 UTC 2011


On Thu, Dec 30, 2010 at 03:01:18PM -0800, Ethan Jackson wrote:
> This commit parses rtnetlink address notifications from the
> kernel in order to display the egress interface of tunnels in the
> database.
> 
> Bug #4103.

Thanks for writing this up.

I don't see any actual bugs.

netdev_vport_reset_name_else_route() deserves at least a comment.  I'm
not a big fan of the name.  It might make code more readable to have two
trivial wrappers, one named netdev_vport_reset_names(), the other named
netdev_vport_reset_routes().

netdev_vport_get_tnl_iface() wouldn't have to check the vport type at
all if the member function was set to NULL (at build time) for
non-tunnels.  You could do that by making VPORT_FUNCTIONS take an
argument, for example.  (That's what netdev-linux does with
NETDEV_LINUX_CLASS.)

In vswitch.xml, 'remote_ip' should be <code>remote_ip</code>.

A lot of the code added to netdev-vport.c really has little to do with
vports.  Instead, it maintains a copy of the routing table.  I would
consider moving that code into rtnetlink-route.c and exporting (only?) a
high-level interface from that file, e.g. a function that takes an IP
address and returns an interface name.

Thanks,

Ben.




More information about the dev mailing list