From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9CD8543A77; Mon, 5 Feb 2024 12:07:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 681A0402BE; Mon, 5 Feb 2024 12:07:48 +0100 (CET) Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by mails.dpdk.org (Postfix) with ESMTP id EC714402A2 for ; Mon, 5 Feb 2024 12:07:46 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 5D964114009C; Mon, 5 Feb 2024 06:07:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 05 Feb 2024 06:07:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1707131266; x=1707217666; bh=RGNSv68gRRin4lc6Nb3XFXVV5mccHbY40W1Idl/AM94=; b= sZ/3dbF651f5Fa1Jll06d054fWXUiIcG1RRF9MeESNUDCmW9fuvAeiDqThrEcZbl Ksml0JDLDAi6HonNvceeedkXx9t8f1oTYQ4YvSiyTodKiTsCKKLp9FBu+mrQKeft LXcJHGpR7P0gC5dhTjqNWpCx+y5EIrf54bIsBvHRNPxGYAizm63vJ0JtnEpjHPTU 5/78KUY/Krn9Xnigom42tc96oGGaUAwYKuvrBUzxFBJ/Vqg10wZ3LUHAoOtdiE8a 58yB0ZmnRgeVxTIed1OU0DRg6T8lbge3SJuQeteVTgwYYj15oSUORsa108cXA000 T5t14dmcQWIiq0Knpu3JYA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707131266; x= 1707217666; bh=RGNSv68gRRin4lc6Nb3XFXVV5mccHbY40W1Idl/AM94=; b=c jXHyn2u/58klt6j5BzJ043y+Nao7P/pF2TuNirUyAS9cODPNe61bquoaD+J8xxQ5 eVDGoD+PsEL6Z3sdwb62V9rBBXXNjMyW4i7EUzSX3GeQnf6OIrBHH0LIXRYBnC00 XBoZ9HtL8mmT/PWF3ZZD4KmuMbhf6XBgM9tDX2/EvUziC9kimSgrOte4LxbYT11X OSGGtDwCm8sT5YSmr2JKDkzgC8DkiqD/Mr1p47UU7pSnBeINGKfBq7YedwbGSSE3 ZriOWR76BhcgrZoLyhqt3K4I6Jm4pZn8FmqrMXI4ox12C8OuBlhHjMRZcAwcRncP y+3KY47dKgKepflTeyG7A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedvtddgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Feb 2024 06:07:43 -0500 (EST) From: Thomas Monjalon To: Dariusz Sosnowski Cc: Viacheslav Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad , Ferruh Yigit , Andrew Rybchenko , dev@dpdk.org Subject: Re: [PATCH v2] ethdev: fast path async flow API Date: Mon, 05 Feb 2024 12:07:39 +0100 Message-ID: <2171757.irdbgypaU6@thomas> In-Reply-To: <20240131093523.1553028-1-dsosnowski@nvidia.com> References: <20240130181751.1425388-1-dsosnowski@nvidia.com> <20240131093523.1553028-1-dsosnowski@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 31/01/2024 10:35, Dariusz Sosnowski: > This patch reworks the async flow API functions called in data path, > to reduce the overhead during flow operations at the library level. > Main source of the overhead was indirection and checks done while > ethdev library was fetching rte_flow_ops from a given driver. > > This patch introduces rte_flow_fp_ops struct which holds callbacks > to driver's implementation of fast path async flow API functions. > Each driver implementing these functions must populate flow_fp_ops > field inside rte_eth_dev structure with a reference to > its own implementation. > By default, ethdev library provides dummy callbacks with > implementations returning ENOSYS. > Such design provides a few assumptions: > > - rte_flow_fp_ops struct for given port is always available. > - Each callback is either: > - Default provided by library. > - Set up by driver. It looks similar to what was done in the commit c87d435a4d79 ("ethdev: copy fast-path API into separate structure") right? Maybe worth to mention in the commit log. > As a result, no checks for availability of the implementation > are needed at library level in data path. > Any library-level validation checks in async flow API are compiled > if and only if RTE_FLOW_DEBUG macro is defined. How are we supposed to enable RTE_FLOW_DEBUG? May it be enabled automatically if other debug option is globally enabled? One comment on the code style: please compare pointers explicitly with NULL instead of considering them as boolean.