[ovs-discuss] SR-IOV with Open vSwitch

Darrell Ball dball at vmware.com
Thu Mar 30 19:46:12 UTC 2017



From: <ovs-discuss-bounces at openvswitch.org> on behalf of Advith Nagappa <advith.nagappa at gmail.com>
Date: Wednesday, March 29, 2017 at 9:39 PM
To: discuss <discuss at openvswitch.org>
Subject: [ovs-discuss] SR-IOV with Open vSwitch

Hello All,


Has anyone used SR-IOV with Open vSwitch(in a guest)?

My understanding is that SR-IOV is hypervisor(host) by/pass, Hence using OVS at that level would not make sense..

So I tried deploying OVS in an SR-IOV enabled guest, and here is what I observed..

I have one virtual function within my guest, called ens7.

I have added that to by OVS-bridge..



d5f266fc-a6f1-448e-91c5-e6db8748f73f
    Bridge "br0"
        Port "ens7"
            Interface "ens7"
        Port "br0"
            Interface "br0"
                type: internal

I also, added the following rule:

ovs-ofctl add-flow br0  priority=1111,dl_type=0x0800,nw_proto=17,nw_src=10.0.0.1,nw_dst=10.0.0.2,actions=


However every time I send a UDP datagram, I see that this rule is hit!, but the packet is not dropped:

 cookie=0x0, duration=123.175s, table=0, n_packets=14, n_bytes=60, idle_age=2, priority=1111,udp,nw_src=10.0.0.1,nw_dst=10.0.0.2 actions=drop

The thing here is 10.0.0.1 and 10.0.0.2 share a physical function,.. and, despite the rule hit, the datagram is forwarded, I wonder what may be causing this? I am guessing some kind of L2 switching at the NIC level, which overrides OVS? Does anyone have an experience with this..


You are running OVS in the VM(s), not the host.
I assume you are sending packets in one direction only and are constantly hitting an L2 broadcast case in the Linux bridge in the host
(this is also an assumption, since you don’t delineate all your config. and topology).
So, I guess one copy of the packet is bypassing OVS in the VM and another copy is sent to OVS in the VM to be dropped.

Below link has more information and child links from there.

https://github.com/intel/SDN-NFV-Hands-on-Samples/blob/master/SR-IOV_DPDK_Hands-on_Lab/docs/SR-IOV-HandsOn-IEEE.pdf



Best Regards
Advith Nagappa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170330/5395e928/attachment.html>


More information about the discuss mailing list