[OVSDB-239] 'ifindex' column from Interface table on OVS Created: 16/Dec/15  Updated: 30/Jun/16  Resolved: 30/Jun/16

Status: Resolved
Project: ovsdb
Component/s: Plugin
Affects Version/s: unspecified
Fix Version/s: None

Type: Improvement
Reporter: Konstantin Blagov Assignee: Rashmi Pujar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All



 Description   

On Groupbasedpolicy, we have some demo setups involving OVS switches running Docker containers locally.
On the switch, Interface table contains column "ifindex", its value visible with
ovs-vsctl list Interface:

sudo ovs-vsctl --columns _uuid,name,ifindex,ofport list Interface
_uuid : 2314250c-8cd5-48a6-95a8-b2549103b434
name : "vethl-h35_2"
ifindex : 17
ofport : 3
...

But this key-value pair is not present in the Datastore:

http://localhost:8181/restconf/operational/network-topology:network-topology/topology/ovsdb:1/

...
"termination-point": [

{ "tp-id": "vethl-h35_2", "ovsdb:name": "vethl-h35_2", "ovsdb:interface-uuid": "2314250c-8cd5-48a6-95a8-b2549103b434", "ovsdb:port-uuid": "c4532a19-7357-42c5-9150-5daf50e8ba4e", "ovsdb:ofport": 3 }

,
...

I think it was not requested by anyone before, but now we are collecting flow statistics with sFlow, which uses ifIndex for our endpoins, so having this in the DS along with other data will help us to map "ifindex" to "ofport" and not to invent workarounds.



 Comments   
Comment by Rashmi Pujar [ 10/Jun/16 ]

Hi Konstantin,

I am working on supporting this column in ovsdb. Do you if it is a read-only column. When I add a brdige using: ovs-vsctl add-br br1. The internal port gets assigned an ifIndex value.
When I create another port to the bridge using: ovs-vsctl add-port br1 test1 – set Interface test1 type=internal ifindex=26
The ifindex I specify is ignored and it gets set to a value that equals (internal port ifindex ++). This makes me believe the column is read-only however, I did not find it specified in the schema specs. Since you have a better context about how you plan to use the ifindex parameter could you please add any inputs you may have?

Anil: is there a way to know if a column is read-only?

Comment by Anil Vishnoi [ 10/Jun/16 ]

Hi Rashmi,

Yes, this column looks like read only (generated by OS). I tried to edit the value using ovs-vsctl, but i was not able to change the value.

Comment by Konstantin Blagov [ 20/Jun/16 ]

(In reply to Rashmi Pujar from comment #1)

Hi Rashmi,
For us, it is OK that the column is read-only, the issue is that column's value is missing from ODL datastore.

Comment by Rashmi Pujar [ 20/Jun/16 ]

Thank you Anil for confirming.
The patch is ready for review: https://git.opendaylight.org/gerrit/#/c/39801

Hi Konstantin, thanks for your reply. The support is underway and will soon be available.

Comment by Rashmi Pujar [ 30/Jun/16 ]

Addressed in patches:
https://git.opendaylight.org/gerrit/#/c/39801/
https://git.opendaylight.org/gerrit/#/c/40982

Generated at Wed Feb 07 20:35:52 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.