[ovs-discuss] Facing Issue with OVS-dpdk app vhostuserclient connection
Rajesh Kumar
rajesh.kumar at certesnetworks.com
Tue Dec 24 12:05:10 UTC 2019
Hi All,
I need a help/clarification regarding the following issue and wanted to know if I am missing something.
I am trying to run my sample dpdk application along with OVS (both as pods in kubernetes environment), I'm using a vhostuserclient port connection between OVS and my sample application.
I have added the vhostuserclient port in OVS.
I am hitting this issue when my sample application tries to initialize the virtio port.
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
virtio_user_server_reconnect(): virtio_user_server_reconnect:36
virtio_user_server_reconnect(): virtio_user_server_reconnect:37
virtio_user_server_reconnect(): virtio_user_server_reconnect:41 accept error = Resource temporarily unavailable
virtio_user_server_reconnect(): virtio_user_server_reconnect:36
virtio_user_server_reconnect(): virtio_user_server_reconnect:37
virtio_user_server_reconnect(): virtio_user_server_reconnect:41 accept error = Resource temporarily unavailable
Port 0 MAC: d6 e1 94 21 52 ad
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
It seems like the socket accept() call in virtio driver is failing just before the connect from OVS is received.
I added few logs to check that.
My sample application comes up eventually, but OVS-pdump port connection is not established.
I'm using this parameter to specify the vhost-user port path as EAL argument in my sample app
"virtio_user2,path=/var/lib/cni/vhostuser/vhost-user2,server=1"
OVS says the vhost-user port is still disconnected.
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
root at cep2:/# ovs-vsctl list interface vhost-user2
_uuid : a0ea7eaf-1bfe-4755-9e6c-efe204a1f668
admin_state : up
bfd : {}
bfd_status : {}
cfm_fault : []
cfm_fault_status : []
cfm_flap_count : []
cfm_health : []
cfm_mpid : []
cfm_remote_mpids : []
cfm_remote_opstate : []
duplex : []
error : []
external_ids : {vm-id=certes-ovs-dpdk-init}
ifindex : 16005050
ingress_policing_burst: 0
ingress_policing_rate: 0
lacp_current : []
link_resets : 0
link_speed : []
link_state : down
lldp : {}
mac : []
mac_in_use : "00:00:00:00:00:00"
mtu : 1500
mtu_request : []
name : "vhost-user2"
ofport : 4
ofport_request : []
options : {vhost-server-path="/var/run/openvswitch/vhostuser/vhost-user2"}
other_config : {}
statistics : {"rx_1024_to_1522_packets"=0, "rx_128_to_255_packets"=0, "rx_1523_to_max_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_bytes=0, rx_dropped=0, rx_errors=0, rx_packets=0, tx_bytes=0, tx_dropped=0, tx_packets=0}
status : {mode=client, status=disconnected}
type : dpdkvhostuserclient
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
and the vswitchd log says this
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
2019-12-23T15:39:35.034Z|00053|dpdk|INFO|VHOST_CONFIG: /var/run/openvswitch/vhostuser/vhost-user2: connected
2019-12-23T15:39:35.034Z|00054|dpdk|INFO|VHOST_CONFIG: new device, handle is 0
2019-12-23T15:39:41.421Z|00342|dpdk|ERR|VHOST_CONFIG: recvmsg failed
2019-12-23T15:39:41.421Z|00343|dpdk|ERR|VHOST_CONFIG: vhost read message failed
2019-12-23T15:39:41.421Z|00344|dpdk|INFO|VHOST_CONFIG: vhost-user client: socket created, fd: 122
2019-12-23T15:39:41.421Z|00345|dpdk|WARN|VHOST_CONFIG: failed to connect to /var/run/openvswitch/vhostuser/vhost-user2: Connection refused
2019-12-23T15:39:41.421Z|00346|dpdk|INFO|VHOST_CONFIG: /var/run/openvswitch/vhostuser/vhost-user2: reconnecting...
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
As a workaround, I added a sleep(1) before the accept call and then the vhostuserclient connection got established. Confirmed with ovs-vsctl command and I was able to pass traffic from OVS to sample app.
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
virtio_user_server_reconnect(): virtio_user_server_reconnect:53
virtio_user_server_reconnect(): virtio_user_server_reconnect:58
virtio_user_server_reconnect(): virtio_user_server_reconnect:70
virtio_user_server_reconnect(): virtio_user_server_reconnect:75
virtio_user_server_reconnect(): virtio_user_server_reconnect:80
virtio_user_server_reconnect(): virtio_user_server_reconnect:84
virtio_user_server_reconnect(): virtio_user_server_reconnect:90
virtio_user_server_reconnect(): server mode virtio-user reconnection succeeds!
I Port 0 MAC: 92 2c 2b 5b 95 ba
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
Please let me know if I am doing something wrong as I want to remove this workaround and get it working.
I'm using DPDK version 18.11 for both OVS and sample app.
Thanks,
Rajesh kumar S R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20191224/168d3d45/attachment.html>
More information about the discuss
mailing list