correlating interface number in sFlow Trend with Openflow port number

28 views
Skip to first unread message

Shivaram Mysore

unread,
Dec 1, 2017, 12:19:01 AM12/1/17
to sFlow
Hello,
In my setup of running OVS 2.8.1 on a Intel x86 with multiple NIC cards, I am seeing Interface numbers such as 17, 843423, etc  How can I co-relate this with the corresponding Openflow port numbers?  I use Openflow 1.3 exclusively.

I am not running SNMP and cannot do so.  Any guidance to corelation would be greatly helpful.

Thanks

/Shivaram

sgjohnston

unread,
Dec 1, 2017, 5:15:12 AM12/1/17
to sFlow
Hi Shivaram,

Unfortunately, the bottom line is that this isn't very easy with sFlowTrend. There is an sFlow extension (sFlow OpenFlow Structures - sFlow.org) which allows the mapping, but this isn't implemented by sFlowTrend yet. There are a number of older discussions on this topic which you might find useful:


regards,
Stuart

Shivaram Mysore

unread,
Dec 1, 2017, 1:32:32 PM12/1/17
to sFlow
Hello Stuart,
Thanks for the response.

I understand the problem better.  I am just thinking out loud - just like we have a command:

# ovs-vsctl -- --columns=name,ofport list Interface

to list ofports and interface name, may be it is easy to add a small piece of code to get ifindex too.  Though manual, we can co-relate better.  The challenge is even if we write a C program to get ifindex to name mapping, I cannot run that as ofports are not visible in Linux name space.

Thanks

/Shivaram

Shivaram Mysore

unread,
Dec 1, 2017, 2:35:02 PM12/1/17
to sFlow
Ok - I figured out a way to get the interface mapping.  On sFlow Trend, locate the interface number and on OVS, run as root the below command to get the corresponding OVS

# ovsdb-client dump | grep 11522715
b300d6ce-7c19-44dd-9ee4-0f250fabd729 up          {}  {}         []        []               []             []         []       []               []                 full   []    {}                                                    11522715 0                      0                     []           0           1000000000000 down       {}   []  "a0:36:9f:d5:64:1b" 1500 []          "ens787f3"        9      9              {dpdk-devargs="0000:81:00.3"} {}           {"rx_128_to_255_packets"=0, "rx_1_to_64_packets"=0, "rx_256_to_511_packets"=0, "rx_512_to_1023_packets"=0, "rx_65_to_127_packets"=0, rx_broadcast_packets=0, rx_bytes=0, rx_dropped=0, rx_errors=0, rx_jabber_errors=0, rx_packets=0, "tx_128_to_255_packets"=0, "tx_1_to_64_packets"=0, "tx_256_to_511_packets"=0, "tx_512_to_1023_packets"=0, "tx_65_to_127_packets"=0, tx_broadcast_packets=0, tx_bytes=0, tx_dropped=2177059, tx_errors=0, tx_multicast_packets=0, tx_packets=0}                                                                    {driver_name="net_e1000_igb", max_hash_mac_addrs="0", max_mac_addrs="32", max_rx_pktlen="1518", max_rx_queues="8", max_tx_queues="8", max_vfs="0", max_vmdq_pools="8", min_rx_bufsize="256", numa_id="1", pci-device_id="0x1521", pci-vendor_id="0x32902", port_no="8"}    dpdk    

# ovsdb-client dump | grep 1297199
0c7cd9f9-8f24-41e6-8782-e908bf6be5ff up          {}  {}         []        []               []             []         []       []               []                 full   []    {}                                                    1297199  0                      0                     []           0           1000000000000 down       {}   []  "b4:96:91:00:88:a7" 1500 []          "ens786f3"        5      5              {dpdk-devargs="0000:05:00.3"} {}           {"rx_128_to_255_packets"=0, "rx_1_to_64_packets"=0, "rx_256_to_511_packets"=0, "rx_512_to_1023_packets"=0, "rx_65_to_127_packets"=0, rx_broadcast_packets=0, rx_bytes=0, rx_dropped=0, rx_errors=0, rx_jabber_errors=0, rx_packets=0, "tx_128_to_255_packets"=0, "tx_1_to_64_packets"=0, "tx_256_to_511_packets"=0, "tx_512_to_1023_packets"=0, "tx_65_to_127_packets"=0, tx_broadcast_packets=0, tx_bytes=0, tx_dropped=2177070, tx_errors=0, tx_multicast_packets=0, tx_packets=0}                                                                    {driver_name="net_e1000_igb", max_hash_mac_addrs="0", max_mac_addrs="32", max_rx_pktlen="1518", max_rx_queues="8", max_tx_queues="8", max_vfs="0", max_vmdq_pools="8", min_rx_bufsize="256", numa_id="0", pci-device_id="0x1521", pci-vendor_id="0x32902", port_no="4"}    dpdk    

FYI - I have ovs-vsctl show partial output as:

        Port "ens787f3"
            Interface "ens787f3"
                type: dpdk
                options: {dpdk-devargs="0000:81:00.3"}

        Port "ens786f3"
            Interface "ens786f3"
                type: dpdk
                options: {dpdk-devargs="0000:05:00.3"}
    ovs_version: "2.8.1"

Shivaram Mysore

unread,
Dec 1, 2017, 2:40:27 PM12/1/17
to sFlow
There is  a much easier way:

# ovs-vsctl -- --columns=name,ofport,ifIndex list Interface

name                : "ens786f3"
ofport              : 5
ifindex             : 1297199

name                : "ens787f3"
ofport              : 9
ifindex             : 11522715
Reply all
Reply to author
Forward
0 new messages