Hi Aaron / Bala, Just a finding on vhostuserclient and vhostuser in-line below.
On 29/08/2018 22:14, Aaron Conole wrote: > Bala Sankaran <[email protected]> writes: > >> ----- Original Message ----- >>> From: "Tiago Lam" <[email protected]> >>> To: "Bala Sankaran" <[email protected]>, [email protected] >>> Sent: Wednesday, 29 August, 2018 1:36:13 PM >>> Subject: Re: [ovs-dev] [PATCH v3 6/6] system-dpdk: Connect network >>> namespaces via dpdkvhostuser ports >>> >>> Hi Bala, >>> >>> Thanks to both you and Aaron for working on this. Seems to be a great >>> addition. >>> >>> As a general comment I agree with Ian that running everything on v17.11 >>> would be preferable, as this would enable us to run this test on any >>> given system, and not only when v18.11 is installed. But after reading >>> through your thread on the DPDK users list on the 2MB hugepages >>> limitations around virtio_user, it seems this will have to be a >>> dependency until OvS-DPDK moves to v18.11. >> Hello Tiago, >> >> I agree, I did not happen to notice a workaround for this. >> >>> >>> On 28/08/2018 18:47, Bala Sankaran wrote: >>>> This adds a new test to the 'check-dpdk' subsystem that will exercise >>>> allocations, PMDs, and the vhost-user code path. >>>> >>>> Signed-off-by: Bala Sankaran <[email protected]> >>>> Co-authored-by: Aaron Conole <[email protected]> >>>> Signed-off-by: Aaron Conole <[email protected]> >>>> --- >>>> tests/system-dpdk.at | 77 ++++++++++++++++++++++++++++++++++++++++++++ >>>> 1 file changed, 77 insertions(+) >>>> >>>> diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at >>>> index 58dc8aaae..914a1b644 100644 >>>> --- a/tests/system-dpdk.at >>>> +++ b/tests/system-dpdk.at >>>> @@ -1,3 +1,6 @@ >>>> +m4_define([CONFIGURE_VETH_OFFLOADS], >>>> + [AT_CHECK([ethtool -K $1 tx off], [0], [ignore], [ignore])]) >>>> + >>>> AT_BANNER([OVS-DPDK unit tests]) >>>> >>>> dnl >>>> -------------------------------------------------------------------------- >>>> @@ -74,3 +77,77 @@ OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch >>>> kernel module is probably >>>> \@EAL: No free hugepages reported in hugepages-1048576kB@d"]) >>>> AT_CLEANUP >>>> dnl >>>> -------------------------------------------------------------------------- >>>> + >>>> + >>>> + >>>> +dnl >>>> -------------------------------------------------------------------------- >>>> +dnl Ping vhost-user-client port >>>> +AT_SETUP([OVS-DPDK datapath - ping vhost-user-client ports]) > > @bala: > > This is wrong here. These are vhost-user ports, not vhost-user-client ports. > >>> >>> Any reason why you're using vhost-user instead of vhost-user-client? If >>> we change it to "type=dpdkvhostuserclient" in the vhu0 interface added >>> to OvS and append ",server=1" to the net_virtio_user --vdev in the >>> testpmd arguments, doesn't it just work the same? >> >> I believe I encountered an error while running the tests with a vhost-user >> client ports. That's when I switched over to vhost-user instead. I do not >> remember the error at this moment, but now that you mentioned it, I am >> thinking >> of adding another unit test that use vhost-user-client port which would give >> me the error and then skip to vhost-user instead. > > I also don't remember which error we hit and whether it had anything to > do with the type of port. Maybe it makes sense to have both. That way > we cover both. And if we ever completely remove the server mode ports, > we can just drop the test as well (I like that it helps us also catch > the cleanup error in that case). Interesting. I have the exact opposite happening on my system. If I apply this current series as is, I can't get the test to pass. It fails with ping timeouts. If I look into the stats on testpmd (below) and OvS itself it is clear that testpmd is forwarding the traffic from `tap0` to the vdev connected to `vhu0`, but there's no traffic within OvS going from `vhu0` -> `ovs-tap1`. It seems there's no traffic going through OvS, in fact. The stats on testpmd (I would have expected traffic on both ways, rx and tx, on both ports): ---------------------- Forward statistics for port 0 ---------------------- RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 10 TX-dropped: 0 TX-total: 10 ---------------------------------------------------------------------------- ---------------------- Forward statistics for port 1 ---------------------- RX-packets: 10 RX-dropped: 0 RX-total: 10 TX-packets: 0 TX-dropped: 0 TX-total: 0 ---------------------------------------------------------------------------- +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ RX-packets: 10 RX-dropped: 0 RX-total: 10 TX-packets: 10 TX-dropped: 0 TX-total: 10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ However, if I apply the incremental below (with a few comments to skip some AT_CHECKS), in order to switch to use the vhostuserclient instead, the pings are forwarded and the test passes. I haven't spent much time on this to see why the vhostuser fails on my end as is, but thought I would share. Regards, Tiago. --- diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index 914a1b6..039a7cd 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -90,17 +90,17 @@ OVS_DPDK_START() dnl Add userspace bridge and attach it to OVS AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev]) AT_CHECK([ovs-vsctl add-port br10 vhu0 -- set Interface vhu0 \ - type=dpdkvhostuser], [], + type=dpdkvhostuserclient options:vhost-server-path=$OVS_RUNDIR/vhu0], [], [stdout], [stderr]) AT_CHECK([ovs-vsctl show], [], [stdout]) dnl Parse log file -AT_CHECK([grep "VHOST_CONFIG: vhost-user server: socket created" \ - ovs-vswitchd.log], [], [stdout]) -AT_CHECK([grep "Socket $OVS_RUNDIR/vhu0 created for vhost-user port vhu0" \ - ovs-vswitchd.log], [], [stdout]) -AT_CHECK([grep "VHOST_CONFIG: bind to $OVS_RUNDIR/vhu0" ovs-vswitchd.log], [], - [stdout]) +dnl AT_CHECK([grep "VHOST_CONFIG: vhost-user server: socket created" \ +dnl ovs-vswitchd.log], [], [stdout]) +dnl AT_CHECK([grep "Socket $OVS_RUNDIR/vhu0 created for vhost-user port vhu0" \ +dnl ovs-vswitchd.log], [], [stdout]) +dnl AT_CHECK([grep "VHOST_CONFIG: bind to $OVS_RUNDIR/vhu0" ovs-vswitchd.log], [], +dnl [stdout]) dnl Set up namespaces ADD_NAMESPACES(ns1, ns2) @@ -108,7 +108,7 @@ ADD_NAMESPACES(ns1, ns2) dnl execute testpmd in background on_exit "pkill -f -x -9 'tail -f /dev/null'" tail -f /dev/null | testpmd --socket-mem=512 \ - --vdev="net_virtio_user,path=$OVS_RUNDIR/vhu0" \ + --vdev="net_virtio_user,path=$OVS_RUNDIR/vhu0,server=1" \ --vdev="net_tap0,iface=tap0" --file-prefix page0 \ --single-file-segments -- -a >$OVS_RUNDIR/testpmd-vhu0.log 2>&1 & _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
