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 89E7C43A1B; Mon, 5 Feb 2024 14:15:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 160AC402BE; Mon, 5 Feb 2024 14:15:02 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2052.outbound.protection.outlook.com [40.107.96.52]) by mails.dpdk.org (Postfix) with ESMTP id 27D5D402A2 for ; Mon, 5 Feb 2024 14:15:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JJ4ac2FziBoIfm3g/18rVqCsOQl2QnWYGbzcvyytygQkAKtIxJvGfbBOu1i/reo/r7lmVdASxRhYL+GUllFWrCqiMH4Ktom2NFTPfM+PFKllx2bqZq2gh8Fa1eEZx8/xHXCt26e5cHT7Y9wbnA0R2d6rg9ZKqV2roMRSpdivUcuYVco/BREtJtx7yCEFMozP0f8KuTQkgTW4PsCMMWfjBajKA+5bCIwTc+76+9lHjhCgv3EOOQEfvHnAaPzjBIypD/zdrQvH75IncijFAzOR5cbivupVZnL7jWSIsE7chR/erREjoeEjZN3gyXYoaQF1DLHbOmu8iJITYitv+AJLKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oHv+KoGzmQBf6JdKwpLYBxPsWvZnm8a7QFcXAIym/Nk=; b=Wls8T/4BAaHT3m66W+rCgiiqvVoI4S3nJo5pSTvegTithsBu2V0417nnVuQokbTbhdEpliSA5xO8f+RHyQgsMitMSsdh6/r+Hzj4JJIUl2XjVzqHfyiY1UrIaXptyMHs1uyrxws/eUsn4W9+NlkYKQnH28Eckb5NgwVODTcIGFlQbXQKZi3vNbpS7F9Qx0fxH33swjb4cn6Cma9eHuGTNHxrNyIdtq3iL/qaHKwruDPfXGVO0f5G37XUVyJ450Y+rdrBEqPK0/bLgFDQ73gxrNhIk3Ejo+mi37vcegR7An0QHXkaMgCBhFUnhDBuJf7OuID+TMkinkIhyeuotbWhHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oHv+KoGzmQBf6JdKwpLYBxPsWvZnm8a7QFcXAIym/Nk=; b=IuLrCumUKrJyVwyLUolWYvlFBV6R7S+PffKvYyn1alVCpVVKpmJnZSJXs37zWaq/gqV3bpe+SSmoK8tp5Ejy53bimoGg7LstJSHV3PBVLLgkKMdM1BTElQVdTcs8j3Wt2QoiCsiPv90ihz/bah9k2oNK4/8R89uny8h9MIbB4bZERmlMk+RCp2FS6YhwoUIdDra+4u7nZ7fL5BfmIDFU0ujtzsYvbrzPN2VS+SDBIA+uFUa/UkhvFOyKplfRZjNCdqXfdwmQmQdfHHtDea2xkpGc3Erbo7V+GjKZLCZhJ4Wzji0L/R+H2GmwEI3lcAwRk4QRRymrZN86WceFoZzhtw== Received: from IA1PR12MB8311.namprd12.prod.outlook.com (2603:10b6:208:3fa::12) by SJ2PR12MB9085.namprd12.prod.outlook.com (2603:10b6:a03:564::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.14; Mon, 5 Feb 2024 13:14:57 +0000 Received: from IA1PR12MB8311.namprd12.prod.outlook.com ([fe80::708b:e498:d9c4:94]) by IA1PR12MB8311.namprd12.prod.outlook.com ([fe80::708b:e498:d9c4:94%4]) with mapi id 15.20.7270.016; Mon, 5 Feb 2024 13:14:57 +0000 From: Dariusz Sosnowski To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" CC: Slava Ovsiienko , Ori Kam , Suanming Mou , Matan Azrad , Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" Subject: RE: [PATCH v2] ethdev: fast path async flow API Thread-Topic: [PATCH v2] ethdev: fast path async flow API Thread-Index: AQHaVCjsax4yQWgCKUeR8Y62ewfufLD7nr6AgAAf8DA= Date: Mon, 5 Feb 2024 13:14:57 +0000 Message-ID: References: <20240130181751.1425388-1-dsosnowski@nvidia.com> <20240131093523.1553028-1-dsosnowski@nvidia.com> <2171757.irdbgypaU6@thomas> In-Reply-To: <2171757.irdbgypaU6@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR12MB8311:EE_|SJ2PR12MB9085:EE_ x-ms-office365-filtering-correlation-id: 14bc26cc-ec97-44b6-4693-08dc264c7346 x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cnmNMF25xs95HobTg8Ka59/sjpMD84e0rcVITz7qmfN/vk8eUGsI79s6s76CybBXOEwStS8MQ27j7aPiXKYZ5mTHIESBqRjVzfgXNvcH5kndU4+rnwWOenuWpNgi9RFYc0uznP56C+ovskst8JSEey2Ja3OUtDv4CxhSZ2tB+benQHkF/7QeWoOLVN994PGYSVEw1IUmt1UhMyWxL1SBtiMAFfBM065EISlB83/wo2lE6DoPBDhR3s/JONrXoJFOsoXfaGs6bkeGS4wVOr3BbK4iS800VRjLHItlpwYKN8JWEx7GwDQnQGCOC4w248BjJJocl8CKcb970x5D+HuxNwIHfiT1Z35+xkaew17V96Eg+hqj08t//NFMTTDX0CqqpgOLlCuJar3f1S1ce2CYlvKx9Uanalq1GCOF5zMoShsiY/gVwiXMVXiJgdFZ1eNWi93SsM/lH4hIDUxapN2xG3FZb6YG8hYsLQ260fLHjVxsoNgxkuPgVkBTRg+awK3rAcV+8PVftNUrdXCDAJvzr6xvWhraaiNgpvWdWIHzad2lIfpwwKsHwt9Ibo25CBNu4xWk65xyxWW8L9aM0Ooyfu7tijCIcJydKCBN9mclSvVaTt4VSJYBpH5EILWF79BV x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB8311.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(376002)(136003)(39860400002)(346002)(366004)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(41300700001)(316002)(5660300002)(8676002)(66476007)(8936002)(4326008)(52536014)(2906002)(76116006)(86362001)(33656002)(66556008)(66446008)(54906003)(71200400001)(6916009)(64756008)(38100700002)(66946007)(53546011)(122000001)(55236004)(6506007)(478600001)(9686003)(7696005)(83380400001)(38070700009)(26005)(55016003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?KrQ1yYdJyDjGlpmXxRiVtmODBdxJnetdEJ83Vu141ymfPMt+JU99AJjmk2Pk?= =?us-ascii?Q?tW+Xm0jJ9ehhqw0780uBpQg+hQJ1GFoKFOSNIfHryISs6DHWNf0nfEfK4/7o?= =?us-ascii?Q?4rlGlYsks1acitwm3AQOI96dEI3So5btDY8qxPAd0FJO5Y73dgxH3Wou3rJi?= =?us-ascii?Q?Ev22OxQkpK09KLAqhI3OZYmAZLS/ojbFTMv8wFm7h6DrcLQRSmdu/BqVRaMr?= =?us-ascii?Q?13Jmdr2p+lYS8ND0hJqzbPpDyO61Gi/Rn9GsHh+N8PgQmxk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FgZpECDIrjEYBf5KgQ+gBDKzCJaZUan2RTdvyZtFkNQClH?= =?us-ascii?Q?DawS+BBQwef1Zq/05LJzbXngJnP58Pof/uwE9vEoDEK/MXqWlLCKtHi5e4yV?= =?us-ascii?Q?+nKs9oCV+yRP+QNHoGxIjK5fvthnrLfvMcm4iQK9sx4+NM1i/DbaXlPnH95N?= =?us-ascii?Q?1C4h2tIy8xr+03znDOptW5Li/sGUKccQ5PK2Nhw6JLvqVBYQYEc2SH9foVvT?= =?us-ascii?Q?q+5CwkxYwcykxAbNAMVjG0RAWefR7Puw2sBfAxlGGgWRGLsqVvMbryTywY/o?= =?us-ascii?Q?xMg+0JhE344jNlb9pZdEO7i4bJ24k/qALgVSg7HE2djn/YUc5g6rKWeg+veB?= =?us-ascii?Q?rVcy/4DXaWTSPRZiK8mTJKXp07ft+ymj70NHwtOSxjSzpikBxTAdbf0ezrpR?= =?us-ascii?Q?ZAxYLRw1Fn/dDW5Q62XNoYyFKTpI58DnW4kL1mUH?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB8311.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 14bc26cc-ec97-44b6-4693-08dc264c7346 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Feb 2024 13:14:57.2539 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ZaUqBFmA1XXTI8CUpXHEzcJNl2sbiLHYtpotiCkvJlBAWuehMoNzqLVSkzuO8BnATBjtqkjqgATQWQdPEKnS0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB9085 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 > -----Original Message----- > From: Thomas Monjalon > Sent: Monday, February 5, 2024 12:08 > To: Dariusz Sosnowski > Cc: Slava Ovsiienko ; Ori Kam ; > Suanming Mou ; Matan Azrad > ; Ferruh Yigit ; Andrew > Rybchenko ; dev@dpdk.org > Subject: Re: [PATCH v2] ethdev: fast path async flow API >=20 > 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. >=20 > 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. Right, proposed design is based on what happens in Rx/Tx datapath. I think it's worth mentioning the commit. I'll add a reference in v3. > > 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. >=20 > How are we supposed to enable RTE_FLOW_DEBUG? I should document it, but the idea was that it must be explicitly enabled d= uring build, by adding -c_args=3D-DRTE_FLOW_DEBUG to meson options. Do you think doc/guides/nics/build_and_test.rst is a good place to document= this option? It would be documented alongside RTE_ETHDEV_DEBUG_RX and RTE_ETHDEV_DEBUG_T= X. > May it be enabled automatically if other debug option is globally enabled= ? Do you mean that if buildtype is defined as debug, then RTE_FLOW_DEBUG is d= efined automatically? I think that's a good idea. > One comment on the code style: please compare pointers explicitly with NU= LL > instead of considering them as boolean. Ok. I'll fix it and I'll send v3. Best regards, Dariusz Sosnowski