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 848A745BA3; Tue, 22 Oct 2024 19:00:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9EE9410D0; Tue, 22 Oct 2024 18:56:57 +0200 (CEST) Received: from egress-ip42a.ess.de.barracuda.com (egress-ip42a.ess.de.barracuda.com [18.185.115.201]) by mails.dpdk.org (Postfix) with ESMTP id AA2B540E2E for ; Tue, 22 Oct 2024 18:56:40 +0200 (CEST) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03lp2110.outbound.protection.outlook.com [104.47.30.110]) by mx-outbound40-26.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Oct 2024 16:56:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IqBSPfVauZ4PSBKjsGPGa7TpkI1oQ60Hi8BkzTQVdHN+dIu/ae52a8Xxb/QYjsPwTI9dTxsTDgozGH63OrpxUaouNxhuQjSFwr3pkA5n/LZAjwcM7v8MBYE0/RBx7SWTXhgfc4MocDHDSM97H5Z/zVNqKz0pjZGc96qAGLz/ylik+TwMFfAMHkw3X2aNERmbmJQq7mKkYhoHeIYHhJZIhQhlukid6y5drGhgUcjHz+v6kjxx21MffIJkdadD+bKvDlbcipZkVfLxPsh+ngzzk1WTm1TpxlUDOV5DmneO4JOljtafEg0KBoL3y4MpAjWLRFIZAPHxW4GEi9Duez8xbA== 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=pDnNHzFmP3gjrDde/IbPadvYXZ/RukS+BWdu/qHrzY4=; b=eNe500P7BleEFZWFVXxEmpGhQ5GqcKd/ENb/Sv+L/iAnRXGZXiYS3PGICOQAv2lXEpfOnWTwKYjmr3WF3gyjnUJk3VtfkD7kEuJcBeWklDlrWOk95b0a/CZEtdUaxjHMh4n2Vq5QjfNn7bPkkxexHUR0qQYBqyw/GsEDuVGPZHUf/Yrfi1/fQ6F5GjZZQLAizvD+mljydWEdkUK/soESiGAg95WprlJcm7Ey/rQUElP/L6nyWDLdhMERudjOoIcMxjy1ByLZqubKma3Bx8Id7rrQVXwE15o/E2KRoYiex4Nv9aWO0YyXX1EATuP8itJIyEj5nFJoKdY5cLpVEwdtBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pDnNHzFmP3gjrDde/IbPadvYXZ/RukS+BWdu/qHrzY4=; b=KfuWgIbJFljnygKikJunHJZnM/hUYeFAUKcmFy/N+UeyJwdvlD4aMbzAOwI4mBQuh97KSkRctv6YX8qlguER6qLx4K9nG9NrQks35yj0JkPTQ8vko6QqHo00kawVaYu5yPd7eA/XgnBZfsURKGCegG1RgyFOT0+25+ihBwJNJlU= Received: from DB9PR06CA0005.eurprd06.prod.outlook.com (2603:10a6:10:1db::10) by GV1P190MB2020.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:5c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Tue, 22 Oct 2024 16:56:12 +0000 Received: from DU2PEPF0001E9C2.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::db) by DB9PR06CA0005.outlook.office365.com (2603:10a6:10:1db::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Tue, 22 Oct 2024 16:56:12 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by DU2PEPF0001E9C2.mail.protection.outlook.com (10.167.8.71) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Tue, 22 Oct 2024 16:56:11 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, stephen@networkplumber.org Subject: [PATCH v2 11/73] net/ntnic: add action mark Date: Tue, 22 Oct 2024 18:54:28 +0200 Message-ID: <20241022165541.3186140-12-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241022165541.3186140-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241022165541.3186140-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C2:EE_|GV1P190MB2020:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: c9c980bd-9ba8-474c-ed3d-08dcf2ba6f29 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?mvbevJksT1teGPvHW2hK87ambtc5gQjTvR4mImeWRfcFoWt5NFo/e6MAT4O1?= =?us-ascii?Q?1VoTPBirEmjtYZTBRQR42gBhHZ0W7QK2tDlmSP17iVYJl1HlxJ863b70iAUK?= =?us-ascii?Q?FEuahvBkeQdebGWLZfv5IcYTd5JeuFm7h+ILcg4D308KRdhi+X+kEUsA1nvc?= =?us-ascii?Q?IYiAayVPQKbVm2Px6zlJUpvvos/3Z51eiU81dsdcbqrlPVRPxUIiYn3tTzX8?= =?us-ascii?Q?Xh21jvEby+JFO6ELUFbAFuW8zCp7nQNn6ZeUME+e7l9WJov7plvDElB7jMb1?= =?us-ascii?Q?++tyeKVIicGIRbcKY4bBM2EqsB5myA0j9+/lahx3sP7ZEQSEVIZbkgPlIFvx?= =?us-ascii?Q?2jj2vqXhO7nvFw8xxuA3tQUrJKEoAoPmv/019RG+/mQh4sdDB9Of0LRIjRU1?= =?us-ascii?Q?DKudMVUoAy51JjH11H0s1mUteng3XULJy9HMMomZInwKS17NgGtpIUhqzcbs?= =?us-ascii?Q?ZhSmitzX06Ep62Ej5yIm65i0mx3E8dpyvsB6alzgbvPB/4gtGIEiKRL7MmgS?= =?us-ascii?Q?Ioh701AvPpFPzuTSoipaXDz7Rc8TbVAcoDqUCrb40TyeLC3Vbnxa+0Gav/EQ?= =?us-ascii?Q?ja1iz0WBOfq40O3Ayw4Z4lfx+C+TA+TyFjdqynWwWGMszxibJafNwqpl79me?= =?us-ascii?Q?ZpMyVAxyc6gndjRepLZ2sotwbRse9XqsTSH8hI1dLixOI5L3AsCQQU+fC0sC?= =?us-ascii?Q?AxV579P39z40QiW6ytr1KBvZAzDxRjt1HTQPvufU4FJfPlUi58iq4UNik46B?= =?us-ascii?Q?Bqp5j9S9COHH3DeVCjOiu7CfFXo4898KpaNuwRIS605Eqp1VDaV7Jua6LLHf?= =?us-ascii?Q?IRR0EBLjTHqMOZeHXyrEjZ5p5SJg5ATpEpuEF214M+G5sbSAiJgojGbDOtpj?= =?us-ascii?Q?J1Z/t3hyqKoCFTj0bVcAliQnWNCLOfHwyO4qqgNoyOB239VtfyuFqIvLaF8P?= =?us-ascii?Q?s99XaO4RzadTf3uk/WSkYRuq7l8QLS9T85jXaksOzMbKcSF5mz8V2Xz8sIHQ?= =?us-ascii?Q?m+ppwmWRzw/6qOsxLW10bBrNlb1joaxc08OJ4Y6oW76dZgAToBPkbPuT2QJq?= =?us-ascii?Q?NvJ9c/voH8dWSb7pp/S9YFgU2tOwl7/r+r6RL6Do8gKuu1oYKn65JCvshVww?= =?us-ascii?Q?s5Gro4mir8OabF3Ezm3Aw2Q5fcXlJmnKsbEsOFqdGmdSGM9LoyxesDkL0V/d?= =?us-ascii?Q?/gdb9bc5F6S62IazeYUqRg7EtVlIf0vkt6kpoKKpvqRk7RFMry2+bnPo3E+z?= =?us-ascii?Q?NGPVoZKRb61gDoWDzhpzKdVzvJogSfpheAWLI+NNTQ1lQxhQcO+VAmK5zoCZ?= =?us-ascii?Q?DZU2TF2AO5gZzmegFzvEvEgThLlw2n3GIGCekkgRapbagluCw4dfFwfTecab?= =?us-ascii?Q?MjyX6JUGi99q+dw2wufA/fPvI7S5kG7ShQIfQiziEZjrhoiz9Q=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: qgWuHUeTYiYyJoLgijCFnIZEROzr9JGJsYU3QKEbwxtsuVb1t2+X+JDx39uvdiD0/fbD5DJqrAeydUhFBa3yFRv8p9nPmESo+L9oP6BViFTiaUcoc+QbIJNN7LI/j8MMlZb5TMmMltRnsfAGhit6vZFgNUyqrxQT7FNRnUhoTFQhcZ6EiF0iRY3Iqjez3dqoE2zQy1pKPQZqrd75+x8/2baMx4v2ReULmDyKol9zr7/JsW35O1uFrz7tCVmUR4FqS3l6D+vFY+qysCADXawNGRtVDN1VADH8ZzplJZj/2Ap8Hqka2LOmWyUWvKLXNOukINGyinVQQzQvQwpy3PzcDmrDSkOO1quPe4UB/TcgUmsjrGQ46zocPr8D9nlPUKExGBkvpQpDyLnXTPs7uEtR5SnFSHWs9JWfwVQ4aRzLZ6iFOwgEmQnMF3M3GSFdhzE4GEqlQR6RK3hYlFlAaoSUdLQr4RTWpv0p6jcL44rj5wT6AtnQoyVwb3/oTcSRpp92VE6EbdzZysyFKTVHCNpX+Ri6CS71V514SZND2Zmx/oKLulHT0XtJ5gH7uULy2cfIGB46BHWxmhaTyFcQR9pPsQ+Il73OHtI9d/4Jc80cfp4rBgmq2CvdfqyJ7Du9MxDUD/lA0pfzxjBU9Ax9gLuYL9vum1xb2Q371dgB0/Rz4pg= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 16:56:11.9812 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c9c980bd-9ba8-474c-ed3d-08dcf2ba6f29 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF0001E9C2.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P190MB2020 X-BESS-ID: 1729616175-310266-12659-12981-2 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.30.110 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoZmlsZAVgZQMMXcINUi0dzIMN nULC3J0iI5NdXQzMTYMtXcPDUtNdlQqTYWAB63Pr9BAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259902 [from cloudscan12-62.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 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 Add possibility to use RTE_FLOW_ACTION_TYPE_MARK Signed-off-by: Serhii Iliushyk --- doc/guides/nics/features/ntnic.ini | 1 + .../profile_inline/flow_api_profile_inline.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/doc/guides/nics/features/ntnic.ini b/doc/guides/nics/features/ntnic.ini index 5b3c26da05..42ac9f9c31 100644 --- a/doc/guides/nics/features/ntnic.ini +++ b/doc/guides/nics/features/ntnic.ini @@ -17,5 +17,6 @@ x86-64 = Y any = Y [rte_flow actions] +mark = Y port_id = Y queue = Y diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c index a3fe2fe902..96b7192edc 100644 --- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c +++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c @@ -386,6 +386,22 @@ static int interpret_flow_actions(const struct flow_eth_dev *dev, break; + case RTE_FLOW_ACTION_TYPE_MARK: + NT_LOG(DBG, FILTER, "Dev:%p: RTE_FLOW_ACTION_TYPE_MARK", dev); + + if (action[aidx].conf) { + struct rte_flow_action_mark mark_tmp; + const struct rte_flow_action_mark *mark = + memcpy_mask_if(&mark_tmp, action[aidx].conf, + action_mask ? action_mask[aidx].conf : NULL, + sizeof(struct rte_flow_action_mark)); + + fd->mark = mark->id; + NT_LOG(DBG, FILTER, "Mark: %i", mark->id); + } + + break; + default: NT_LOG(ERR, FILTER, "Invalid or unsupported flow action received - %i", action[aidx].type); -- 2.45.0