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 7436D45BA3; Tue, 22 Oct 2024 18:57:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 13B0D40DC9; Tue, 22 Oct 2024 18:56:29 +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 369D840A77 for ; Tue, 22 Oct 2024 18:56:18 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03lp2237.outbound.protection.outlook.com [104.47.51.237]) by mx-outbound15-54.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Oct 2024 16:56:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AYo+mnhfdYxUtRzd2DibELs8MlPJBzou68EJ+DBoio55+lRwz940YEQxQp15vsVTXN6MEOZ9yCO3O3HBTPMZQ+/JqieehYaLpXNtjulydMJ18y0R7d8rNuDI+Un8saxsru8/g+nfh8+ahO61Xntp887oCwPFlWHnjyCsffzUfdd3meQ+0A2rVHIUPN3yRMbsOubDgi5A0AGeW/l2GxwJZxQ5/xAvC7skQn8ibeVaf3SlVuo9EolIi/OXKfPfqjJ8zHmMdGT9iMWClrHRsSGNUYA1jcypXHdWo4ZfuURJlrISZo9K01Fq92iKC2p/E9ELSKxwFpmUQvNTwIi2om+CVA== 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=Lz4+ghfgscdfLjKF381KR3c7W8pFmP6F21yGKlU1D54=; b=HfkHIRxIwR7OTJOoPGjNnsjXHum7QC1EhI4xc5UC1YeCpyeAItMNVimmEVrE7fMAqV2XxugneZJkIJPEfT/oHHWd2GPeCSSoCPSt0jys1PcS12gE9bXEC+yaPcbKH/HC46FF7/m36k0eBwSJLBU0LUo6v3v5GUzUO2RvKOZrNQMxKOUbQRUpUW4M/aQQszpTEmDZH9qoz8/bPRKAgeUP8fYgSp71/8hxPNeLzUCAGVUF8UHIyxBK90eXKPZGBVHUpvmEAwnGdfmTRe9qPUaVzqZzo3QJq07X+LiCCld+y1o2v9UFN4x054UPXtdP+Toa/6oW8RcTqwTl4CWtopxJow== 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=Lz4+ghfgscdfLjKF381KR3c7W8pFmP6F21yGKlU1D54=; b=VKuVqAV3xRzfMehBJmCh12LEmshk1VlcLtplvcC36H6eEiJRhW3XBOMwKAn0wb9xL4OkK/BrfQ15/7v1ZXkJyXpm+BHF1AhZ1BE/8EDOtUd5AYyHf+fasbqHrCZ3lkculJN6e9KZuekl1vOgqd8POf7N6qiKxhadCak/TmkBOF8= Received: from DB9PR06CA0021.eurprd06.prod.outlook.com (2603:10a6:10:1db::26) by VI0P190MB2108.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:248::20) 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:14 +0000 Received: from DU2PEPF0001E9C2.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::72) by DB9PR06CA0021.outlook.office365.com (2603:10a6:10:1db::26) 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:14 +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:13 +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 13/73] net/ntnic: add action drop Date: Tue, 22 Oct 2024 18:54:30 +0200 Message-ID: <20241022165541.3186140-14-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_|VI0P190MB2108:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 198c4a7a-4a49-46a8-f539-08dcf2ba7034 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?oEusM/kz8F7BMZFmlt1euoj53gtAcA8Y6VvfyNTgP3H9jizZG4+l7DhNMkfS?= =?us-ascii?Q?FSWBNG6cORuD70SunWTvJNAiMFt3q9bzpgax4BXHqZLioxq7RDEvMdVgfF0D?= =?us-ascii?Q?HX/SVdf1zCYqhkFiH+lLot/g7zlm8XYGpPeq829Crv1vUddWUY/o50BvtRS+?= =?us-ascii?Q?zpaDcFcQgEVNmZWW441WEQjYi5sqEw2O3fLXR8qXhIDLh/ngSI/VyWarzkBN?= =?us-ascii?Q?VhfIBrIX0TY/bN5gDA4kEILRRE2ZspE4LEbuPh9uXGMI+PFmQpt2pYOBea2t?= =?us-ascii?Q?htDaMEhj/c49ijCNCCT04iunPx7XOomU5/20HK7J1q8/GQ5M7doAmWpOFyOm?= =?us-ascii?Q?psnchp57U7NnEftUQ6X7gdsbpPaK6sZzi0MSj7uewOteRcLdspe/YBTmYr+s?= =?us-ascii?Q?//HF5uwvIb89BTHDjeAXtPwjq8xyD3QmN9V2aRDd611w9EpEHLmwNd8Zf1Zd?= =?us-ascii?Q?+684At9Uikzm779jCYLZttgQ45zTnMAeOdQVIRoBP5H+oRXXWDLNkHkgrBQr?= =?us-ascii?Q?VKUQJes6F4sGx+JOO00oQMb3q2GDm6OvjlaEdWr+nLg9NDRENSEHEleNiwZW?= =?us-ascii?Q?BT1qQ6SBfAb78AROP/qG3z4/dBS/FZj4orF3rYU1WcfGRYArjI/7R98EHvu7?= =?us-ascii?Q?RgzUnyjOs7vdhIbz2KxqMoJlBLviGCEfMXBZgUK8CyCxq9LjyLglKWKIV8Zk?= =?us-ascii?Q?fypXETeRM/oTZYKf8h9OjNVKQ43Se0cIZcCjBS89IS6fZPInupbS0bcnEIzl?= =?us-ascii?Q?9fFEchAA4p9JXERS0oMeo487IUQRhS8tIp98MBObW6vdKeaAU1GAsCAO7m4c?= =?us-ascii?Q?/IpXORJ9qt1dw3oW1pIrBSStMn8LQIDFmgfrlN7yq/loqxj8izBSbhxyl8bW?= =?us-ascii?Q?SaPtruslSNA/Tm5jXS2A//l/47TSxwI32nTFnwpP7kvDKSX1FCsZyOM6QIU2?= =?us-ascii?Q?2g1DP2mafH6s9y+bDyYFfpPLwLb48bvpPkT1ya5/bH3rXpxR9i5qYo//ZYLS?= =?us-ascii?Q?qfvMG2rObnn+Hr76b4O+tqKVqjRcUBoAoMOIsyW3J0qi85Ichqm+pzyRG9av?= =?us-ascii?Q?sbvkX3ZgCG4ymho9aNugrw7V4SEXHRiA8r2Wj/mWzIH/ydPGD7w65D+iONaV?= =?us-ascii?Q?OBshywxGjMWY4dYtY1gblvxkzmvo5PtNF72lEL9F1vGh2frWE3b+3ExxPbsg?= =?us-ascii?Q?pxNQP4ypDtToOFDDGOq+f2LXN3COtmV8PIuEC6vSQXB3ddx8MFxiEYJVKj6P?= =?us-ascii?Q?XJJfEsyQeRijdUxERHH8xomCoIJFZPh1Av1sRrF3SMqU6NKKQCbcSUFGqNlA?= =?us-ascii?Q?xzHEOdFLPwJ3lMlrMpmxhURifAnpvDKEtvPA3D3tWGNqMeFAaNlM3jrfyZEj?= =?us-ascii?Q?kZo7liYirwiub3RXDexMvJJ6gDMCaneoKJZyLZwDw17wgRPyfg=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)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: uBmgLGU9I0h2yiYU+NyxhvnK8N9D61KCRGUb+1OMM/Z76T2brF4tVkbTdMDEtdPzt1TkYWxir2L7nJMdrjmB89GqntYHZPGYjivTxxm72piP/1c9cGzL1J/uX37txUQ363ksA1TX5Y6/ygA5VKmqdg9RrVwlat3KIBST9SRrrONL4Gg0ScUqU5JvRyU08fwgVdQ18KvBuSwhHUK8aMLnssi6c19rrp5ppvhjxbxWORsqZf3XZ65285mi0QMZflFEA0vKWp5wf3lH944bSXR9KBd3YR5KrVhTG2m0nzvjaI3Sl3HTO35c3q0NHI1havg4OuHSkN8TSJqQdqUMJIPEPW+bt6IrrlTRsySqzIW1tisXI0C57PVmO3HdXBsXXAiW/qUS3YklQLvZn/47EBpymn4XtlSj+uB3W2KSXQfGaaz842hcWbUQDhDrVLevBzuka6rYev6f2ssh+7oSszBgvP0lRXtdi4Nrt9DeKjEfIo4467qFSCf3W9NM5k+Npt2l/FeaIFrOXYoZMtolGlxNvFLDzOiNcVnC1/XdL7632Ii1WW6mFL509wwxgE7/0zo9eM+OWhh/xzSeV3xsqpU2HfUZt0UfNaF70KfOofdcVIPOgkxgeULQlnpwtDsiS4qZzas6VeyRQJ1LlZjqiPZJe5ISFgkXmReoq/afqZ1xBP8= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 16:56:13.7312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 198c4a7a-4a49-46a8-f539-08dcf2ba7034 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: VI0P190MB2108 X-BESS-ID: 1729616177-303894-12665-13504-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.51.237 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoamFhZAVgZQ0MLSzMLSwCApyT Qp0TQ11cjC3Dg1DShmamaQmmhmbKJUGwsADgZKk0EAAAA= 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_DROP Signed-off-by: Serhii Iliushyk --- doc/guides/nics/features/ntnic.ini | 1 + .../profile_inline/flow_api_profile_inline.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/doc/guides/nics/features/ntnic.ini b/doc/guides/nics/features/ntnic.ini index f3334fc86d..372653695d 100644 --- a/doc/guides/nics/features/ntnic.ini +++ b/doc/guides/nics/features/ntnic.ini @@ -17,6 +17,7 @@ x86-64 = Y any = Y [rte_flow actions] +drop = Y jump = Y mark = Y port_id = 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 603039374a..64168fcc7d 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 @@ -419,6 +419,18 @@ static int interpret_flow_actions(const struct flow_eth_dev *dev, break; + case RTE_FLOW_ACTION_TYPE_DROP: + NT_LOG(DBG, FILTER, "Dev:%p: RTE_FLOW_ACTION_TYPE_DROP", dev); + + if (action[aidx].conf) { + fd->dst_id[fd->dst_num_avail].owning_port_id = 0; + fd->dst_id[fd->dst_num_avail].id = 0; + fd->dst_id[fd->dst_num_avail].type = PORT_NONE; + fd->dst_num_avail++; + } + + break; + default: NT_LOG(ERR, FILTER, "Invalid or unsupported flow action received - %i", action[aidx].type); -- 2.45.0