[ovs-discuss] ovs-vswitchd bridge datapath_type netdev doesn't work with ovs-ofctl (br0 is not a bridge or a socket)

Daniel Badea daniel.badea at windriver.com
Wed Oct 1 12:55:53 UTC 2014

I'm trying to configure a flow between a DPDK port and a VM virtio port.

Following instructions here:


I created br0 bridge, set dapapath_type to "netdev", added dpdk0 and dpdk1
ports and created a virsh host with the following configuration: 


    <interface type='bridge'>

      <mac address='52:54:00:95:af:b8'/>

      <source bridge='br0'/>

      <virtualport type='openvswitch'>

        <parameters interfaceid='d45aa931-1d3e-4c32-be8c-5091f1cb6134'/>


      <model type='rtl8139'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'



As expected, this creates bridge br0 and ports vnet1, dpdk0 and dpdk1. 

But when trying to configure a flow between vnet and dpdk ports ovs-ofctl
fails with: 

    "br0 is not a bridge or a socket"


A quick investigation reveals the problem appears when br0 bridge
datapath_type is changed to "netdev". Somehow
/usr/local/var/run/openvswitch/br0.mgmt socket is removed and ovs-ofctl
can't find the bridge. ovs-vsctl is probably using another mechanism to list
bridge information because it works when ovs-ofctl doesn't.


Simplified steps to reproduce and corresponding output of ovs-vswitchd
(commands executed as root).


./utilities/ovs-vsctl add-br br0


# ovs-vswitchd output


# 2014-10-01T12:24:55Z|00049|dpif|WARN|system at ovs-system: failed to
put[create] (Invalid argument)

# 2014-10-01T12:24:55Z|00050|ofproto_dpif|INFO|system at ovs-system: Datapath
does not support recirculation

# 2014-10-01T12:24:55Z|00051|dpif|WARN|system at ovs-system: failed to
put[create] (Invalid argument)

#2014-10-01T12:24:55Z|00052|ofproto_dpif|INFO|system at ovs-system: MPLS label
stack length probed as 0

# 2014-10-01T12:24:55Z|00053|dpif|WARN|system at ovs-system: execute
7f:7f:7f:7f)) failed (Invalid argument) on packet

# 2014-10-01T12:24:55Z|00054|ofproto_dpif|INFO|system at ovs-system: datapath
does not support masked set action feature.

# 2014-10-01T12:24:55Z|00001|ofproto_dpif_upcall(handler343)|INFO|received
packet on unassociated datapath port 0

# 2014-10-01T12:24:55Z|00055|bridge|INFO|bridge br0: added interface br0 on
port 65534

# 2014-10-01T12:24:55Z|00056|bridge|INFO|bridge br0: using datapath ID

# 2014-10-01T12:24:55Z|00057|connmgr|INFO|br0: added service controller


./utilities/ovs-ofctl show br0


# OFPT_FEATURES_REPLY (xid=0x2): dpid:0000f2f5632d0d47

# n_tables:254, n_buffers:256


# actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src
mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst

#  LOCAL(br0): addr:f2:f5:63:2d:0d:47

#     config:     PORT_DOWN

#     state:      LINK_DOWN

#     speed: 0 Mbps now, 0 Mbps max

# OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0


ls -1 /usr/local/var/run/openvswitch | grep br0


# br0.mgmt

# br0.snoop


./ utilities/ovs-vsctl set bridge br0 datapath_type=netdev


# ovs-vswitchd output


# 2014-10-01T12:26:11Z|00058|ofproto_dpif|INFO|netdev at ovs-netdev: Datapath
supports recirculation

# 2014-10-01T12:26:11Z|00059|ofproto_dpif|INFO|netdev at ovs-netdev: MPLS label
stack length probed as 3

# 2014-10-01T12:26:11Z|00060|bridge|INFO|bridge br0: added interface br0 on
port 65534

# 2014-10-01T12:26:11Z|00061|netdev_linux|WARN|br0: obtaining netdev stats
via vport failed (No such device)

# 2014-10-01T12:26:11Z|00062|bridge|INFO|bridge br0: using datapath ID

# 2014-10-01T12:26:11Z|00063|connmgr|INFO|br0: added service controller

# 2014-10-01T12:26:15Z|00064|netdev_linux|WARN|br0: obtaining netdev stats
via vport failed (No such device)


./utilities/ovs-ofctl show br0


# ovs-ofctl: br0 is not a bridge or a socket


ls -1 /usr/local/var/run/openvswitch | grep br0


# br0.snoop


./utilities/ovs-vsctl show

# 3a8ba2cd-1749-4c2a-8fd4-c4b7429cea87

#    Bridge "br0"

#        Port "br0"

#            Interface "br0"

#                type: internal


./utilities/ovs-vsctl del-br br0


# ovs-vswitchd output


# 2014-10-01T12:27:04Z|00003|fatal_signal(urcu1)|WARN|could not unlink
"/usr/local/var/run/openvswitch/br0.mgmt" (No such file or directory)


Repositories & versions used:


cd ovs; git log -n1 --pretty=format:%H%d; grep url .git/config; cd ..

# a07e26bf367075d7b31f3f180b65605412b0624b (HEAD, origin/master,
origin/HEAD, master)

# url = https://github.com/openvswitch/ovs.git


cd dpdk; git log -n1 --pretty=format:%H%d; grep url .git/config; cd ..

# 9db7084fcdf6d57b892312ca641a97356629c04a (HEAD, v1.7.0)

# url = git://dpdk.org/dpdk


Is this a configuration issue?





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20141001/12e9c0a7/attachment-0002.html>

More information about the discuss mailing list