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 6765B45B96; Mon, 21 Oct 2024 23:07:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A8294067C; Mon, 21 Oct 2024 23:05:57 +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 3572D40696 for ; Mon, 21 Oct 2024 23:05:46 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2175.outbound.protection.outlook.com [104.47.17.175]) 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:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zD5fnlJ3cZ3ax8EF/dg5TSojxFSqGfBbtgS1/nrPJzQxPQkkgzB+OmiY+ntjCwpPMAH+y3EnYBpgmNvXIQIPhYbcZ20PU9Rg/bfuNIxu3CcH884lnU+gF7HnEF/dhprGC2A3ff/yVUls/W9NJ94w91bD7CzjVxbDdK2seGBC/yPsSLPqU5oeTp+C/8xj/ncrJKMHJtBQATTJ1DeirLMvpi+jy6yt1r6W+b0rWIYAQhYM7sNlbFmT7ke4yikmo6/nm7DUfwpmzNf0vlwrDZc4D6LQ0M4pZeNxczIm0HEChJjtAhiZcRS9+Lxp0YZ9v8amof0BzcnpHdixpHVIClE1HA== 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=0bL9ONzyImD6WN4LpVX4i5zqt6fhRM+DFgW/To5hnY4=; b=TEeBijjvLcYAAUL6PqkBDFixWLgAipKLboqoy5lSgTt1hbt0WMUS4jlfBDfAIBCLoNaOcgCN5Wx9/jiGihHSCT6IB/JJnK03HTh1y/KXFAAGSRNDy3cwsXNDCZxWXqps1epILZ5u3PrVqWrDNu/smhGn7obMNIskIJ3Fv9TTgEHsjxQAlnWEAxNYZNticxOyJEkire4HzH8zLcc68NNn45wwSWG41reI3kyd6wwM9J/1LAL8bSCjLpKMmCdq0+K69mpt/7GW6z7ki8jMxn4CoiEvKB7Di3/+fEJJq52I8VfIr84s+VuOHIx4E5Xgu4saG2AV/8vscDKCG1lWb2v+Pg== 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=0bL9ONzyImD6WN4LpVX4i5zqt6fhRM+DFgW/To5hnY4=; b=NChypFP42x1+xfG5FiHrXaMD7+dsJ/FTmDPkA/fYrcm1KE5AuhB6cXzThgcqgVxQhFFMvkSsiM0CK6RvmVrNBF65cO8TtsDrqGiofPiLQCNTi+ry3GroTWSD0WmD27liNOg0yxpQr3wFDQHzTWAXQH2iLUbdhyg+vYDv+9KsaCA= Received: from AS9PR04CA0138.eurprd04.prod.outlook.com (2603:10a6:20b:48a::18) by AS4P190MB1927.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:513::18) 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:41 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:48a:cafe::a) by AS9PR04CA0138.outlook.office365.com (2603:10a6:20b:48a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28 via Frontend Transport; Mon, 21 Oct 2024 21:05:41 +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:40 +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 13/73] net/ntnic: add action drop Date: Mon, 21 Oct 2024 23:04:15 +0200 Message-ID: <20241021210527.2075431-14-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_|AS4P190MB1927:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: a940d4d4-5976-4052-8f4a-08dcf2141eda X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Dv0eJCm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Vj5li?= =?us-ascii?Q?t8xcuRv9DvQ6kUvPQWCr/nmO2knUGHibY9ddZ/vR2tUsFMFAx1wQAgkpCyzW?= =?us-ascii?Q?yrC/+Xis46UWco/DW0gKtijKnGnGRcFIvH09BXaY9n+mloKOcnknPNlqAl8P?= =?us-ascii?Q?Iw9cavo0IADQGcE8LuHcxUCnBmfiI+oeB1L22APZE02bbiinD4+gK4a0FM0W?= =?us-ascii?Q?6HdLONkWX7iC9lGrajOYa+da1w/YUlNLY0UOskMmWrRKjzQ8sTCDQnbGEfrQ?= =?us-ascii?Q?bNjAnRoLt2Ncq9T5ir0l0TW75JoKrJCaG8wuJbita97SbFr3exMvU99ABnSX?= =?us-ascii?Q?FgRzXbCrfD48Y5YQhbjQn9ySsSXyZx7M9veIm6BXrMG9s8bOckS3oFKyIUa/?= =?us-ascii?Q?AS0kVhfd4B+8YbS2wuz35I6dBX5vxhIVizqzl57trstSEgbuSzfhaCelwHs4?= =?us-ascii?Q?HNYOqFpZnCDtQr5uBIr1z7xQVMRDagyPXwJDNMgsc2S03ZOpwYOXWlKSgcfs?= =?us-ascii?Q?TFv9khGWmfkpy1BtlWoQHR1n0SI+w3pCl7Jx8WS7gE9REAylZw=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)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Eu01W5DevOP5HUI4Ia0N246EoPpDysrcYWpNoF0Bw3gK+dKXc7Pr2AAp2YxEdigFabn0fvm7vAEkGkapYXBfXeZxq2eIV+vI9Upe1jsQKRobTMzwEYlGHe7ZC1hone3OZBesRVfb2hkRQwpyr4gt8VcS5RIvcUr/rih9+ibUxI+7TWCWYhvLNovrzEeV75yssR2tDF6gOHmub5C5+XN1lI5lh+Nogi8hHpwoJaBKZYwWDqBtPe3S4sw+pUXBzsaYrKk5WYRN3BVFDrvMd6ckBuBiXf8ey8hBmk6KC59y6AUCR5/sYw+ShH/OykN5jP12wbZMojIzE4vPFMstUckcFKo/rAa+YHIfwZGRWGJNwtvog5TdTWbLz+z3DTtBUFRkKvspew7i5qh0SOzOQc6OyWz6kvmOM761Cx1tAEIfyLYMy3SDOGirJvCBD2NTWk1S5DxUl8XZFq3wSrAaBZrX/rwmX+DUKT4rOoUZ6zBWSiAE6I9zRMQN2nWlC6rJhgdX0Idbfz6mS+AMXS2sV+dgm5/OaobQcmrN8fwVXsbkCD2UkiAxRl+f0fCDx+8hCK2I+K4EWesV849Dms9cwQJijMAURA/6clMOoa2wcstz/OrQjWoZtPLGKomPYXWROiVamwVHnNIB29eh/f2Fr8q1kdsYXEASdbqZnp/c9isA92g= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 21:05:40.9269 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a940d4d4-5976-4052-8f4a-08dcf2141eda 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: AS4P190MB1927 X-BESS-ID: 1729544743-311938-13021-41181-2 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.175 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoamFhZAVgZQ0MTE0sLA0ijZ0s DEIjE50cLUIMnA1DAtJcXSIDU1KTlVqTYWAMyexWpBAAAA 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_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 68a54f7590..664f9c337e 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 @@ -418,6 +418,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