From patchwork Tue May 10 14:21:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Finn, Emma" X-Patchwork-Id: 1629185 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=GO2Q5VNi; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KyKyJ52GFz9sCq for ; Wed, 11 May 2022 00:23:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7CA0140AEF; Tue, 10 May 2022 14:23:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pQ5rRSIYw7ii; Tue, 10 May 2022 14:23:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id DF10B40AF5; Tue, 10 May 2022 14:22:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id B8B85C0083; Tue, 10 May 2022 14:22:56 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 76F72C002D for ; Tue, 10 May 2022 14:22:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 57CC660FD2 for ; Tue, 10 May 2022 14:22:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=intel.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AJPhBRTvYJWN for ; Tue, 10 May 2022 14:22:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by smtp3.osuosl.org (Postfix) with ESMTPS id AA3C860FB8 for ; Tue, 10 May 2022 14:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652192571; x=1683728571; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7N5Z4zv1ezlueFqHkuGqcyX3d8xtkXSHWthkM0FPAiQ=; b=GO2Q5VNiWQA3sRZelM7PeHUjGFvDKrMCM8YkmYsCvqVlthZ/4C6XJcJC RnKBrBMpET/5ZcrPIitR4GNfQFOTpzfmiJbyqlrByGFB/4E3T7OKPUGm2 PjU/otetHLfOOP0s89LPiVdEK8C8gnkkv2KJMKabyfY6Y4XTXSzvrl7OR Ebv8ve/tMcz+vWS4yuhXdbm81Ml3/6BzJ6Cj1vIHiiBDZMHkTSkCpx9xG yPv745Y65qov+sHz1YiYRnTcoWnrFfjJvcI/VCogLb5jdkoEr5TymnnwE 7SEAuTvXfTthIePtbDEzKQ1OO7nEhEMWofkKq1KrsO3zAHHXruA6ZI2M8 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10342"; a="266975724" X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="266975724" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2022 07:22:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,214,1647327600"; d="scan'208";a="541796780" Received: from silpixa00400899.ir.intel.com ([10.243.22.42]) by orsmga006.jf.intel.com with ESMTP; 10 May 2022 07:22:37 -0700 From: Emma Finn To: echaudro@redhat.com, harry.van.haaren@intel.com, kumar.amber@intel.com, ian.stokes@intel.com, dev@openvswitch.org Date: Tue, 10 May 2022 14:21:51 +0000 Message-Id: <20220510142202.1087967-1-emma.finn@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220112094244.81402-1-emma.finn@intel.com> References: <20220112094244.81402-1-emma.finn@intel.com> MIME-Version: 1.0 Subject: [ovs-dev] [v6 00/11] Actions Infrastructure + Optimizations 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" This patchset introduces actions infrastructure changes which allows the user to choose between different action implementations based on CPU ISA by using different commands. The infrastructure also provides a way to check the correctness of the ISA optimized action version against the scalar version. This series also introduces optimized versions of the following actions: - push_vlan - pop_vlan - set_masked eth - set_masked ipv4 Below is a table indicating the relative performance benefits for these actions. +-----------------------------------------------+-------------------+-----------------+ | Actions | Salar with series | AVX with series | +-----------------------------------------------+-------------------+-----------------+ | mod_dl_dst | 1.04x | 1.15x | +-----------------------------------------------+-------------------+-----------------+ | push_vlan | 1.10x | 1.23x | +-----------------------------------------------+-------------------+-----------------+ | strip_vlan | 1.05x | 1.14x | +-----------------------------------------------+-------------------+-----------------+ | mod_ipv4 1 x field | 1.04x | 1.04x | +-----------------------------------------------+-------------------+-----------------+ | mod_ipv4 4 x fields | 1.04x | 1.23x | +-----------------------------------------------+-------------------+-----------------+ | strip_vlan + mod_dl_dst + mod_ipv4 4 x fields | 1.06x | 1.36x | +-----------------------------------------------+-------------------+-----------------+ --- v6: - Rebase to master - Add ISA implementation of set_masked eth and ipv4 actions - Fix incorrect checksums in input packets for ofproto-dpif unit tests --- v5: - Rebase to master - Minor change to variable names - Added Tags from Harry. --- v4: - Rebase to master - Add ISA implementation of push_vlan action --- v3: - Refactored to fix unit test failures - Removed some sign-off on commits --- v2: - Fix the CI build issues --- Emma Finn (10): ofproto-dpif: Fix incorrect checksums in input packets odp-execute: Add function pointers to odp-execute for different action implementations. odp-execute: Add function pointer for pop_vlan action. odp-execute: Add auto validation function for actions. odp-execute: Add command to switch action implementation. odp-execute: Add ISA implementation of actions. odp-execute: Add ISA implementation of pop_vlan action. odp-execute: Add ISA implementation of push_vlan action. odp-execute: Add ISA implementation of set_masked ETH action odp-execute: Add ISA implementation of set_masked IPv4 action Kumar Amber (1): dpif-netdev: Add configure option to enable actions autovalidator at build time. Documentation/topics/dpdk/bridge.rst | 25 + Documentation/topics/testing.rst | 20 +- NEWS | 7 + acinclude.m4 | 17 + configure.ac | 1 + .../linux/compat/include/linux/openvswitch.h | 2 +- lib/automake.mk | 6 +- lib/cpu.c | 1 + lib/cpu.h | 1 + lib/dp-packet.c | 23 + lib/dp-packet.h | 4 + lib/dpif-netdev-unixctl.man | 6 + lib/dpif-netdev.c | 43 ++ lib/odp-execute-avx512.c | 436 ++++++++++++++++++ lib/odp-execute-private.c | 291 ++++++++++++ lib/odp-execute-private.h | 109 +++++ lib/odp-execute.c | 186 ++++++-- lib/odp-execute.h | 11 + tests/ofproto-dpif.at | 10 +- tests/pmd.at | 21 + 20 files changed, 1168 insertions(+), 52 deletions(-) create mode 100644 lib/odp-execute-avx512.c create mode 100644 lib/odp-execute-private.c create mode 100644 lib/odp-execute-private.h