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 7532A459CC; Wed, 18 Sep 2024 15:57:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5849C42F09; Wed, 18 Sep 2024 15:57:34 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2059.outbound.protection.outlook.com [40.107.93.59]) by mails.dpdk.org (Postfix) with ESMTP id E4FF942EC1 for ; Wed, 18 Sep 2024 15:57:32 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oJYNdHTwSCpTp77c11WdeGn2rUUhanANyrUmdq5Z7ZtsK5lZbF+mTdp15YYnlK+/MaeInPtxsc9to19CTsXfAbKaFlDqt9soe/vfihGSOx4RKR+9nsGmSwJ9bipiTtUaLmyALUFhzzBlPUY88iolVKirPYuhzvtfq8KuC0nfYx2B4du+ygQgXvmsp45tbxP4J5imVvD7X/TcWCpCb/1u6FYqpEZ/ThtSJS40R4iYVg3ExAsBEnPZ5oZezdGPbU5/ohXCeYvvy62UCFKV7rTwuAsec0DFRMj/w5jPGj0OsPfiw6LTEsTAqXYs/omab2GQD+bUtJ7WuUpxfJe0CuwxoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=FnZ6+RpBsvBUutqvd4KmYIXqTdDuYhsTvPr7c+6GauI=; b=Wvx1IarU1J2P8HrIShM1/PRyLcs1udn1QY7zRnfQgJFbJx3qN8cQTakWb3VZZKkUfZuqh+7lSeufR9AvR0kXnaNkoZsAKg6GyXTfxxgOwH9ZKj6bfjcvaRLovfMu62qDVa4WYdcXP6tZfd9LEo1SVxZF9Qg7/o6bpAln4WmmRlh1fiHy5d42zPuI2bZK+Hq1V4LtrT0MW5zhAgKDINBBoXEpgM70LACen74oCBsiGCUOydmOWN7Rq4Xf9J1FJltDanl4kggQ3JM/l49lzmShpnXQlg2iDHnKwiBhLQ7MrJaSSD3Nrr1e8igqIOZSg0eDusXyMUKzdvEut6IWkro7Yw== 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=FnZ6+RpBsvBUutqvd4KmYIXqTdDuYhsTvPr7c+6GauI=; b=MR9CO7YdNHKjJx2oNLqkIkTOaPUHx2Y2wBQAVr29SthyHjIjqLvH2OQ0VVAe5yw0oK+oKlMFoq8VIg54w3anMBb/HUKByYmwNOhDJFA/EFZjAc5pOUZ+Kp+X902Fi8hgVDMBfxvXUUBoRh4EE1Z/63bybq4MFDNRcreZD45/S3U4GIBTNvAzPDlhJKV332w996ZTLp8ld/MTDtWUhrI6or1C8q1azNUIbq0JPvTYRg42yejF2qOWkIzn2XVCklIx6QEWEtitlFdBeebRGkDYxjh40L/1kyLy4Xdl43g9InWo9J0e/ytK26l2c7F5hDUqlDIXf0mD7Hg0XE5DEMzKdQ== Received: from CH3PR12MB8460.namprd12.prod.outlook.com (2603:10b6:610:156::15) by PH7PR12MB5998.namprd12.prod.outlook.com (2603:10b6:510:1da::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Wed, 18 Sep 2024 13:57:30 +0000 Received: from CH3PR12MB8460.namprd12.prod.outlook.com ([fe80::2e9d:7265:3b84:59b5]) by CH3PR12MB8460.namprd12.prod.outlook.com ([fe80::2e9d:7265:3b84:59b5%4]) with mapi id 15.20.7962.022; Wed, 18 Sep 2024 13:57:30 +0000 From: Dariusz Sosnowski To: Slava Ovsiienko , "dev@dpdk.org" CC: Matan Azrad , Raslan Darawsheh , Ori Kam Subject: RE: [PATCH v2 2/9] net/mlx5: add flex item query tunnel mode routine Thread-Topic: [PATCH v2 2/9] net/mlx5: add flex item query tunnel mode routine Thread-Index: AQHbCdE/px4ke5QQN0KT42k2e6q+xbJdkbyg Date: Wed, 18 Sep 2024 13:57:30 +0000 Message-ID: References: <20240911160458.524732-1-viacheslavo@nvidia.com> <20240918134623.8441-1-viacheslavo@nvidia.com> <20240918134623.8441-3-viacheslavo@nvidia.com> In-Reply-To: <20240918134623.8441-3-viacheslavo@nvidia.com> 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: CH3PR12MB8460:EE_|PH7PR12MB5998:EE_ x-ms-office365-filtering-correlation-id: 5f1c3ff8-fb86-44a4-fdff-08dcd7e9d650 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?OGHaIK2uUSIH+mysLIikR/3e6vi16/xYeeUVWDBZ84yQsmefPCUDMYl8zOPR?= =?us-ascii?Q?sWnwERVn9KTvla42o/czGT8cHeHiPvA6exJ6CIfktMzLOy5s447WsExrjnMr?= =?us-ascii?Q?KOUC6dKow47SBxN39efDLD7YoWpSL6bO7/ouXZKDDCjfFjNbwokCFnDUK0S9?= =?us-ascii?Q?8b+0OHpJRHR0b/utBlSOD+1R3MiGmTGse14LkqSH+/r+TqYoQ35bQGjJv9Qx?= =?us-ascii?Q?ejGVHfPnQzFSeymgOu0JQOhsUD6y47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BzlwvxLZ4/QETAM239mFR+dKeV+72hBD0B1KyRRQZZRYWNI7u6?= =?us-ascii?Q?nRcEetw+ajvJxlh8MsMytSw+/3q9g2CGwpEMUzQ50+QS0VBXka/jcRLBdL8m?= =?us-ascii?Q?EDc68tqmnXkJmwvwHUgAveKQpm+fTcB0elBiMuWtIg5F52Vu/fEMDkBId+Gm?= =?us-ascii?Q?Ihp65Jv0DrODSfsmUR2pb8DAWQfsFF6pQ67KEAa3bswNXt0GazRIGfLL3Y0l?= =?us-ascii?Q?OUefH/JWTAJTtzsK+/zl0tDLFR1FshBRpHbtm1uhRVpo78/1vA=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR12MB8460.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gG87zxSalOIZSVjtPYUdDEMS0O1F2JQ2hWVr++lSBFshrNxVxwO/5kZazOZJ?= =?us-ascii?Q?Cy1fe/5+Vmbqw/VjkKaFN+LSEpC76Zh338OSNdKrGSMYTjrLdMvLzbQoQCmK?= =?us-ascii?Q?kYZVo59/8R3umoAMAthfdBQcBdX1djeJBHN9QTUwvTOFf1p1OsFkS48tOLEC?= =?us-ascii?Q?kg4eNVWREL7s8eWeVe9tNnyHhgOJyZYDNcZuvnzJAcYJW5AawKLYiaankvBt?= =?us-ascii?Q?T0C+BHTZibC4oe/kH7vTXnGC8MA+cpcopVKEXjQlYTm66eBpw5z5yz44kNIb?= =?us-ascii?Q?GG8KphcvaQfz1CjAWgu3SbQ+TXJz2BXk0d0yNmA14NGNhOkEZQwiszdBZHn8?= =?us-ascii?Q?LdhA33AfAClLHS4ItTNqGCW0n0DlopuTR1QczweEpayBfV/sY6JVcuY7iq76?= =?us-ascii?Q?nPhnM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-ascii?Q?9arz2qoEegTXIInvTMfsTgbaC076/6thYbBb/ZgA8U5mp5hZFThGLSTkfe0i?= =?us-ascii?Q?yRNULllDsisN0odeYKxG7dtLYQZ9M78EC1QkVuxLQBbW5eBxSbqMRP8LTEmi?= =?us-ascii?Q?TFAIjykGwxRAbsFBjHr3Xj8x7UJbj1YFTqOsq7b578fQk2m6tcP5T1ngWK2i?= =?us-ascii?Q?ucJHjk8MUiZYW9ic/+/7hychMwNazf1ugM7BqciCmZE8MEVWsbgpUc5kKoLt?= =?us-ascii?Q?e1YTTyODNmX/uBRFqxbNT9T7QhWqSP0l4BqdZgAU?= 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: CH3PR12MB8460.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f1c3ff8-fb86-44a4-fdff-08dcd7e9d650 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Sep 2024 13:57:30.2597 (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: 0JIaVW1p6aancZDqoT4x+fiZLNsGUmmYbJnqFiMBQhAy0Og3LhubQnsXyGlDigCOjAI03YDYPVWXKEErqpXs0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5998 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: Slava Ovsiienko > Sent: Wednesday, September 18, 2024 15:46 > To: dev@dpdk.org > Cc: Matan Azrad ; Raslan Darawsheh > ; Ori Kam ; Dariusz Sosnowski > > Subject: [PATCH v2 2/9] net/mlx5: add flex item query tunnel mode routine >=20 > Once parsing the RTE item array the PMD needs to know whether the flex it= em > represents the tunnel header. > The appropriate tunnel mode query API is added. >=20 > Signed-off-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5.h | 2 ++ > drivers/net/mlx5/mlx5_flow_flex.c | 27 +++++++++++++++++++++++++++ > 2 files changed, 29 insertions(+) >=20 > diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index > 869aac032b..6d163996e4 100644 > --- a/drivers/net/mlx5/mlx5.h > +++ b/drivers/net/mlx5/mlx5.h > @@ -2605,6 +2605,8 @@ int mlx5_flex_get_sample_id(const struct > mlx5_flex_item *tp, int mlx5_flex_get_parser_value_per_byte_off(const st= ruct > rte_flow_item_flex *item, > void *flex, uint32_t byte_off, > bool is_mask, bool tunnel, > uint32_t *value); > +int mlx5_flex_get_tunnel_mode(const struct rte_flow_item *item, > + enum rte_flow_item_flex_tunnel_mode > *tunnel_mode); > int mlx5_flex_acquire_index(struct rte_eth_dev *dev, > struct rte_flow_item_flex_handle *handle, > bool acquire); > diff --git a/drivers/net/mlx5/mlx5_flow_flex.c > b/drivers/net/mlx5/mlx5_flow_flex.c > index 5b104d583c..0c41b956b0 100644 > --- a/drivers/net/mlx5/mlx5_flow_flex.c > +++ b/drivers/net/mlx5/mlx5_flow_flex.c > @@ -291,6 +291,33 @@ mlx5_flex_get_parser_value_per_byte_off(const struct > rte_flow_item_flex *item, > return 0; > } >=20 > +/** > + * Get the flex parser tunnel mode. > + * > + * @param[in] item > + * RTE Flex item. > + * @param[in, out] tunnel_mode > + * Pointer to return tunnel mode. > + * > + * @return > + * 0 on success, otherwise negative error code. > + */ > +int > +mlx5_flex_get_tunnel_mode(const struct rte_flow_item *item, > + enum rte_flow_item_flex_tunnel_mode > *tunnel_mode) { > + if (item && item->spec && tunnel_mode) { > + const struct rte_flow_item_flex *spec =3D item->spec; > + struct mlx5_flex_item *flex =3D (struct mlx5_flex_item *)spec- > >handle; > + > + if (flex) { > + *tunnel_mode =3D flex->tunnel_mode; > + return 0; > + } > + } > + return -EINVAL; > +} > + > /** > * Translate item pattern into matcher fields according to translation > * array. > -- > 2.34.1 Acked-by: Dariusz Sosnowski Resending the Ack for each patch separately, because patchwork assigned my = Ack for the series to v1, not v2. Best regards, Dariusz Sosnowski