From patchwork Mon May 17 14:04:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ferriter, Cian" X-Patchwork-Id: 1479523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FkLS343Mlz9sWc for ; Tue, 18 May 2021 00:02:43 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 78CC540521; Mon, 17 May 2021 14:02:41 +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 944qDALxh1jQ; Mon, 17 May 2021 14:02:37 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTP id 1D220404FB; Mon, 17 May 2021 14:02:33 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 73E49C0034; Mon, 17 May 2021 14:02:30 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3E882C002F for ; Mon, 17 May 2021 14:02:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 089C960A85 for ; Mon, 17 May 2021 14:02:27 +0000 (UTC) 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 3a3QknjTHa76 for ; Mon, 17 May 2021 14:02:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by smtp3.osuosl.org (Postfix) with ESMTPS id D8B5B60A59 for ; Mon, 17 May 2021 14:02:21 +0000 (UTC) IronPort-SDR: h0Mzk2OdCNh8awVRjUu1qLdfvVB+ntRsrzro6Cdy6bCubs7Nb+N3TxYnsqeJL83CE2k8spC0Ki iKuTu6J9thoQ== X-IronPort-AV: E=McAfee;i="6200,9189,9986"; a="180747428" X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="180747428" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2021 07:02:21 -0700 IronPort-SDR: 0LdjiH3mieSRzctPA/SghDXoN3Zg20PZ+Y4cwyRDy8lhvEWCpms19lGeIj9sjXHTfl9iq0xBBP PG+qpcV7TByw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,307,1613462400"; d="scan'208";a="460318629" Received: from silpixa00399779.ir.intel.com (HELO silpixa00399779.ger.corp.intel.com) ([10.237.223.175]) by fmsmga004.fm.intel.com with ESMTP; 17 May 2021 07:02:20 -0700 From: Cian Ferriter To: ovs-dev@openvswitch.org Date: Mon, 17 May 2021 15:04:27 +0100 Message-Id: <20210517140434.59555-10-cian.ferriter@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140434.59555-1-cian.ferriter@intel.com> References: <20210517140434.59555-1-cian.ferriter@intel.com> MIME-Version: 1.0 Cc: i.maximets@ovn.org Subject: [ovs-dev] [v12 09/16] docs/dpdk/bridge: Add dpif performance section. 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 section details how two new commands can be used to list and select the different dpif implementations. It also details how a non default dpif implementation can be tested with the OVS unit test suite. Add NEWS updates for the dpif-netdev.c refactor and the new dpif implementations/commands. Signed-off-by: Cian Ferriter --- v8: - Merge NEWS file items into one Userspace Datapath: heading --- Documentation/topics/dpdk/bridge.rst | 37 ++++++++++++++++++++++++++++ NEWS | 4 +++ 2 files changed, 41 insertions(+) diff --git a/Documentation/topics/dpdk/bridge.rst b/Documentation/topics/dpdk/bridge.rst index 526d5c959..ca90d7bdb 100644 --- a/Documentation/topics/dpdk/bridge.rst +++ b/Documentation/topics/dpdk/bridge.rst @@ -214,3 +214,40 @@ implementation :: Compile OVS in debug mode to have `ovs_assert` statements error out if there is a mis-match in the DPCLS lookup implementation. + +Datapath Interface Performance +------------------------------ + +The datapath interface (DPIF) or dp_netdev_input() is responsible for taking +packets through the major components of the userspace datapath; such as +miniflow_extract, EMC, SMC and DPCLS lookups, and a lot of the performance +stats associated with the datapath. + +Just like with the SIMD DPCLS work above, SIMD can be applied to the DPIF to +improve performance. + +OVS provides multiple implementations of the DPIF. These can be listed with the +following command :: + + $ ovs-appctl dpif-netdev/dpif-get + Available DPIF implementations: + dpif_scalar + dpif_avx512 + +By default, dpif_scalar is used. The DPIF implementation can be selected by +name :: + + $ ovs-appctl dpif-netdev/dpif-set dpif_avx512 + DPIF implementation set to dpif_avx512. + + $ ovs-appctl dpif-netdev/dpif-set dpif_scalar + DPIF implementation set to dpif_scalar. + +Running Unit Tests with AVX512 DPIF +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Since the AVX512 DPIF is disabled by default, a compile time option is +available in order to test it with the OVS unit test suite. When building with +a CPU that supports AVX512, use the following configure option :: + + $ ./configure --enable-dpif-default-avx512 diff --git a/NEWS b/NEWS index 3eab5f4fa..5e847a95e 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ Post-v2.15.0 cases, e.g if all PMD threads are running on the same NUMA node. * Add a partial HWOL PMD statistic counting hits similar to existing * EMC/SMC/DPCLS stats. + * Refactor lib/dpif-netdev.c to multiple header files. + * Add avx512 implementation of dpif which can process non recirculated + packets. It supports partial HWOL, EMC, SMC and DPCLS lookups. + * Add commands to get and set the dpif implementations. - ovs-ctl: * New option '--no-record-hostname' to disable hostname configuration in ovsdb on startup.