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 AF7C645BB4; Wed, 23 Oct 2024 19:02:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C82442EE0; Wed, 23 Oct 2024 19:01:17 +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 882E342EEF for ; Wed, 23 Oct 2024 19:00:57 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2169.outbound.protection.outlook.com [104.47.17.169]) by mx-outbound42-14.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Oct 2024 17:00:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uz5vm1RWEE8HrQZbfbPY8EfhFdSpamkRm7VRu3oxhCs0L9i6CHxxm0AuTrSMPaO2bBxcMu8lKbzND4T3H+m4x/+hZOlRi3wW8AHmp21eDkvTUB7+ASRy8PdBkP870PJVTG8C0UQPtSXl81hHHfKO6Yrkmano7rQpdKAMYfYgmV53BdnfoMJULAef8gyl96WBlOm2/QHG40p3K3eRezeejaKk2GVqNLPoUUrb0O5YJetMSJCT8O0O1iNaWgC5loadW+Cqn0qb9Dn6ZT6/NvuF5YTp+o/EpLTYVyaPry5zipJA8A07YeVetBXHIMSLCEDKTTHKDkAGTnvGrJ3sm98HnQ== 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=K2+qyTzDt/+La9hkkadsWJHQFJtnmAjoBtp/eStbnnncgPTfiD1dyON0ZQBAajvuS7DdeayY6F84HGO7qbAGtmJj48gN5hueY4nv3+CsHoUi3gunB8eDYvLX7bivwqkfbcRYW88DzaK7a9hlr1xldor2sCepMk2OxcegOK6MbeprmMlepgLvmoEHL//uDia9c571N4K8SysvM34wT5lydt9zqHcPtpZ/mfCgu3F4SFtj8paNDZerAQRKMRav9zQD9zaXDXnPhPNf4h+e0WebCLVwjL7RP5EVtLXgmizAJIA6jrVZkuz9h9VGtk50JfmYCL/GyqDQdBiY9O1FO+pL/Q== 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=N5MtsUFiw1NHuyGcQUrSpyWtbTpvpl83rOrDbytAjPw++JHMy4O/fIZY1wIpD4UkYuf1unybVixJgEso1SGlerYPeUDsbhXLO/7HUD8wWomKdi0AcH3ZDSp4cELI1DzR+NFNCADhOFNI0zp7zcgdjwp3EzBipZRXuqHBwQJrv9g= Received: from DU7PR01CA0010.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::23) by VE1P190MB0941.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:1a4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.18; Wed, 23 Oct 2024 17:00:53 +0000 Received: from DB5PEPF00014B9E.eurprd02.prod.outlook.com (2603:10a6:10:50f:cafe::85) by DU7PR01CA0010.outlook.office365.com (2603:10a6:10:50f::23) 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:53 +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:52 +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 13/73] net/ntnic: add action drop Date: Wed, 23 Oct 2024 18:59:21 +0200 Message-ID: <20241023170032.314155-14-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_|VE1P190MB0941:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 7e1600e9-a75b-48b0-bade-08dcf3844119 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?rjKt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?us-ascii?Q?ZNl/egeav2mNurjjUzlJGlY+YZ51GnpNHh9ULH4rPogduqBpzRWzaXTPen7G?= =?us-ascii?Q?r2ZoBbqr7luaOvrmjQUkP2ffqhypSTYuBxwKbl+Xx8TNZnUeZRMYt21Do7wV?= =?us-ascii?Q?B5usJie1/44msEPzPRn5AtBbbmcETmMN3K+zQE7//ZhcCTBlLyBUMY4x0M8C?= =?us-ascii?Q?9OPkAgZfATA+pmHd5apRCZ6RAbGa94t2kkQwI3wubD8wUB4rTyHUaVHQH+B8?= =?us-ascii?Q?RVKbxrQRP4tPhMynnkiQxUWECyYC2EUj9vPG1QXyTIMgKIh4KJjog/s82abC?= =?us-ascii?Q?ijcAlu4NtVDCYm2Zl9YVTf4tD88O5F1dGmPfZhd/dTBH2uW8AUacwZQUXTGA?= =?us-ascii?Q?VPo3Kn5byw6QvV3gxtRYYqHerjWafJ7P//DPUlk7zhYlcY2bsMXXW19iRV7I?= =?us-ascii?Q?guS58n9nwpT6WQXBoRrP5ynWhksOyd19S4qoKz7rOZharKAqaPQBXzBSdNk3?= =?us-ascii?Q?RXq4iQC4z9COAqpLPqklK7ETp6fSkq12qic7jH7GUNq8c480uA=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)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: TLdmfElgWiIJAxB9MfBagDjjHXduDcCJm2MhKdOLluSosznHuIZ7Q7dUpUjpg3EaoKf2/J5o4Gi1F3YZqkPo6ipJ9jvZiyL76qTClk591h4GfWkpW7Abbu4LiCitBFQJEFmczeKvhSt/g7X3TFQPIkbjZjwxj6khGLsFmkR2z6a71wfPL5Oh+3FTBYVPmm5sZ2OKf+qzrfKPNLh2WHFhHI7438GAZOePQNzDKJD7H9ERmnSXoTPytkrFSOdXxTeRliKHynrTAc+ElHwrJaE/TLF1oAtzIz6bGrno9P5uzrVTuvvY7w5p4dW2P8sne8Dq1SO0rMKqqNoiuaAnlPzfJMWpcLyJnHjDwrhGE93suvzOROOemLDDzeOr72kemG4L+a/ueaQ7N9O4tDR5BIES2CPD+cl+pzLyOn0j991CXl+GzsinpiNK591gUi2KoSFJLTv3LRM/qh0m112FVQAWJIrQlZF+JWby/ovC3rFH3mxSvCpl9RCPf8Pfh/gKnZ9+OVu4R/nDuKrdLI4x+Rr2+lITyJN9mRENMk0mo5rmvK7q1Fc241UeRafPcJyRkDf73gMbmvnOtKNL+diWQdZcmIGy+4IwPAX3zCBSeTGrz7KSf7WntHMVTkxj2r1Pa/yiViw0O6IpM4h5WuqnyW3LuRuok4HeaT19mGT07uhvHu8= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 17:00:52.9924 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e1600e9-a75b-48b0-bade-08dcf3844119 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: VE1P190MB0941 X-BESS-ID: 1729702856-310766-12816-42059-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.169 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.259925 [from cloudscan22-191.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_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