On 8/30/2018 1:08 AM, Bala Sankaran wrote:
----- Original Message -----
From: "Aaron Conole" <[email protected]>
To: "Bala Sankaran" <[email protected]>
Cc: "Tiago Lam" <[email protected]>, [email protected]
Sent: Wednesday, 29 August, 2018 5:14:41 PM
Subject: Re: [ovs-dev] [PATCH v3 6/6] system-dpdk: Connect network namespaces
via dpdkvhostuser ports
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.
Sorry about that, I will make the correction.
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).
+1
+AT_KEYWORDS([dpdk])
+OVS_DPDK_PRE_CHECK()
+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], [],
+ [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 Set up namespaces
+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_tap0,iface=tap0" --file-prefix page0 \
+ --single-file-segments -- -a >$OVS_RUNDIR/testpmd-vhu0.log
2>&1
&
+
I've seen your reply to Ian's comment on the $PATH environment variable
on v2; That could be enough if there wasn't a requirement for DPDK
v18.11 for the `testpmd` bin. Since there is a separate environment
variable will be needed to guarantee we're executing the correct one
(and not the v17.11 that's currently linked with OvS, as an example). It
would also enable us to detect if the variable is set or not, and if
not, skip the test altogether. At the moment the test will just fail, if
the binary doesn't exist.
I do not have complete familiarity on this note, I have copied Aaron along
in this email. I suppose that he would be able to comment on this.
I think it's okay to just use PATH, and rely on the path lookup order.
After all, it's quite possible to have a different environment for
testpmd and put that in the path, and it should link to the correct
library versions.
PATH=/path/to/dpdk-18.11:$PATH
I'm hesitant to add a workaround to a problem that will disappear once
the next LTS comes along and gets integrated (since we'll need to then
revert that workaround, or deal with it appropriately). I guess Ian has
the final say on what he wants to accept into the tree for the dpdk
checks, but I like using the path in this case (and we were able to use
it even with this complicated environment).
I do agree we shouldn't fail for missing testpmd - we should 'skip'
+1, skip if testpmd is missing.
On that note I think using $PATH is fine but in that case we should add
it as to the testing docs that testpmd is expected to be declared as
part of $PATH (it may not have been).
I'm OK with testpmd being used from 18.08 for the moment but would like
to see it being documented as a known issue that testpmd 17.11 does not
work.
We can remove this known issue if/when we move to 18.11 then.
The alternative is to defer the patch until we move to 18.11 but I think
the patchset does bring value. Validation is an area of OVS DPDK that is
lacking to date.
Ian
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev