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 E685645BCC; Wed, 30 Oct 2024 22:41:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 510DE43465; Wed, 30 Oct 2024 22:40:20 +0100 (CET) Received: from egress-ip11a.ess.de.barracuda.com (egress-ip11a.ess.de.barracuda.com [18.184.203.234]) by mails.dpdk.org (Postfix) with ESMTP id 84FF243419 for ; Wed, 30 Oct 2024 22:40:06 +0100 (CET) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03lp2173.outbound.protection.outlook.com [104.47.51.173]) by mx-outbound11-85.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Oct 2024 21:40:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jRPG4SrjAjnqybEARhCP9jasz6Da4A14P9IK73U5lOCg8FTBYh6692Myg7e92DUB+mj+deQ3Y7b9LFvEYnJMJhOWSbjNCbvkX78MSlFgguDjJe9viN9Ak1PJIaWNOyqGaNmsBzkbkzGHRUoak8EuhIKYwkXAXLNn++oH5Y/LzuihhdsWMnrByPtMnH63WUGr3KblsA+O2JBFnag2oR2Iv4Xr3CrtoIugubnYuWb2ZSgcsxncYTFSes6R4ffoA3F2yXNH8m9wgXODfL5pyylBwn1GiTCbyFVPVKWiK9gQpxJRt6+2RRMR9o+8F9pCsrCdN9ngcV0kCz+NWKH/IzidbQ== 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=GBS6K5whTPU4vzjllk6vGeAlHo3OUgLLJT1RB+/k/I0=; b=MT4iix+MgH+WICANiRsiLo37Ter2EiDnEyxe435A2n3skQsZypNs73NHNq0PaUqLW9zJsvC/1YIuOzIpbOeIaab5QiyKg1A3GQACwJ6h3/88BWFBTNFbeKsHD7ScaDE+Xw8o3W9+hYtQ+OVzb7tqb0MNkkbXHyWEVRk1IiNerSiijoQCq0ZdUkjSqXIpm/OQkVYJIreOBT0zOLZrFkehccxJaTEXNsLOHvym2x4z9H2+oHbFwjrE6wJsZ70lbXcwm5+x+mRXpqLmjhWSvNfXG6Y39eKBGR6kRP225fiGJlQ546k0MYMP0DF4tkZzF1gX+3flCEUgEjay/Y90+EiTSA== 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=GBS6K5whTPU4vzjllk6vGeAlHo3OUgLLJT1RB+/k/I0=; b=MfgfcqOhI0RmYavRFiqh1rnV3FeKThld4nF7wMWThJg7wD4M8e8g4uU/58wN4sYvXr9xAGuww4xKZDPvJMFtyxmbs0qA1x3f/17JzN+wucJTWhdpscp8RrHQ4ujA3h+5BzTQxJkdyVXEH42UZgrxEGvs7DgqbfqFBqGQnms+ppQ= Received: from DUZPR01CA0008.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c3::17) by AM8P190MB0945.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:1d0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Wed, 30 Oct 2024 21:40:02 +0000 Received: from DU2PEPF00028D13.eurprd03.prod.outlook.com (2603:10a6:10:3c3:cafe::e3) by DUZPR01CA0008.outlook.office365.com (2603:10a6:10:3c3::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.22 via Frontend Transport; Wed, 30 Oct 2024 21:40:02 +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 DU2PEPF00028D13.mail.protection.outlook.com (10.167.242.27) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Wed, 30 Oct 2024 21:40:02 +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 v5 11/80] net/ntnic: add action mark Date: Wed, 30 Oct 2024 22:38:18 +0100 Message-ID: <20241030213940.3470062-12-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241030213940.3470062-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241030213940.3470062-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D13:EE_|AM8P190MB0945:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 997d449c-aebe-4d52-3d27-08dcf92b6933 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-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JfF+/uMLunOrBDmQUIu9TWPLtGAqhNrR9UJDN/20VbPUYpkPfr?= =?us-ascii?Q?wHIR2Y03JPoPKEaHwSo6cZoFBOR+z3dfA4X1ETZu30sd+eiKqlTKibrj6RUH?= =?us-ascii?Q?Lekwx7DGcWb/chhhLVJPOhdRQnobe6hgHL/T0LZRzCqCXL3LaITJdHaG8CXl?= =?us-ascii?Q?OI6JxzJT3BAbvB4oDPcJyAUgYPJ440AOAt8zHIMjPMQJc1QjJqukEdPnpd57?= =?us-ascii?Q?GYpbl67C3MHMxjhkBfmFP2ti9uicVs4bPANMNKceAZsFFW02Y6ALhTGdWRtX?= =?us-ascii?Q?KO4fsVBYAFASEbg26Sb5VUqaA1hvgWvOExUCT40Q5ANzvrSLofsefebgB3J1?= =?us-ascii?Q?16tKC5ypqyMvim+Uh53YB6WhorO9i7MO5KPiXfoxsCsuhj0kZiRZN3kXBTob?= =?us-ascii?Q?hxP/12qraHoPV5FWeCudG7YyDK6mzHuXGe6pp3mJM+w6e/9DQNnyAuQDEAc1?= =?us-ascii?Q?TfDY78dwbEXkhf+y6UZkPuluRQAbzUqMJgOo/C6vgUoq/euCgnQ+oZsE0tq8?= =?us-ascii?Q?yx8GCQ+y8WZ68P+qO6iTMraB72lY4v/hr92hb1EenqgW+7W2hA=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)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: F+Nn9IjE3H5ElhoWt7dtHu0SgvylkX/NvwpXUepx5lBFOetMR9To66f27hyhSowzSwAFahwE4O5H9BOfEpkqpKSl+soEjezBGvyxKJ1hMC4qQrBzeF46wM22ePw3LhhdWb3oQP13NOyetUZ7gFN7DHg5rtIq0wefp03U9EE6rOC2R8j6fEV6VpjDpRFRYJnq9pQarCVuOibAEzOTf2Jf+LVmoBSlP6xADmYa5igJli2KxvmCrCjH1pXxUpjhNvdyPDdcysl8rRwY8Wk9lTDE0bHAAjwNn22/UvoF9YUzdmNHoyxB2FWyEWbcZ218VYJG4WQhTkiIY1W1Nk9csgsHnJkWor/hOtMYt86r5yGww3X4dKJokOcrFC29hSgIM0R92tIwkhMWrGpw76iekux/v8oLK1+lNeUOMxc3p3vZPMHByya5eAeiYjM9zNEOaAw3zAFzFG+ZYT75RxPpUlYMvDjZm/iVRKiJ0bYnnjf85/hBuo8DrLq+gDEPqvzVYYUjXYDvTfK6UChvjAkNW0A5fGpT0YQXXey62meWWoUpRlnexO7esUFz6fnow7RTRzlnun5Cl384mdrq+KwYkodDVdM3p4HOkBINcLkscUDqr/svbU8+VV4sniI7gIQdCcp3ApcGImuY1xQrh/aXHdhAHinCMzo2AP8I4IZbmJU7GtQ= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 21:40:02.0987 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 997d449c-aebe-4d52-3d27-08dcf92b6933 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: DU2PEPF00028D13.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P190MB0945 X-BESS-ID: 1730324403-302901-12800-43450-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.51.173 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoZmliZAVgZQMDUxzcTcJM3SzD wx1cTQKNnCJDHF0NzI0jgp2cAwKdVUqTYWANQwwKBBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260091 [from cloudscan20-80.eu-central-1b.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 f4d4c25176..e8b31dbdd2 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