From patchwork Thu Sep 23 11:20:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Malov X-Patchwork-Id: 99483 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D92A4A0C43; Thu, 23 Sep 2021 13:20:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C3A6A41260; Thu, 23 Sep 2021 13:20:27 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 5B3F44122B for ; Thu, 23 Sep 2021 13:20:26 +0200 (CEST) Received: from localhost.localdomain (unknown [5.144.120.173]) (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 shelob.oktetlabs.ru (Postfix) with ESMTPSA id CCE5B7F4E2; Thu, 23 Sep 2021 14:20:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru CCE5B7F4E2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1632396025; bh=E1wqXKhHxDqCAnGCfffeRNmWalimNIQhNaofsY2oDbc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JUUkg+GGaUPJzksM1+wm4T8UebDfBkd5+RWYOKqbSWd3XRll5DT+JWqWg3XlD5o0g 2RzomBhi2O/sea8QA4EA7/bHlVxnpRXugpsjm95zu/Sv54nos4LNya4fWSNlkWYHxR ZoK4a0srt28IRIkCjjtIg/pHzYmIj6xyt2hHONcQ= From: Ivan Malov To: dev@dpdk.org Cc: Andy Moreton Date: Thu, 23 Sep 2021 14:20:07 +0300 Message-Id: <20210923112012.14595-1-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210902142359.28138-1-ivan.malov@oktetlabs.ru> References: <20210902142359.28138-1-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 0/5] A means to negotiate delivery of Rx meta data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In 2019, commit [1] announced changes in DEV_RX_OFFLOAD namespace intending to add new flags, RSS_HASH and FLOW_MARK. Since then, only the former has been added. The problem hasn't been solved. Applications still assume that no efforts are needed to enable flow mark and similar meta data delivery. The team behind net/sfc driver has to take over the efforts since the problem has started impacting us. Riverhead, a cutting edge Xilinx smart NIC family, has two Rx prefix types. Rx meta data is available only from long Rx prefix. Switching between the prefix formats can't happen in started state. Hence, we run into the same problem which [1] was aiming to solve. Rx meta data (mark, flag, tunnel ID) delivery is not an offload on its own since the corresponding flows must be active to set the data in the first place. Hence, adding offload flags similar to RSS_HASH is not a good idea. Patch [1/5] of this series adds a generic API to let applications negotiate delivery of Rx meta data during initialisation period. This way, an application knows right from the start which parts of Rx meta data won't be delivered. Hence, no necessity to try inserting flows requesting such data and handle the failures. Major clients of the flow library like Open vSwitch will have to be patched separately to benefit from the new approach. [1] c5b2e78d1172 ("doc: announce ethdev API changes in offload flags") Changes in v2: * [1/5] has review notes from Jerin Jacob applied and the ack from Ray Kinsella added * [2/5] has minor adjustments incorporated to follow changes in [1/5] Changes in v3: * [1/5] through [5/5] have review notes from Andy Moreton applied (mostly rewording) * [1/5] has the ack from Jerin Jacob added Ivan Malov (5): ethdev: add API to negotiate delivery of Rx meta data net/sfc: support API to negotiate delivery of Rx meta data net/sfc: support flow mark delivery on EF100 native datapath common/sfc_efx/base: add RxQ flag to use Rx prefix user flag net/sfc: report user flag on EF100 native datapath app/test-flow-perf/main.c | 21 ++++++++++ app/test-pmd/testpmd.c | 26 +++++++++++++ doc/guides/rel_notes/release_21_11.rst | 9 +++++ drivers/common/sfc_efx/base/ef10_rx.c | 54 ++++++++++++++++---------- drivers/common/sfc_efx/base/efx.h | 4 ++ drivers/common/sfc_efx/base/rhead_rx.c | 3 ++ drivers/net/sfc/sfc.h | 2 + drivers/net/sfc/sfc_ef100_rx.c | 19 +++++++++ drivers/net/sfc/sfc_ethdev.c | 29 ++++++++++++++ drivers/net/sfc/sfc_flow.c | 11 ++++++ drivers/net/sfc/sfc_mae.c | 22 ++++++++++- drivers/net/sfc/sfc_rx.c | 6 +++ lib/ethdev/ethdev_driver.h | 19 +++++++++ lib/ethdev/rte_ethdev.c | 25 ++++++++++++ lib/ethdev/rte_ethdev.h | 45 +++++++++++++++++++++ lib/ethdev/rte_flow.h | 12 ++++++ lib/ethdev/version.map | 3 ++ 17 files changed, 287 insertions(+), 23 deletions(-)