[ovs-dev] [PATCH] Add ifindex column to Interface table

Ben Pfaff blp at nicira.com
Thu Jun 13 21:52:58 UTC 2013

On Thu, Jun 13, 2013 at 02:42:52PM -0700, Neil Mckee wrote:
> This proposed patch adds an "ifindex" column to the "Interface" table in the db.  So that
> "ovs-vsctl list Interface" can show the ifindex numbers for those interfaces that have
> them (and 0 for the rest).
> For example:
> % ovs-vsctl --format json --columns name,ofport,ifindex list Interface
> {"data":[["br2",65534,10],["eth0",1,2],["br1",65534,9],["vm",2,11],["gre0",1,0]],"headings":["name","ofport","ifindex"]}
> Signed-off-by: Neil McKee <neil.mckee at inmon.com>


Will you document this in vswitchd/vswitch.xml and mention it in NEWS?

I think that the type should be more like this:
       "ifindex": {
         "type": {"key": "integer", "min": 0, "max": 1},
         "ephemeral": true},
so that, until ovs-vswitchd updates the column, the database does not
have any value at all for ifindex.  Then software that reads the
database can distinguish between "this interface has no ifindex" (0)
and "the ifindex isn't available yet" (empty).



More information about the dev mailing list