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 6BAB045BC0; Tue, 29 Oct 2024 17:43:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 903A042EE1; Tue, 29 Oct 2024 17:43:09 +0100 (CET) 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 4312142EB8 for ; Tue, 29 Oct 2024 17:43:01 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05lp2111.outbound.protection.outlook.com [104.47.17.111]) by mx-outbound12-25.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 16:42:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iKT4Bu/6sij1lvLPY0uvbdFmpShcX0VjgwusTsyp2L+wnL+R3J8nV9fSovjoT2IuMFX0zaDIdU5pBhdgg/6N5RDiQnWt2mIG1pe1s9ChWbjTNrQ3Jj1Vs6uqENfoRmNLY/XZO/voJ4WecQVStDk46Dr/h5bIST0AYXTzjGxTXWAa6djtLR0u3WyG9MFVca8Q9ags+JKV/RQEwEPdQGqwEAhbLcHMh1+g1DvV0Na6aLAw0wGs6p9SzhtfpQpKuoYBjJOc9dgAtB38f/drezWlOQH1ZFW/FcqHNoo85AJwBFMWrgbIPZXxnTT0YrtrS0ziInCmeIQvSvvFjb9s+kQ1KA== 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=vmmqgW5FTMZaKjzFd2MgowP4w8UurMjvQceFC/e587nxrGeGWKPuq//ALDq0cCJSs/3Pvkswr8ou3E66TxE8bYAd6d4Fjwm7Bio/CdtNNkHYZVjomfpbJjdJSDRUKbts8ZnqdCgRKrvkDALnLxiklq7giY+Rh/WHwcsbE1Oo4i49L/wacQmaAam03E25VjZIpLhfD2oGj8KeD24M+bBK+Dz0gCGwODEstI+WxVFxLsUeKoK0c5pF6nJ5deHmvTsuaK5XdplgRXkZLDSkXLnp5gX+XeSc8F7Ld3wuRsbqqba7882qC3XH89x2okNcjXYnMOzSm4dYqxLSEAaWIHB6jw== 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=UhlovpbK/5oG4cycVvPl+51E3R9vyEBZU9KJpvG5+Hq9Nxe9m8sLFcL0XuNJRP1Bi7fQVJ40S42GkYzTdAMZ1PgAp9XnH+I5iXWRMUE30x49GcDSUZdC2uzP4fz4F4JYBYY1ZhAs+XB3GROKj2f7A5blaIEvtTtR7k2I4s0yBKE= Received: from DUZPR01CA0191.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::20) by AM8P190MB0962.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:1d2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:42:57 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::b3) by DUZPR01CA0191.outlook.office365.com (2603:10a6:10:4b6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.29 via Frontend Transport; Tue, 29 Oct 2024 16:42:57 +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 DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 16:42:57 +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 v4 11/86] net/ntnic: add action mark Date: Tue, 29 Oct 2024 17:41:15 +0100 Message-ID: <20241029164243.1648775-12-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241029164243.1648775-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241029164243.1648775-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|AM8P190MB0962:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 7ef35de6-7bad-4f84-1a4e-08dcf838be48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?YJs5135qJaUhrIvaWGvARI8epT93IE/gij/8UQRdLcM4F1DRkpvSMoQGZdAS?= =?us-ascii?Q?uROevwDPwYB/iBc/2Dpay6HE5Og4m9vlmshsTuFfzuD6voDpjgsvc0/Ov/1V?= =?us-ascii?Q?zhD4SfEIZjhe2zp7UhiWLP59jY1y1N3E/nWruuX/h69LDQGUiviqoFWEVn3M?= =?us-ascii?Q?Erh9AwZS3etGPjEbF6MmWtfSj1ZOfuKwdWNj9DD230oPQaYkZT9eOe6stUec?= =?us-ascii?Q?QK5w1ZORSyRlbICkAD7mcSeYhiSys0SWVtF8kRv7wEnOJUdUa2TWU3dPlh77?= =?us-ascii?Q?AAyoO1g4WyiSXd3Udkdkq5DgGWpVI5HCjoY6Za8cCTI1/KpJLh2jWFPbuHNj?= =?us-ascii?Q?A3JDn+5wX/ZZ0aRGrs1DPG6AoTTPUHZY8rfgeuB742GB9Gfzi5J2pqG+qCI8?= =?us-ascii?Q?1hsK/nlcIVZbf9L502aAiFEccEhbYQHbESwXhAaE6yNddMXqnX7PUCtdfNba?= =?us-ascii?Q?VFHDjOkVhi4rasgZeqzJGwjsXyJduatI/SUBxlEGJexAGuzxBqeONikeHjjz?= =?us-ascii?Q?z2ZBGn57ujXrUfe+SS3NSolF8vc8PLKGBFZznvA8f0AGUZp51ihkx7kPx5+Y?= =?us-ascii?Q?JcHCJSOweCL6NxZ671AzuYy1p0PzW2P3Q6liE5lk+6kNjsAWmZ9O05gZq3rd?= =?us-ascii?Q?ZGBySUVLMUDCwapf4eubTTacWUUK/uvIyflP1CWuCz0tKRqjkD2SnckmILyh?= =?us-ascii?Q?dEfmPayNuQMSVJXjw5WJf+XFzgQpRfvSVI2DKu9ushSTELqegV8X1+IB/k7T?= =?us-ascii?Q?D0BNEiJqmvKrF2Q7qV6yeh2h+2ILA38EHfAKGR703iKJhwaUsLTOGSLtxS7z?= =?us-ascii?Q?KDiv48doZO+71V+HD99BDMYryD53vwDZioZ+KkcG6gD62+L+jLhG09YRhNxV?= =?us-ascii?Q?qbnpVHXYxITzdXmHFZt7laOalz+Boxy+kVneQKtLwfTQyeOcGJvL6kWf6rIG?= =?us-ascii?Q?i6YsIBrsH/t2jt/ur2EHkJ4JcZMK27P+svXpjuxqRDEkjYe4O7q76RnB5W3S?= =?us-ascii?Q?MNLrrG105ZvXOIxR6VIFsxBC0u2lOohGEovFiN+U7L97XYwnTrrvMsdTv2Ro?= =?us-ascii?Q?EXPhc18OircwGZ8Q0JyRMsW03NFtIBQyEcb3Pv7mE19zxYi9RIcjp1W8NGDO?= =?us-ascii?Q?HTRhiZR52ZT8uqaKEHDUGWtrpV/oEwoLOzXTSY/XTKwV974Quk4mAwV/h78p?= =?us-ascii?Q?LbMRvC1VxFV/pWD/d1tsn4N7wAv897uDDeem23eNfN7byK+jLaic+zTlIns4?= =?us-ascii?Q?Eezl/va0YBYg+2e2eN030gAoFyrmnTtb91d+fgGcHgCI48mijE7gshaOdnY0?= =?us-ascii?Q?2B0eSSZk2CaYIIoXhJNK5KJmuvey9GG7XmbTkThfAbedVYTdPK42ev7Q+3gJ?= =?us-ascii?Q?32ajB0zSRzwic1F0pcfl9ymHVo+Jxka1Dm0wKdQcMJEqtKtSHQ=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: jqeRSGAJusg9hgrqB87TGeMh3umrudg81TmLluv/j7TpetmNJEfqCchhR0l5NfEBNnv5WlWbaai76zY1LWkqVx1VZLg3kXo7nZmFoL9oTBv4KnHuwRiA91/EZqZY06RH8CbqNNGbzkJIBsksBpkZaj6LwWSeFHwNgt/o8ZcOAvLLamhCgqSzcItoALolk5X2ltIOrnwRuk9jZ0oFze7LtpE/Rtk0JuMfVcdDSPzta4oODi7CsOZmt1dfJ/Pul4zLy8Wqu2IVDAE15Q8cx4kzP2sqltMYAfQ/iZ2E7p8msF+TyORLoVGrO/Bym3j9HZkYJnWWoi3Tu/v8yIQ58Uxeq+Tqvz8b27jIILTx1Y15K0CSivpW/syUZSk4XwpRFD3DQRiArVw2BbT0dUy9h9L7u2UV/LG3FQunHIV0gEuKVaTqsgeiUgmXaaYTrRXrXTKEagQbk5Kk5AonJBUYk65LM483vyp0LSkzOAY1VN4SF05GhFgEGiCvtiYgFJ66nnD6oyhrYVObUEQSCbOCwji1U5CIFVE//uwBn7o/2bciJpntz00cTFFP1Ttp3DY6wrq+nbqp+CWqkNDgI6XpZlPjhbR/GK1hmSmxKbxtPLA/JhpYwS3t0t71yiuM8YJeGUQq2IguHplEUKBVUMh+XS1OkXtaBvEng+z5o+MG/lu88/0= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:42:57.1364 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ef35de6-7bad-4f84-1a4e-08dcf838be48 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: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8P190MB0962 X-BESS-ID: 1730220179-303097-12758-29318-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.111 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.260063 [from cloudscan15-223.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