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 C646645BC0; Tue, 29 Oct 2024 17:44:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4084242EF6; Tue, 29 Oct 2024 17:43:34 +0100 (CET) Received: from egress-ip11b.ess.de.barracuda.com (egress-ip11b.ess.de.barracuda.com [18.185.115.215]) by mails.dpdk.org (Postfix) with ESMTP id 5AAE342ED5 for ; Tue, 29 Oct 2024 17:43:05 +0100 (CET) Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03lp2107.outbound.protection.outlook.com [104.47.30.107]) by mx-outbound43-199.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 16:43:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fdyWo7HOiXhlpaIEKNwHlH9lqxhXn/ECq1zVxLQkg//V3Hh3ua++nRn/oHZTI887EUyml2bfZeSYPCK3JtuqdHRFOCzE1eNI0GcIQDWy2O77GbdvXQwFYZejzRDSaF56SImHkAkjnp8u2ILQ+lzggRVHr0AlMjUam9S1wsIq62RZcwY1pqx2we/3LE/JQAMr2QuLZKb2q0PmB14lkW14T5DrXqjTnlDagEdFr/FlWIfAjzQU2gKTGbfy+sXzGSiOOsn6T2beRySR2z/OpAuu1D0Y6mGCVwB3XBds4vcAX/UpqmVi0KIt9WhcFPX7yUwc4xhZRURlaKKmzy1liYAL5w== 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=IhYu+PJ4C8p7Wl2GxsQ4VABvlJfEITMqxU0P/+VS1GB30QV/tRWIrq2VlT+1+PYCmywpZhWW/9y0Ysj8fe9NtP2SGcb4d0ctgQUSRj9STsLeRYW8aQqPWIHpQRhaWrQSFR6sfVYdBsSGPiTz4XCjhoiuTv/5AP+8072i7J6dDtpVeziIw6gaO/vdx6KBWaSa7mvWysmXRPaNGbByMHSR6whTt00hDqP5vbHIKj1R0+w4DB+P0GJ9aZ0lWnOG8vtcpU18BFVUO3paysqVm+EhDRMxXysG6YUnyVZ53kvVkPc7F3mcEqBnk3W1HTtA4YeRDELcgK+iaJEGUuUyJkEl6g== 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=W/S+mFhoiF9QD2pG/f0w2CyR/x+uMJUVZHPeO/PG8qQ2lDEMwqggNDHabAIYv5TFFUIhp8aItwRrrB0qEUFzm5+5UnS+Svf6H403NMweBBsYeYrSh+Kxe6IE2OQZ0TcH3/jLPoT56kC1yeso5LwTMYDISyByjDHnoCDLGYBK70s= Received: from DUZPR01CA0210.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::24) by VI1P190MB0688.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:126::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Tue, 29 Oct 2024 16:42:59 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::f0) by DUZPR01CA0210.outlook.office365.com (2603:10a6:10:4b6::24) 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:59 +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:59 +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 13/86] net/ntnic: add action drop Date: Tue, 29 Oct 2024 17:41:17 +0100 Message-ID: <20241029164243.1648775-14-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_|VI1P190MB0688:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: e1cb986d-dba7-453a-32db-08dcf838bf85 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|36860700013|1800799024; X-Micro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g9HL4cQtpodsvq+woB1yV5DXnGSMGYEwx62lEzC1ppFfo/C?= =?us-ascii?Q?W5SqbQz7kQLBDny+xz1pMdZoK1DkVGrsPt2Bqo2udit86YdwsdujNMEl8GEg?= =?us-ascii?Q?xgp3YXZ5IUP+wAVDcZeKXq9ILRztdBZEyEBDUZ4DrfAvUrdLmWreXC7VN4NJ?= =?us-ascii?Q?T/W4zZQ3BAKHRcAGbNPQNzX9qlwZaM+3TWkPXTEsSFTuSGjBxkTu5UzGN6Rr?= =?us-ascii?Q?1pIp543+GXkbHW2Mt+mwJ8vFVyztp5PJexDrVMmqY+/MjlEVYGiKEI9uaqtr?= =?us-ascii?Q?ouCNjFdYVPOPflmW8kCMyTTYrhagzNo3IpLxS3HcLsvHZgI3tPzdhVPGMgGv?= =?us-ascii?Q?aWN8Z7FPsU6fd6ZcMYv/B4VZ/q1Qe2OivG/AugEbcv0kOPh3kb2OCI8b/6ER?= =?us-ascii?Q?nUZDwBN6AWJ6/QK0ZgTyYgQ7O48gLYYQ149x++/G6dh8U5r3VqgTLGG9Pt//?= =?us-ascii?Q?zQiqK32USGkYr+BNQeP4jE66x0djhsKlRrtUnuWEOuNsb8DFLB7t3rowRsYn?= =?us-ascii?Q?k9liNGK2fwJlmDmJ2qRddwieNGLmu/DZAQI+hdRIS+x1dypA/g=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)(376014)(36860700013)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: r3HHf+pRPGTSBLMkQ2vwH5cHFZjiWlTIszl/tpVxf45n8cjHKfcyjRRm0EhefNl60zIGJo3X0H72x7SC5NIqJ9f2WvmWAzr5ES400fKpEVa1ZQTlFl1jBDJxgSXlgPCuuaNbdNSr2H8xTe365u8KYMOXvNWfX5uim0pWxkkgncTbUM6tDjdvPlmDAjEEcOaPQXhWMTZ36N4dZTyF7Ve0G8kdUbLk16e3PP0WTj1o3/l9WEuBdk7Q45I2mFCnLugHTf5QunVJACqcPuqx0LGaw0UbEb3p/VyW1XBA9crbPcAK02rLaDyDUUmfgn062+NKzdRa3TzmhJbsWItdFxj0ded1gTLvXoaRMZMgDtbWidT3JVgvQZdem7iLcZ9Wp/5xEGm8VajrdDjEPcmmLgtrJU8TJaCPve0TYacEsTBmwNKwuXkOZPMvdeYyXc1HTEfPMUkHXEWxrdw4mAjaeF6o1+d6E0ksm+HdhrWK4haHSdObx7fw6/lXL5Vw3QUii1Y1wBmnkWk5d0YgeUAoM3S8OEZp+fy4uHaFCeFaxg4KOwYWM/OrsQ1FLE2IIbwr43sVzcJBK1DUW6RB4hT1x0joqpiA1m21HwfFCvCenf8qaNA/MRkIuYuRBAZCjYsmXk0Dv4cqrWgHreDRCap252i+EhBBaSNvtmHMrB/jByNFKmw= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:42:59.1989 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1cb986d-dba7-453a-32db-08dcf838bf85 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: VI1P190MB0688 X-BESS-ID: 1730220182-311207-12668-27823-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.30.107 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.260063 [from cloudscan18-5.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