From patchwork Wed Aug 1 20:31:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 952382 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41glQB35ljz9s4s for ; Thu, 2 Aug 2018 06:33:54 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 0CC61D83; Wed, 1 Aug 2018 20:31:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 946F5C96 for ; Wed, 1 Aug 2018 20:31:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 01443716 for ; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F06CF40201BC; Wed, 1 Aug 2018 20:31:19 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id CFBAD1006EB9; Wed, 1 Aug 2018 20:31:19 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Wed, 1 Aug 2018 16:31:13 -0400 Message-Id: <20180801203118.24126-2-aconole@redhat.com> In-Reply-To: <20180801203118.24126-1-aconole@redhat.com> References: <20180801203118.24126-1-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'aconole@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bala Sankaran Subject: [ovs-dev] [PATCH 1/6] system-dpdk: update test suite for non-phy testing X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org This allows a system that doesn't have a dedicated DPDK nic to execute some DPDK tests. In this fashion, tests that operate on virtual ports (such as dpdkvhostuserclient) can be executed in a wider set of environments. Signed-off-by: Aaron Conole --- tests/system-dpdk-macros.at | 18 +++++++++++++++--- tests/system-dpdk.at | 16 ++++++++-------- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at index 0762ee055..2e5571fc4 100644 --- a/tests/system-dpdk-macros.at +++ b/tests/system-dpdk-macros.at @@ -2,7 +2,6 @@ # # Check prerequisites for DPDK tests. Following settings are checked: # - Hugepages -# - UIO driver # m4_define([OVS_DPDK_PRE_CHECK], [dnl Check Hugepages @@ -11,13 +10,26 @@ m4_define([OVS_DPDK_PRE_CHECK], AT_CHECK([mount], [], [stdout]) AT_CHECK([grep 'hugetlbfs' stdout], [], [stdout], []) +]) + + +# OVS_DPDK_PRE_PHY_SKIP() +# +# Skip any phy related tests if the PHY variable is not set. +# This is done by checking for a bound driver. +# +m4_define([OVS_DPDK_PRE_PHY_SKIP], + [dnl Perform the precheck + OVS_DPDK_PRE_CHECK() + dnl Check if VFIO or UIO driver is loaded - AT_CHECK([lsmod | grep -E "igb_uio|vfio"], [], [stdout]) + AT_SKIP_IF([ ! (lsmod | grep -E "igb_uio|vfio") ], [], [stdout]) dnl Find PCI address candidate, skip if there is no DPDK-compatible NIC AT_CHECK([$DPDK_DIR/usertools/dpdk-devbind.py -s | head -n +4 | tail -1], [], [stdout]) AT_CHECK([cat stdout | cut -d" " -s -f1 > PCI_ADDR]) - AT_CHECK([test -s PCI_ADDR || exit 77]) + AT_SKIP_IF([ ! test -s PCI_ADDR ]) + ]) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index 3d21b0136..6901d19e6 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -4,14 +4,14 @@ dnl -------------------------------------------------------------------------- dnl Check if EAL init is successfull AT_SETUP([OVS-DPDK datapath - EAL init]) AT_KEYWORDS([dpdk]) -dnl OVS_DPDK_PRE_CHECK() +OVS_DPDK_PRE_CHECK() OVS_DPDK_START() AT_CHECK([grep "DPDK Enabled - initializing..." ovs-vswitchd.log], [], [stdout]) AT_CHECK([grep "EAL" ovs-vswitchd.log], [], [stdout]) AT_CHECK([grep "DPDK Enabled - initialized" ovs-vswitchd.log], [], [stdout]) -OVS_VSWITCHD_STOP("/Global register is changed during/d -/EAL: No free hugepages reported in hugepages-1048576kB/d -") +OVS_VSWITCHD_STOP(["/Global register is changed during/d +/EAL: Invalid NUMA socket, default to 0/d +/EAL: No free hugepages reported in hugepages-1048576kB/d"]) AT_CLEANUP dnl -------------------------------------------------------------------------- @@ -22,7 +22,7 @@ dnl Add standard DPDK PHY port AT_SETUP([OVS-DPDK datapath - add standard DPDK port]) AT_KEYWORDS([dpdk]) -OVS_DPDK_PRE_CHECK() +OVS_DPDK_PRE_PHY_SKIP() OVS_DPDK_START() dnl Add userspace bridge and attach it to OVS @@ -63,11 +63,11 @@ AT_CHECK([grep "VHOST_CONFIG: /tmp/dpdkvhostclient0: reconnecting..." ovs-vswitc dnl Clean up AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr]) -OVS_VSWITCHD_STOP("/does not exist. The Open vSwitch kernel module is probably not loaded./d +OVS_VSWITCHD_STOP(["/does not exist. The Open vSwitch kernel module is probably not loaded./d /Failed to enable flow control/d /failed to connect to \/tmp\/dpdkvhostclient0: No such file or directory/d /Global register is changed during/d -/EAL: No free hugepages reported in hugepages-1048576kB/d -") +/EAL: Invalid NUMA socket, default to 0/d +/EAL: No free hugepages reported in hugepages-1048576kB/d"]) AT_CLEANUP dnl -------------------------------------------------------------------------- From patchwork Wed Aug 1 20:31:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 952380 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41glPp6HDVz9s3Z for ; Thu, 2 Aug 2018 06:33:34 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 52C1BD69; Wed, 1 Aug 2018 20:31:27 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 85049CB5 for ; Wed, 1 Aug 2018 20:31:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 018AF798 for ; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 23D2187A84; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0380310EE6DA; Wed, 1 Aug 2018 20:31:19 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Wed, 1 Aug 2018 16:31:14 -0400 Message-Id: <20180801203118.24126-3-aconole@redhat.com> In-Reply-To: <20180801203118.24126-1-aconole@redhat.com> References: <20180801203118.24126-1-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'aconole@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bala Sankaran Subject: [ovs-dev] [PATCH 2/6] system-dpdk: skip all tests if there are no hugepages X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Bala Sankaran A failure is quite harsh in this scenario. It's better to simply skip all the tests and let the user look at the logs to understand the missing hugepages. Signed-off-by: Bala Sankaran Co-authored-by: Aaron Conole Signed-off-by: Aaron Conole --- tests/system-dpdk-macros.at | 2 +- tests/system-dpdk.at | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system-dpdk-macros.at b/tests/system-dpdk-macros.at index 2e5571fc4..f772a1945 100644 --- a/tests/system-dpdk-macros.at +++ b/tests/system-dpdk-macros.at @@ -6,7 +6,7 @@ m4_define([OVS_DPDK_PRE_CHECK], [dnl Check Hugepages AT_CHECK([cat /proc/meminfo], [], [stdout]) - AT_CHECK([grep HugePages_ stdout], [], [stdout]) + AT_SKIP_IF([egrep 'HugePages_Free: *0' stdout], [], [stdout]) AT_CHECK([mount], [], [stdout]) AT_CHECK([grep 'hugetlbfs' stdout], [], [stdout], []) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index 6901d19e6..c1c908411 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -47,7 +47,7 @@ dnl -------------------------------------------------------------------------- dnl Add vhost-user-client port AT_SETUP([OVS-DPDK datapath - add vhost-user-client port]) AT_KEYWORDS([dpdk]) - +OVS_DPDK_PRE_CHECK() OVS_DPDK_START() dnl Add userspace bridge and attach it to OVS From patchwork Wed Aug 1 20:31:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 952379 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41glPN6YKdz9s3Z for ; Thu, 2 Aug 2018 06:33:12 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7C820D5B; Wed, 1 Aug 2018 20:31:26 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 78574CAE for ; Wed, 1 Aug 2018 20:31:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 2970E799 for ; Wed, 1 Aug 2018 20:31:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4AEAB40201C4; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A99810EE6DA; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Wed, 1 Aug 2018 16:31:15 -0400 Message-Id: <20180801203118.24126-4-aconole@redhat.com> In-Reply-To: <20180801203118.24126-1-aconole@redhat.com> References: <20180801203118.24126-1-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'aconole@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bala Sankaran Subject: [ovs-dev] [PATCH 3/6] system-dpdk: Allow running the dpdk tests from a VM X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Some VM configurations result in CPU flags that cause warnings to be issued by the DPDK libraries. When these warnings are issued, the tests will fail. This commit adds the unreliable tsc warning to the list of ignored warnings. Signed-off-by: Aaron Conole --- tests/system-dpdk.at | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index c1c908411..723ba794f 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -11,6 +11,7 @@ AT_CHECK([grep "EAL" ovs-vswitchd.log], [], [stdout]) AT_CHECK([grep "DPDK Enabled - initialized" ovs-vswitchd.log], [], [stdout]) OVS_VSWITCHD_STOP(["/Global register is changed during/d /EAL: Invalid NUMA socket, default to 0/d +/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d /EAL: No free hugepages reported in hugepages-1048576kB/d"]) AT_CLEANUP dnl -------------------------------------------------------------------------- @@ -36,6 +37,7 @@ AT_CHECK([ovs-vsctl del-port br10 phy0], [], [stdout], [stderr]) OVS_VSWITCHD_STOP("/does not exist. The Open vSwitch kernel module is probably not loaded./d /Failed to enable flow control/d /Global register is changed during/d +/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d /EAL: No free hugepages reported in hugepages-1048576kB/d ") AT_CLEANUP @@ -68,6 +70,7 @@ OVS_VSWITCHD_STOP(["/does not exist. The Open vSwitch kernel module is probably /failed to connect to \/tmp\/dpdkvhostclient0: No such file or directory/d /Global register is changed during/d /EAL: Invalid NUMA socket, default to 0/d +/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d /EAL: No free hugepages reported in hugepages-1048576kB/d"]) AT_CLEANUP dnl -------------------------------------------------------------------------- From patchwork Wed Aug 1 20:31:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 952376 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41glMp4jR9z9s3Z for ; Thu, 2 Aug 2018 06:31:50 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7E792CBE; Wed, 1 Aug 2018 20:31:23 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 8E298C87 for ; Wed, 1 Aug 2018 20:31:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 38F5E7A3 for ; Wed, 1 Aug 2018 20:31:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 71D8E40216E6; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5201D10EE6DA; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Wed, 1 Aug 2018 16:31:16 -0400 Message-Id: <20180801203118.24126-5-aconole@redhat.com> In-Reply-To: <20180801203118.24126-1-aconole@redhat.com> References: <20180801203118.24126-1-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'aconole@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bala Sankaran Subject: [ovs-dev] [PATCH 4/6] system-dpdk: Use a different character marker for sed commands X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The default marker for sed commands according to the manual is /, but this is inconvenient when working with paths. The solution is either to escape all instances of / or use sed's \cREGEXc feature. Signed-off-by: Aaron Conole --- tests/system-dpdk.at | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index 723ba794f..834ba06fb 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -65,12 +65,12 @@ AT_CHECK([grep "VHOST_CONFIG: /tmp/dpdkvhostclient0: reconnecting..." ovs-vswitc dnl Clean up AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr]) -OVS_VSWITCHD_STOP(["/does not exist. The Open vSwitch kernel module is probably not loaded./d -/Failed to enable flow control/d -/failed to connect to \/tmp\/dpdkvhostclient0: No such file or directory/d -/Global register is changed during/d -/EAL: Invalid NUMA socket, default to 0/d -/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d -/EAL: No free hugepages reported in hugepages-1048576kB/d"]) +OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d +\@Failed to enable flow control@d +\@VHOST_CONFIG: failed to connect to /tmp/dpdkvhostclient0: No such file or directory@d +\@Global register is changed during@d +\@EAL: Invalid NUMA socket, default to 0@d +\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d +\@EAL: No free hugepages reported in hugepages-1048576kB@d"]) AT_CLEANUP dnl -------------------------------------------------------------------------- From patchwork Wed Aug 1 20:31:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 952377 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41glNJ1Rxfz9s3Z for ; Thu, 2 Aug 2018 06:32:16 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 63F80CB0; Wed, 1 Aug 2018 20:31:24 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D37B4C87 for ; Wed, 1 Aug 2018 20:31:21 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 64C8F7A6 for ; Wed, 1 Aug 2018 20:31:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 98C4D87AAE; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78F3210EE6DA; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Wed, 1 Aug 2018 16:31:17 -0400 Message-Id: <20180801203118.24126-6-aconole@redhat.com> In-Reply-To: <20180801203118.24126-1-aconole@redhat.com> References: <20180801203118.24126-1-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'aconole@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bala Sankaran Subject: [ovs-dev] [PATCH 5/6] system-dpdk: Convert /tmp to use OVS_RUNDIR X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Bala Sankaran When multiple users run the DPDK testsuite ther dependence on /tmp will cause conflicts. Use the RUNDIR as a dynamic path to overcome this. NOTE: This still doesn't solve the dependency on /var/run that DPDK requires. Signed-off-by: Bala Sankaran Co-authored-by: Aaron Conole Signed-off-by: Aaron Conole --- tests/system-dpdk.at | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index 834ba06fb..58dc8aaae 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -54,20 +54,20 @@ 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 dpdkvhostuserclient0 -- set Interface dpdkvhostuserclient0 type=dpdkvhostuserclient options:vhost-server-path=/tmp/dpdkvhostclient0], [], [stdout], [stderr]) +AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuserclient0 -- set Interface dpdkvhostuserclient0 type=dpdkvhostuserclient options:vhost-server-path=$OVS_RUNDIR/dpdkvhostclient0], [], [stdout], [stderr]) AT_CHECK([ovs-vsctl show], [], [stdout]) sleep 2 dnl Parse log file AT_CHECK([grep "VHOST_CONFIG: vhost-user client: socket created" ovs-vswitchd.log], [], [stdout]) AT_CHECK([grep "vHost User device 'dpdkvhostuserclient0' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout]) -AT_CHECK([grep "VHOST_CONFIG: /tmp/dpdkvhostclient0: reconnecting..." ovs-vswitchd.log], [], [stdout]) +AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs-vswitchd.log], [], [stdout]) dnl Clean up AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr]) OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d \@Failed to enable flow control@d -\@VHOST_CONFIG: failed to connect to /tmp/dpdkvhostclient0: No such file or directory@d +\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory@d \@Global register is changed during@d \@EAL: Invalid NUMA socket, default to 0@d \@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d From patchwork Wed Aug 1 20:31:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Conole X-Patchwork-Id: 952378 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41glNn3FKRz9s3Z for ; Thu, 2 Aug 2018 06:32:41 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 52CAFD49; Wed, 1 Aug 2018 20:31:25 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 3C513C87 for ; Wed, 1 Aug 2018 20:31:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8DA0CCF for ; Wed, 1 Aug 2018 20:31:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BFABE40201D7; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) Received: from dhcp-25.97.bos.redhat.com (unknown [10.18.25.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F44710EE6DC; Wed, 1 Aug 2018 20:31:20 +0000 (UTC) From: Aaron Conole To: dev@openvswitch.org Date: Wed, 1 Aug 2018 16:31:18 -0400 Message-Id: <20180801203118.24126-7-aconole@redhat.com> In-Reply-To: <20180801203118.24126-1-aconole@redhat.com> References: <20180801203118.24126-1-aconole@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 01 Aug 2018 20:31:20 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'aconole@redhat.com' RCPT:'' X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Bala Sankaran Subject: [ovs-dev] [RFC 6/6] system-dpdk: Connect two namespaces via virtio X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org From: Bala Sankaran 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 Co-authored-by: Aaron Conole Signed-off-by: Aaron Conole --- NOTE: This currently is broken, and needs some help to fix. The biggest issue we currently see is that the ovs-vswitchd does not successfully configure memory regions, failing with the generic: "Cannot allocate memory" from the mmap() call in vhost_user_set_mem_table. We have used dpdk 17.11 for ovs-vswitchd, and 18.05+ for the testpmd version. tests/system-dpdk.at | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/tests/system-dpdk.at b/tests/system-dpdk.at index 58dc8aaae..14ea2edce 100644 --- a/tests/system-dpdk.at +++ b/tests/system-dpdk.at @@ -74,3 +74,78 @@ 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 Add vhost-user-client port +AT_SETUP([OVS-DPDK datapath - ping vhost-user-client ports]) +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 dpdkvhostuserclient0 -- set Interface dpdkvhostuserclient0 type=dpdkvhostuserclient options:vhost-server-path=$OVS_RUNDIR/vhu0], [], [stdout], [stderr]) +AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuserclient1 -- set Interface dpdkvhostuserclient1 type=dpdkvhostuserclient options:vhost-server-path=$OVS_RUNDIR/vhu1], [], [stdout], [stderr]) +AT_CHECK([ovs-vsctl show], [], [stdout]) +sleep 2 + +dnl Parse log file +AT_CHECK([grep "VHOST_CONFIG: vhost-user client: socket created" ovs-vswitchd.log], [], [stdout]) +AT_CHECK([grep "vHost User device 'dpdkvhostuserclient0' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout]) +AT_CHECK([grep "vHost User device 'dpdkvhostuserclient1' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout]) +AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/vhu0: reconnecting..." ovs-vswitchd.log], [], [stdout]) +AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/vhu1: reconnecting..." 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'" +(echo start && tail -f /dev/null) | /usr/local/bin/testpmd --socket-mem=512 \ + --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 & +(echo start && tail -f /dev/null) | /usr/local/bin/testpmd --socket-mem=512 \ + --vdev="net_virtio_user,path=$OVS_RUNDIR/vhu1,server=1" \ + --vdev=net_tap1,iface=tap1 --file-prefix page1 \ + --single-file-segments -- -a >$OVS_RUNDIR/testpmd-vhu1.log 2>&1 & + +dnl give settling time to the testpmd processes +sleep 2 + +dnl move the tap devices to the namespaces +AT_CHECK([ip link set tap0 netns ns1], [], [stdout], [stderr]) +AT_CHECK([ip link set tap1 netns ns2], [], [stdout], [stderr]) + +AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr]) +AT_CHECK([ip netns exec ns1 ip link show | grep tap0], [], [stdout], [stderr]) +AT_CHECK([ip netns exec ns1 ip link set tap0 up], [], [stdout], [stderr]) +AT_CHECK([ip netns exec ns1 ip addr add 172.31.110.11/24 dev tap0], [], [stdout], [stderr]) + +AT_CHECK([ip netns exec ns2 ip link show], [], [stdout], [stderr]) +AT_CHECK([ip netns exec ns2 ip link show | grep tap1], [], [stdout], [stderr]) +AT_CHECK([ip netns exec ns2 ip link set tap1 up], [], [stdout], [stderr]) +AT_CHECK([ip netns exec ns2 ip addr add 172.31.110.12/24 dev tap1], [], [stdout], [stderr]) + +ip netns exec ns1 arping -c 4 -I tap0 172.31.110.12 + +ovs-vsctl show +ovs-appctl dpctl/dump-dps +ovs-appctl dpctl/show netdev@ovs-netdev +ps aux | grep testpmd + +dnl Clean up +AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr]) +AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient1], [], [stdout], [stderr]) +OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d +\@Failed to enable flow control@d +\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/hu0: No such file or directory@d +\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/vhu1: No such file or directory@d +\@Global register is changed during@d +\@EAL: Invalid NUMA socket, default to 0@d +\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d +\@EAL: No free hugepages reported in hugepages-1048576kB@d"]) +AT_CLEANUP +dnl --------------------------------------------------------------------------