From patchwork Wed Jan 5 16:53:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Finn, Emma" X-Patchwork-Id: 1575768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=WmmqzJQM; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JTbDg2Gwsz9sSs for ; Thu, 6 Jan 2022 03:54:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 26E5341636; Wed, 5 Jan 2022 16:54:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W3UJO8clv5hW; Wed, 5 Jan 2022 16:54:20 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0AB87428FC; Wed, 5 Jan 2022 16:54:17 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id C493AC0071; Wed, 5 Jan 2022 16:54:17 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 23149C0074 for ; Wed, 5 Jan 2022 16:54:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AC92182DD9 for ; Wed, 5 Jan 2022 16:54:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ogFxLvUJjmej for ; Wed, 5 Jan 2022 16:54:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by smtp1.osuosl.org (Postfix) with ESMTPS id 837F782F6C for ; Wed, 5 Jan 2022 16:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641401651; x=1672937651; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=1h5ycZY9jyIsXH8FVeHSHQpGAbm0aQ9YIH+2WgV/VHI=; b=WmmqzJQMl0J+EFR+hfjhP7xcAhO7aTG8//9a4rnd1voT8IF0vWpfLHaA T/2Fma2a6+gj72+vuzOKYjquJkkMqKOagLRTjrxA9EjSbZrWE/RsclwWE dVfAxsxt59aC8Lft/9Xf2ij+JZ0C28IFEds+XLO7TszUttmjwPkdS3E3d 3VQo1nM4ZqT4wsU8TzLXPU7BL/7I7pebqBlsXgz7OdbsNzrpRSA6auxud YNXLGULDtVXVRxgmJh0nL2I8CCrD+rbSkpBuD1ePOqR3E3Tm4Xwx1wHG3 VVb//KskLKz0FRMcW2phNoX4stCCKTkTSjH1Z3xvZdADDDzgeoi2QtqiE Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10217"; a="242688537" X-IronPort-AV: E=Sophos;i="5.88,264,1635231600"; d="scan'208";a="242688537" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2022 08:54:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,264,1635231600"; d="scan'208";a="611525866" Received: from silpixa00400899.ir.intel.com ([10.243.23.110]) by FMSMGA003.fm.intel.com with ESMTP; 05 Jan 2022 08:54:10 -0800 From: Emma Finn To: dev@openvswitch.org, harry.van.haaren@intel.com, kumar.amber@intel.com Date: Wed, 5 Jan 2022 16:53:46 +0000 Message-Id: <20220105165349.3447695-7-emma.finn@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220105165349.3447695-1-emma.finn@intel.com> References: <20211203153301.37692-1-emma.finn@intel.com> <20220105165349.3447695-1-emma.finn@intel.com> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH v4 6/9] dpif-netdev: Add configure option to enable actions autovalidator at build time. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" From: Kumar Amber This commit adds a new command to allow the user to enable the actions autovalidator by default at build time thus allowing for running unit test by default. $ ./configure --enable-actions-default-autovalidator Signed-off-by: Kumar Amber Acked-by: Harry van Haaren --- NEWS | 2 ++ acinclude.m4 | 17 +++++++++++++++++ configure.ac | 1 + lib/odp-execute.c | 4 ++++ 4 files changed, 24 insertions(+) diff --git a/NEWS b/NEWS index af22a08bc..2e7dc1acb 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ Post-v2.16.0 implementations against default implementation. * Add command line option to switch between different actions implementations available at run time. + * Add build time configure command to enable auto-validator as default + actions implementation at build time. - Python: * For SSL support, the use of the pyOpenSSL library has been replaced with the native 'ssl' module. diff --git a/acinclude.m4 b/acinclude.m4 index 23cd6df44..6514f2bd7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -14,6 +14,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +dnl Set OVS Actions Autovalidator as default action at compile time? +dnl This enables automatically running all unit tests with all actions +dnl implementations. +AC_DEFUN([OVS_CHECK_ACTIONS_AUTOVALIDATOR], [ + AC_ARG_ENABLE([actions-default-autovalidator], + [AC_HELP_STRING([--enable-actions-default-autovalidator], [Enable actions autovalidator as default ovs actions implementation.])], + [autovalidator=yes],[autovalidator=no]) + AC_MSG_CHECKING([whether actions Autovalidator is default implementation]) + if test "$autovalidator" != yes; then + AC_MSG_RESULT([no]) + else + OVS_CFLAGS="$OVS_CFLAGS -DACTIONS_AUTOVALIDATOR_DEFAULT" + AC_MSG_RESULT([yes]) + fi +]) + + dnl Set OVS MFEX Autovalidator as default miniflow extract at compile time? dnl This enables automatically running all unit tests with all MFEX dnl implementations. diff --git a/configure.ac b/configure.ac index eaa9bf7ee..bfd0a9aff 100644 --- a/configure.ac +++ b/configure.ac @@ -185,6 +185,7 @@ OVS_CTAGS_IDENTIFIERS OVS_CHECK_DPCLS_AUTOVALIDATOR OVS_CHECK_DPIF_AVX512_DEFAULT OVS_CHECK_MFEX_AUTOVALIDATOR +OVS_CHECK_ACTIONS_AUTOVALIDATOR OVS_CHECK_AVX512 AC_ARG_VAR(KARCH, [Kernel Architecture String]) diff --git a/lib/odp-execute.c b/lib/odp-execute.c index ab051aecc..1bc9fae09 100644 --- a/lib/odp-execute.c +++ b/lib/odp-execute.c @@ -865,7 +865,11 @@ odp_execute_init(void) static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER; if (ovsthread_once_start(&once)) { odp_execute_action_init(); +#ifdef ACTIONS_AUTOVALIDATOR_DEFAULT + odp_actions_impl_set("autovalidator"); +#else odp_actions_impl_set("scalar"); +#endif ovsthread_once_done(&once); } }