openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

dpdkvhostuserclient always in LINK_DOWN state and no dataflow #200

Closed abhisheksafui closed 3 years ago

abhisheksafui commented 3 years ago

ovs-vswitchd --version ovs-vswitchd (Open vSwitch) 2.14.90 DPDK 20.11.0

I am trying to connect VM to Ovs dpdk bridge using dpdkvhostclient. vhost ovs dpdk port is always in LINK_DOWN state. I have configured libvirt (libvirtd 6.0.0) VM interface as follows. Please suggest how to solve this issue.

<interface type='vhostuser'>
      <mac address='52:54:00:bd:72:5f'/>
      <source type='unix' path='/tmp/vhost1.sock' mode='server'/>
      <model type='virtio'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </interface>
# ovs-ofctl show br0
OFPT_FEATURES_REPLY (xid=0x2): dpid:00001c1b0d9fc8c6
n_tables:254, n_buffers:0
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
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
 1(dpdk0): addr:1c:1b:0d:9f:c8:c6
     config:     0
     state:      0
     current:    1GB-FD AUTO_NEG
     speed: 1000 Mbps now, 0 Mbps max
 2(vhost1): addr:00:00:00:00:00:00
     config:     0
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max
 LOCAL(br0): addr:1c:1b:0d:9f:c8:c6
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0

# ovs-vsctl show
2f738786-5eb4-4629-824d-2b5838bba738
    Bridge br0
        datapath_type: netdev
        Port br0
            Interface br0
                type: internal
        Port dpdk0
            Interface dpdk0
                type: dpdk
                options: {dpdk-devargs="0000:00:1f.6"}
        Port vhost1
            Interface vhost1
                type: dpdkvhostuserclient
                options: {vhost-server-path="/tmp/vhost1.sock"}
    ovs_version: "2.14.90"
igsilya commented 3 years ago

Hi. The most common misconfiguration is to not configure "shared" memory backend. Please, check that. https://docs.openvswitch.org/en/latest/topics/dpdk/vhost-user/#adding-vhost-user-ports-to-the-guest-libvirt

abhisheksafui commented 3 years ago

Thanks a lot. That solved the issue.