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 25BA245BB4; Wed, 23 Oct 2024 19:02:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B01AF42F59; Wed, 23 Oct 2024 19:01:07 +0200 (CEST) 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 A4FAB42EF0 for ; Wed, 23 Oct 2024 19:00:55 +0200 (CEST) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02lp2047.outbound.protection.outlook.com [104.47.11.47]) by mx-outbound15-83.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Oct 2024 17:00:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ovKLy/r69/yADlSZzuyzUqpnr/D54zxEm6Fh5axw+aOVArA96WNEJroQWsWNhMUhDTkWLDeED0RX+PbHtJmu1Sd41EwAdlkjo1CiREVwUbl0r02LKYg2qZHtpztVQhvBAUzfKRkpNPXU1mbaie5GLcm83YPOpeqj1nIrF+OYaPmxmrX7vFGDrrxGYrEoG7HbzUkScY0e7/eAIVEKk+mDZ3AAx8+u8ro03BeNGvsfTPHck8d3uTXErpxsaWEUd3wsjWNwSlXADYaPLolUQaPRzCDlYWOT2MfXipOy5ltC6H++CUQw99DQJF+aqw9okN3nB6XLzpT4B5QpVdngtEid6A== 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=A8Zrw5DDVJ18svaN+7YhOVllaDIXiM1CUPT6Ocz3ZHtOav2b0fy5iUnXsAPLVUaDjS69CgoLxsB5XqShB6Nqe6yWesIWEq1nHYoeU7/zZI35SQcSdCEBqrkcqcYxKze3jpeqzxu3ghaPmz5rsTPDBcthRHmzqBrzdzYSeu3kekRwzasZdJ5WK9Wy0o7rT/gnbAJJR+tEn0wrrBwpLC5mzRF8wZfLW9v+/5pibQIDIgDi28/HxT5OfpOKVq5j2ExVh4MAstUmMaBcu+hSwHYCyyemdQpob6fjYe1bokw1WHw4SLaCEZxbXTrGPc1eUQ6CbBoJvbNxeudcq6nlZs53xw== 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=IldE6c7Ine4PanLc/5XhHIg3j85Vbb4D16dVU4OgDfx4yI+jrZ2cxxYYf8eRzfKMUfmytb03j2o1FBzGDm/6trf0seJc6otXdq/WwO0UDWhV1NcjBA3X/o7sBuZF8XBqOLqSvj4BSbN398StbrPtMIPeLFsh9ha93G53mNqb6pw= Received: from DU7PR01CA0003.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::17) by GV1P190MB2194.EURP190.PROD.OUTLOOK.COM (2603:10a6:150:1ed::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.27; Wed, 23 Oct 2024 17:00:51 +0000 Received: from DB5PEPF00014B9E.eurprd02.prod.outlook.com (2603:10a6:10:50f:cafe::b6) by DU7PR01CA0003.outlook.office365.com (2603:10a6:10:50f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16 via Frontend Transport; Wed, 23 Oct 2024 17:00:50 +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 DB5PEPF00014B9E.mail.protection.outlook.com (10.167.8.171) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Wed, 23 Oct 2024 17:00:50 +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 Subject: [PATCH v3 11/73] net/ntnic: add action mark Date: Wed, 23 Oct 2024 18:59:19 +0200 Message-ID: <20241023170032.314155-12-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241023170032.314155-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241023170032.314155-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB5PEPF00014B9E:EE_|GV1P190MB2194:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: a2462ac3-04cd-4251-548e-08dcf3843faf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: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RWdEXRB9jxomf92LHOQaHEj96w?= =?us-ascii?Q?0BKfi/USaHrFTO70CZsVxuPz3M4qZfBSD4AXl+deVvToxUAuUu8XC+TNddNW?= =?us-ascii?Q?BjS9ug4Nh+ro+t0TYKUmD2KrRRPLtgZCGfOwcjHfFXBQFJCOPdNJ1v9aq3ZZ?= =?us-ascii?Q?qekJW6JQXfPjD/ZGbN0bQE0btH48g6puFEOBLEeZA9oeP4SkRBffktCUQzT4?= =?us-ascii?Q?aXCPxE+KYETsqoKKG7vyQVj3f1o/mSnm/40RkC3067/NtMx6xTVXQMsVclIz?= =?us-ascii?Q?oCR0c+9icCWLehLexOT5N+0KmOT2QhtHDBDbl6P4gpBLRQOegPmqAk6WVIu3?= =?us-ascii?Q?KYsibWAIBxODR3/q/DkoS35Mr7ZUA6dHObT+x+ipiCN0quDd8Ua9I4oxaeK7?= =?us-ascii?Q?WXOrS7Lo8DBw9gPwwz5MEAYarJahA0G/tdTPy25RSEd2t0Nm1Aszb6NwXgWr?= =?us-ascii?Q?ZyI7NWY1J0GJTASuojw/9I9GkKXBhTtKVShPACnaM0x5Wb4xHbJvs41IQ56U?= =?us-ascii?Q?TgFHA6w3zpoQWJBRTq2obGTXh94cYdW3g32SsjNCB3YIU/swfQ=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)(82310400026)(36860700013)(376014)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: UVCW08YPQ8c9vhWaZ2VAaprfXZbAQlw8DtINo20JwtWt4aP4IiOH34Hd85fE8kPt+mxOQnJKz5P1m/16GvFACFLfjCi1N55IwtMyFIwalC2PJ20B/lBUEDPHUzwDdgelUIBfekfE/h6GGTRRdJb6FvPeuMS7m3l+v5dwSlpSpfUJVAiGLA0LWTvouDAQcFPicBK2ly6XVjnyarF+ZrNRCyaXJWJWoxYKlY5yhjLr/xQAVNnpH+RDT2lyjMdEvJ+q7KWuEfJcSUbhMIZD5Zx4e54JdJO5+lKL1nws5lF/KMYMAbNIS0wgldQbRokoiKTBCp7XXOLlyG9Cd9LSC+zKv3X/T0J/9l4mACHG/tJM0M+mPoKKlWyLjphikGOflwvwFeqKrCy+zFaOswRPjwshd+VLA37HL/4SiEN6xfPr6sNYJFu9VRurTKbfkKuNkFO8fDDI1WVRZWRRNPX/nL4U8ZNAwWZx5sXQDEWRe2j1olk+SgJp7p73lfbMNZd9LdIxIQpRkPgaCtEW0XXBaChRHeIF4PGT1Sge32ZTWiTdicDHQ9WpafaC4EqksL5qayTAtn/pLUXdzZQTd1pwTpXw0o3FERC4wQRQ5SutcNI02DICbfTjYfE5E0Dcs+LlfmrwTMeSfnl46g2NwzoFABEXASWuU9gRoJ1DLQf/bf6UVlc= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 17:00:50.7111 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a2462ac3-04cd-4251-548e-08dcf3843faf 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: DB5PEPF00014B9E.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P190MB2194 X-BESS-ID: 1729702854-303923-12645-44293-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.11.47 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.259925 [from cloudscan21-4.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 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