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 54D3145B96; Mon, 21 Oct 2024 23:06:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC00940B94; Mon, 21 Oct 2024 23:05:53 +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 2AEA0402D9 for ; Mon, 21 Oct 2024 23:05:42 +0200 (CEST) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2108.outbound.protection.outlook.com [104.47.17.108]) by mx-outbound46-162.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Oct 2024 21:05:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QuZvee+zZOns0R3RyCSIvGyC/Q0lchJ7kr4TvjISVfkbyjeyKA5+nRdvFOSqm0BrRqI4hp8oDjbcqo1nSDeirbN8anSAa4d2tom1NGF4C5VXG2zyALAjnsjpv2o2dXsgN5Ki5uczAJaTxingiXj2DULEtLh99aFzDOEKUYXRou9qNIkVER84Ckd0dA4osra/aOi1XZOJ/b8ZyaIc/zK5Cmp0QrBT6zCdU6eExVqIUVrTAhYs2tGsBhbws2l3rs2px3rf/LJXH3ycgemx0DT3BXQ4IZlPWfTV4qFni4nmz+AqeOQLgDbmAaCoy1L4V825kHtRscAFkjOqG9Bz83Ap5Q== 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=vviZlw5ds0yKT3jV7h/tFMK1qqQZjg5vVmKbMlkOu/8=; b=Smbdp7FUDO0/q9RsvxMPdaExPxoVCOgq/4JzSgdBg5KjfH0i8UhL6ThkOoz4mxx/1S7GyevS/dFfNn017MGVxDLhc9vEaIWkz7O7Npb7il0mEZvvHimV4O9ML7dh1mwc1Bh5fI298JgJb+C8TYxW/oTUeNKYtiLghYyp5Fcpl7J4fF55WGWtLU1ilsL6l+wpK45sNAeP8A0sNTx21Fp+7kQiYisuf/qa+XPZeGGGCs3EzTzEkn/40R9Gty1vpWhTa2m/Zj6ui0cQ2IJParhEnYdiR65CoCRGta85Si15AXwUJhJKzvJ+u11zt8AI63zBXmmOCuIvGSpNDJY6rHEFfw== 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=vviZlw5ds0yKT3jV7h/tFMK1qqQZjg5vVmKbMlkOu/8=; b=Kut1+HzgoRX5honaHpEb+Ij1PKMS+Y6ikJGsCVd8PY4KfItQqEOlrvjt6uuv68LzUkikAL19DsxTnzNZc0h20S8OWYxKoeBVI2FXk1TYDWyA6jQvANyQ97+rtymler8FEOb1dKoCND9DMdzQsBDQTubj1LNZVRVhgsuwsyEmkiA= Received: from AS9PR04CA0145.eurprd04.prod.outlook.com (2603:10a6:20b:48a::15) by AM0P190MB0756.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:19f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Mon, 21 Oct 2024 21:05:39 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:48a:cafe::39) by AS9PR04CA0145.outlook.office365.com (2603:10a6:20b:48a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Mon, 21 Oct 2024 21:05:39 +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 AMS0EPF000001A8.mail.protection.outlook.com (10.167.16.148) with Microsoft SMTP Server id 15.20.8093.14 via Frontend Transport; Mon, 21 Oct 2024 21:05:39 +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 v1 11/73] net/ntnic: add action mark Date: Mon, 21 Oct 2024 23:04:13 +0200 Message-ID: <20241021210527.2075431-12-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241021210527.2075431-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AMS0EPF000001A8:EE_|AM0P190MB0756:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 5049e86a-39f7-4484-d40f-08dcf2141dfc 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: =?us-ascii?Q?rqNm83r2UOiA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us-ascii?Q?G3wsVjKerVQ4yWiyVQRUX6Nn2rSVGCGSyLFEK+xLDc+SWfOXlO+N8Sj5L6D7?= =?us-ascii?Q?tyM3V3wIOkBluCXu8XmDBDhhyvKfr6RZIA1eGu1As7bcMWdjohE8gTPJsYdB?= =?us-ascii?Q?IPwQX2r7x1WNvvpcdpgA+KvQr08cY7SHIhSaHtPX8BofGJiiLr66Ckufa7H2?= =?us-ascii?Q?kLAB4GA3YAkfOX2grDYilTuOgw8rarBe9juz4RrTFnJUThwvuWo9qIFz/Vp7?= =?us-ascii?Q?fW+DtHCX3WsmFxWcnQa3EjkyaPW5NJyJ/egv6IQ57ho95NQSACu5+LM5hd03?= =?us-ascii?Q?lNLgbJpgNQNJHKu8/Wq20ybA1Cq9CMNgF3LL2ap18zJTa2uGX9xd1zfejxGe?= =?us-ascii?Q?kBMYKieOhK+MLX5ks6OaMKbfJ9FsgfOKXr8oLQMlWlht7YO47QJRgnMqNcgl?= =?us-ascii?Q?nowMtlSezj2v4r853UnmSwU/YoNAJxK1w7GoykbwROMa09aGdFlibUtc1X5P?= =?us-ascii?Q?OF+ku4JLcXDBCnW/zCvVonHbJeCK3ddeXJxgzPlyW23aiHZ4QQ=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: +L520sQ5pENz4Bffzq8S4KFllBV3VQU8cjYf4m3l4Vb0lFcFwoTg4AwjeWqljNO0R4XRmQotXuQEIR0HVhKkYheqdEGawYtvCmbNfdIDqWJgVPxEsWT+tduwHMvOMTHiel002yrgtWH1F2X1m8Rm5RP3IevwWRP03P/+lNtEaiwDxAGHi2G6MZyODsSZPmSipJJynNhxx4Ra1T0wuWoMXOH6LrT7PRTrrdro3tMFnmKsmP3ADYIIJ3v9Yd4M5XF5Galp9ypxWMRUqCR8AGsBACD8PM/zEK8s0gLGqhRXZ4KtcwyyH7bMg1HKa1QF4hvlX6YnR4RD1r4dJMy1TRnFvcsJk42qX5oHjymYXyv4wV1j/vhFkEwbHM3n+CJzRr8LpGJKsdBjyPj7EZi3uh00QKlQYhCKJfG6mXPlW4GQyViQ45uEf3sB4KRXAondPZVON/MYMM0L5tqW8dJS8h2feHm/wEQN35fstiUGlNkdybLnh/UXSFDxIZe0GiAy48hVUZ4wqevBV2kNvfeLkgU7DBfNeLq6X5J7hT5b4yQRCW7rhJsik5xr+rS8aqDXFqVE29wdqPEDkhSS5c5gEfn/xDnaY4mTq29dK/gDt9ZHHamV7u21VkFjKbtP6QpUJmmW7osImGajFRjKuRYlu5xI7/QDTn6BzdBpGm7CAalO31U= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 21:05:39.4737 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5049e86a-39f7-4484-d40f-08dcf2141dfc 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: AMS0EPF000001A8.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0P190MB0756 X-BESS-ID: 1729544741-311938-13027-41075-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.108 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoZmlsZAVgZQ0NjIyMQgLSXJyN gw2SQ1KcnC0sAyNSk10cg0xSLJNClVqTYWAKamZv9BAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259883 [from cloudscan9-212.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 ec22c63b85..350eab009e 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 @@ -385,6 +385,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