From patchwork Thu Jul 14 17:51:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emma Finn X-Patchwork-Id: 1656577 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=H/SFH3kD; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 4LkMWn246Lz9sGG for ; Fri, 15 Jul 2022 03:52:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id B2F8160DED; Thu, 14 Jul 2022 17:52:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B2F8160DED Authentication-Results: smtp3.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=H/SFH3kD X-Virus-Scanned: amavisd-new at osuosl.org 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 LXZvkSY56vIt; Thu, 14 Jul 2022 17:52:17 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5B8F76162C; Thu, 14 Jul 2022 17:52:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 5B8F76162C Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1727BC0071; Thu, 14 Jul 2022 17:52:16 +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 7F4BCC002D for ; Thu, 14 Jul 2022 17:52:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id A002681367 for ; Thu, 14 Jul 2022 17:52:11 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A002681367 Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=H/SFH3kD X-Virus-Scanned: amavisd-new at osuosl.org 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 BPluiUYgAj9D for ; Thu, 14 Jul 2022 17:52:08 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2AC278001C Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by smtp1.osuosl.org (Postfix) with ESMTPS id 2AC278001C for ; Thu, 14 Jul 2022 17:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657821128; x=1689357128; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Vc+GByKNXJ8tDWlbULyznidNJ0ODRd+sHINtKu6OSs=; b=H/SFH3kDRN8WYhL07XJc5trdC2Yfn7VevwGxMG8I+2GFhE8GoTgiZUjl BRAzU0zLyYeFcrNlBibYgiVSN/h4L08RjSk9j8xUTlHUc+4J+213n3bqP r7M9mKPcQEpQxmzp85y3aYYvzO+JEpX8rTacctevhu55rPvMGHpjagmWB zSqLiVID/eWZPD7LiOvCSdNitibaHyM26WPbpa+f/nQmGUKMPSPeY094q HMmo+Mrt2gaXjJFglirXXw94yLKA5ThdfGM8N+mhMEcix85F6LaeU/Bs5 Wgj2ByMkNPtCzYxM9uZhxYjYRUMTy1W0iNCJVICVawr4wmEcCkVa3vFX3 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10408"; a="268618427" X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="268618427" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2022 10:52:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,272,1650956400"; d="scan'208";a="842232054" Received: from silpixa00401384.ir.intel.com ([10.243.22.75]) by fmsmga006.fm.intel.com with ESMTP; 14 Jul 2022 10:52:05 -0700 From: Emma Finn To: dev@openvswitch.org, echaudro@redhat.com, harry.van.haaren@intel.com, kumar.amber@intel.com Date: Thu, 14 Jul 2022 17:51:48 +0000 Message-Id: <20220714175158.3709150-1-emma.finn@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220713182807.3416578-1-harry.van.haaren@intel.com> References: <20220713182807.3416578-1-harry.van.haaren@intel.com> MIME-Version: 1.0 Cc: i.maximets@ovn.org Subject: [ovs-dev] [v11 00/10] 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 some relative performance benefits for these actions. +-----------------------------------------------+-------------------+-----------------+ | Actions | Scalar with series|AVX with series | +-----------------------------------------------+-------------------+-----------------+ | mod_dl_dst | 1.01x |1.13x | +-----------------------------------------------+-------------------+-----------------+ | push_vlan | 1.01x |1.10x | +-----------------------------------------------+-------------------+-----------------+ | strip_vlan | 1.01x |1.11x | +-----------------------------------------------+-------------------+-----------------+ | mod_ipv4 1 x field | 1.01x |1.02x | +-----------------------------------------------+-------------------+-----------------+ | mod_ipv4 4 x fields | 1.01x |1.21x | +-----------------------------------------------+-------------------+-----------------+ | strip_vlan + mod_dl_dst + mod_ipv4 4 x fields | 1.01x |1.36x | +-----------------------------------------------+-------------------+-----------------+ --- v11: - Moved unit test to opd.at - Refactored avx probe/init - renamed variables for avx implementation of ipv4 action - added atomic read and store of active impl function pointer --- v10; - Fixed CI build issue on OSX around AVX512 linking (jenkins CI) - Moved docs and reworded sections (thanks Ilya for feedback) - Reworked one instance of <= OVS_ATTR_MAX back to original form(Eelco) --- v9: - Moved avx512 probe and init functions to later patch. - Dependency on userspace datapath has been resolved. - Fixed up comments from Sunil as posted on v8 - Note: Harry is sending this patchset, but it is Emma's rework, except for rebasing to lastest git, and very minor fixups. --- v8 - First patch changing unit tests has been removed from series. - AVX checksum implementation has been reworked. --- v7: - Fix review comments from Eelco. --- 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 (8): 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 push_vlan action. odp-execute: Add ISA implementation of set_masked ETH odp-execute: Add ISA implementation of set_masked IPv4 action Harry van Haaren (1): odp-execute: Add ISA implementation of pop_vlan action. Kumar Amber (1): acinclude: Add configure option to enable actions autovalidator at build time. Documentation/topics/dpdk/bridge.rst | 30 ++ Documentation/topics/testing.rst | 24 +- NEWS | 7 + acinclude.m4 | 21 ++ configure.ac | 1 + lib/automake.mk | 7 + lib/cpu.c | 1 + lib/cpu.h | 1 + lib/dp-packet.c | 24 ++ lib/dp-packet.h | 4 + lib/odp-execute-avx512.c | 546 +++++++++++++++++++++++++++ lib/odp-execute-private.c | 267 +++++++++++++ lib/odp-execute-private.h | 102 +++++ lib/odp-execute-unixctl.man | 10 + lib/odp-execute.c | 208 ++++++++-- lib/odp-execute.h | 10 + m4/openvswitch.m4 | 29 ++ tests/odp.at | 39 ++ tests/ofproto-macros.at | 1 + vswitchd/bridge.c | 3 + vswitchd/ovs-vswitchd.8.in | 1 + 21 files changed, 1290 insertions(+), 46 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 create mode 100644 lib/odp-execute-unixctl.man