[ovs-dev] [PATCH] Add ifindex column to Interface table
Ben Pfaff
blp at nicira.com
Mon Jul 8 20:41:01 UTC 2013
On Thu, Jun 13, 2013 at 02:52:58PM -0700, Ben Pfaff wrote:
> 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>
>
> Thanks!
>
> 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).
I fixed the test failure, made the last change above myself, and
pushed this to master. Thank you for the contribution!
More information about the dev
mailing list