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 8915245BA3; Tue, 22 Oct 2024 18:58:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CE3C40DCE; Tue, 22 Oct 2024 18:56:39 +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 D4C2C40DCA for ; Tue, 22 Oct 2024 18:56:26 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03lp2240.outbound.protection.outlook.com [104.47.51.240]) by mx-outbound40-26.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 Oct 2024 16:56:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nP9CX4+2kSEmUE6BsaGG7fnbYPZ8EaT5cjQMYEMX50rRLilUlF5zI4hkoh0bXAHEG2PHf7LpfjLtH5kH5dzlNfqgpV2c360TWrXfP+n7pWikIG+uSDJxHSAeGOwZdDAYBjCWDOWnVRrxzdVFUJ8pSs09bQ0n5AljmPDI7UhB5/rl20zZ/UcYgfeCbQHhSBmYtpe4r2z6aGDlyO7eyFQaCk0U+crPcNN1+pVvylWm0KY+xB1xz5CSdTpyTH1b0HL/4pzJ4HRA7T9Nr9idVrKOffj0wDfwWZlv55mpfQiGfbzxN6MNc4OPTTI3IYcB177WKACJdXI9BO21lJOTpkbYZw== 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=3lx9RJyRUrzVUP4HQRLdEdglmVD2PH9JGqbjeAXdPeM=; b=Ej5/438xIdvB2fNo/32WWMsRcJp24ES2+7e8ZKRSNiRHXHZ90d0u2IDtdVK7uHVsOFKlTFoDu7ggg6bjFIzVBsnbJgY6FvG5xPBZLW5tC3eI2VrlV6rfAS4g5d1FGAM5/lnhdXnnVyDHhE7SPeCixtyoZrgkhar8+r6oVfy+AnAdrs946kATcowPeXU6BRMKONrsWQsA+Lpy7+7cwYKhRXedFntwYQO+z+8QWfdqtumqE8h4TcfqD9QhfLRappMoNRXsYlADxcZmpvsg643PrfzbcT5XPdtkwf3PBteHC/mPL6RsAF3Rb+aPPwz85wllNKaQvzbfBJQmW+V33JOwFA== 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=3lx9RJyRUrzVUP4HQRLdEdglmVD2PH9JGqbjeAXdPeM=; b=hywphs18AbjkLjH0xiIzJTuUhXEc6fDaxDlGitD5iP8eN3lqJyZbJtLWeyDPI1oQ3+pLI+rdhC1//SP8jP56vN4GpeQqZgO3UxxUclmN1kvMUiwjudTV9hqKW6L6SEGwv+FZt1LzP0IZjQ0xMHRswjbpOsm5dNQ/oyKJ8b++3/8= Received: from DB9PR06CA0002.eurprd06.prod.outlook.com (2603:10a6:10:1db::7) by DBAP190MB0808.EURP190.PROD.OUTLOOK.COM (2603:10a6:10:1a4::6) 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:17 +0000 Received: from DU2PEPF0001E9C2.eurprd03.prod.outlook.com (2603:10a6:10:1db:cafe::e9) by DB9PR06CA0002.outlook.office365.com (2603:10a6:10:1db::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16 via Frontend Transport; Tue, 22 Oct 2024 16:56:17 +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:17 +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 17/73] net/ntnic: add item port ID Date: Tue, 22 Oct 2024 18:54:34 +0200 Message-ID: <20241022165541.3186140-18-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_|DBAP190MB0808:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6e1aa072-ca61-4fa4-a035-08dcf2ba7286 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?RHv8IwRh1ccdUJ5F8Ix/DgIiq2ey370GvsNi/v28TDWsi8ICAmhKI2jXge6V?= =?us-ascii?Q?69or7EYixpbocDtjP8kqFrkWFAtZv8mvr7zkRnCdjI3Bj4mi4j7h50SuqNXE?= =?us-ascii?Q?fjaxvTL+0UMNpVkbaPe6JaNchKKfCvgJ2kddyCwpS/27iaKckSQI6GmzE7mp?= =?us-ascii?Q?NNREp6BtL3z3AmjOOahYEa0uzgocO3uQjDby3esvnAzoH0eo0KZN4nvJvpwL?= =?us-ascii?Q?Fn/oHclEh+AFe5d6d8ISsCxSdhZzZvTX4dxp6JnFUN6Ny7LgndYQmbFWORgb?= =?us-ascii?Q?xPMwMR3kKQu+OIAt7pQSmN6yo5s+NVOw3OGnVWJIWqGSWLzXQV5EYz/3k27E?= =?us-ascii?Q?ZZexGC6w6P4tU2R0CZDToK1GXNekVe6RG6Des2wkm/elbo7Bohi3b0TozMDF?= =?us-ascii?Q?zTcniNLROOALvaFFnVaFLZUCLZBqNleOh0u07i12DfTsXpy+Bgh7a/rLFeDu?= =?us-ascii?Q?qVBwFWgJu7Nbr74CuEmnmNUpp0VrydiaeugLPApslDJ+DsWuPQy5q5XX8Mif?= =?us-ascii?Q?bGVx7U8p3XaZMiEVoJxZUd0auOxzKNcnRZDtQiMm6dFmKg6wr9cG3PxWBOGS?= =?us-ascii?Q?q7spiLV08GdUx9sdlTIzYQrOglPqe7Cem+lsrcH6hEQcjjPiajghhz5MQ+jH?= =?us-ascii?Q?zjn4hQ6UOUMsRXbJAxS+rL9mGw3ocf3aSlhWtsGIIQWniKAveDjbiDfR68Oe?= =?us-ascii?Q?LH7s2LlgSxx8HdFS7Ccpvbn1O8lEfhtKsl7s/s3hNbWRs84Be2gltHqUveQx?= =?us-ascii?Q?0l6nPwsP/GRgopM/plBlmqPpgmfHrZVb0sbIOF6q2p0pD87ByLnWq1X1+fdb?= =?us-ascii?Q?Msd3oiu0P+yZw5kQumX9uOcvbuXPJG6HkHSPvUyO1GOBbn1ucEt34tvwuJFp?= =?us-ascii?Q?1sZFx0VvvZrQIiVZmCT/ZtLwGtM+sJpS2JTwdWGagUZEur8CVWbXH+y+R3MY?= =?us-ascii?Q?S9WlpAtDwnhqgPRzRmdPMoM7GXMBJZixHpIreTM9fpuzP1zAp663hSWaY3GV?= =?us-ascii?Q?C6srYBzmWEK2gnsAtoC+3bVrldXbUefHUx+434F35g2ZyV0vXXodCi5AA+JG?= =?us-ascii?Q?OLAW2zHaUsKXKArurPmmhWL0SJxnLSrFQS4Voi7gHuih8pAuCoc4cCrGeBy+?= =?us-ascii?Q?ejSVl76rNQEp4SCSOICuWELNZniqz7Dpys1jVUMBNUlkRsbW+ETXUjc3v64P?= =?us-ascii?Q?QUZNc0ltt+U2OcHDe3L/DeViZbtvSybLwLZP8Lu1VgC+SRcaLn8bs4jEisAX?= =?us-ascii?Q?QhVNTumAJkwLol/mIYeBFLvUWFtljVc5FHhMzgjvitgR0STGzbU3d4msTQP3?= =?us-ascii?Q?nIyhTSYHac81QwSkNWj5ycwWeo24kZn3uIEZj3CTpP2uq36Q6fLgBo5nfqhn?= =?us-ascii?Q?LsRHS7XeY8rY0tHNXww9Dcb6jS9H/yEr4QH40qrNZ9xTQIjD7g=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)(36860700013)(376014)(1800799024); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: B60TnnqBsL208XWx9R+HOfYxmtU/wOzLPeH1MVVczJ9vRugzF6/eMsxziTXvW3niAO6r5WQpnWB6pQ5ze6yHhs3tDpvDbs3hLqVFi7a7uZUlcSFwGQvxwwYI1PiNFzPBKzLfO2byPS6wauuRuzC7CGv7dOw8+OIssjpBy5y8aXWsEmldRIkBrb2AXBQpJ1kx59brTTNhpr4EEI9TeBYyoVmvJZvSiN1IL4+6BhOYeZoj7F0mxoly1n013es/YDAHh7vwp6kLsfllUF2cGrfphQiVh4+kvjI1oA6YuAkDNQNSzkdRp9v9vZcAzxR083Xg1iaWRFXSJ+e4Z4K0TtTFehFCNtn+u+d5wkrJu/guO6C+m2yIuylfHbwUFQSd0ByBQjk9aNOXj5sYDO8qQ+gWEQBlqZx37QNmtMZVmEzTOdy4qe0BipYw6ppGJb3KK62Vzc9ezFZ30v5fas6g+0i32V/5t8iCPIp3CJoqSvTdy4hWToCM3plVFGR7L7cjVE37n4d6mGOb6Jbmh32PIgCO5qfAXCJ0GiQfw9WI+YssVaa3quMVXIilpfwyRJ8918WdMQuwISGyuKRSxVL0IXIkXmJyKoTXqq/llP6AepncntMrZbVAj24bCxqGtRm3l2dVxKw5zq659VzYZ9Un7xSWTS0NB4gLJ5AftrF02NffAtU= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2024 16:56:17.5750 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e1aa072-ca61-4fa4-a035-08dcf2ba7286 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: DBAP190MB0808 X-BESS-ID: 1729616179-310266-12658-12983-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.51.240 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoYmZgZAVgZQ0CAxxdzQKNXQ1M TExMjc0sQ0JTEpzTTJwiDNJMUoLc1CqTYWAOd2OudBAAAA X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259902 [from cloudscan19-98.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, 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_ITEM_TYPE_PORT_ID Signed-off-by: Serhii Iliushyk --- doc/guides/nics/features/ntnic.ini | 1 + .../flow_api/profile_inline/flow_api_profile_inline.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/doc/guides/nics/features/ntnic.ini b/doc/guides/nics/features/ntnic.ini index d403ea01f3..cdf119c4ae 100644 --- a/doc/guides/nics/features/ntnic.ini +++ b/doc/guides/nics/features/ntnic.ini @@ -18,6 +18,7 @@ any = Y eth = Y icmp = Y ipv4 = Y +port_id = Y [rte_flow actions] drop = 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 6bf0ff8821..efefd52979 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 @@ -928,6 +928,17 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev, } break; + + case RTE_FLOW_ITEM_TYPE_PORT_ID: + NT_LOG(DBG, FILTER, "Adap %i, Port %i: RTE_FLOW_ITEM_TYPE_PORT_ID", + dev->ndev->adapter_no, dev->port); + + if (elem[eidx].spec) { + *in_port_id = + ((const struct rte_flow_item_port_id *)elem[eidx].spec)->id; + } + + break; break; default: -- 2.45.0