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 22BD845BB4; Wed, 23 Oct 2024 19:03:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8125242F7B; Wed, 23 Oct 2024 19:01:27 +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 8388842F07 for ; Wed, 23 Oct 2024 19:01:02 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2172.outbound.protection.outlook.com [104.47.17.172]) by mx-outbound15-83.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 23 Oct 2024 17:01:01 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jZ9+idrTPZx/118fHOq/lF1zDSONnNKjhOL3/qQEkspX/7/W+S1sc5bpW1ztRYWDq+iIc6zWetYu+exOhE+mz1myRBZdIzlh6ovrVAZoQ66cycZOGdkhoqxuS7FZWvfnGbRarEeA4IO7GqAwMkavYZbCHJaECCEt4pw3KNyHnLxXvEqsz0qUTyuJrjN6jQFfRbEoZi803+o0nzXUN1nXsZEhEKXSCfIf6ogmFb0tMPbihNZajgrQNMN8b+0JQcaXXcmCtHMsrqJs/7oUjDxzvnpDwuuPnJus8YNVXt/QXScMasHD7oL8DcBKSMcwv78TQ19JPS8hu1NSFCThixUexg== 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=QeAD86jLVbRyYhpjDAfEyYjB7X1CSz2tT/5CXH+ffULcGj3Yw+su6cV0FSijYzz7daCTElZ2yPEKgsJa0+IdoFZXFLeCZGsfaP3CafrYHqcapjSdy1GC3HbzkhKGsdNoSEo/GvkFAi9lXu0eSELIX6UkPyJaLQUPIKjirVi6Q89h1IocadtfLdc1Qy7oJ1eXW5f2+tCiXZzsx57iLIop1yhX7m6mzkg6SKxzA8dXAnioOvNalUnXueRYG9oAuzUr8rJW2aUA9+QJU9NgZDbQGfw4A1ITTg3G3abyyWCdQlI7UsKnY6rpoPJHw2QRj4xkQLEmDeO2xkaCH9HNQ7YkRw== 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=Flo5DmGTFHFjKRh9zDQX+J3cFiXowsHb9P6XZPY5OtVAXWK+ogkvOrO3TFKxNqRzclvitUG0IFvNyFaC9gnf0pbC/Wq/BIXCzSuZ6aTQzwNfTwR5t8LvT1sY9SOmsVXDfKJdt05l9ShWX/InZU9qskfCs/umatWKMdb500i/ksY= Received: from DU7PR01CA0012.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::15) by AM8P190MB0850.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:1d2::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Wed, 23 Oct 2024 17:00:57 +0000 Received: from DB5PEPF00014B9E.eurprd02.prod.outlook.com (2603:10a6:10:50f:cafe::ff) by DU7PR01CA0012.outlook.office365.com (2603:10a6:10:50f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Wed, 23 Oct 2024 17:00:57 +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:56 +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 17/73] net/ntnic: add item port ID Date: Wed, 23 Oct 2024 18:59:25 +0200 Message-ID: <20241023170032.314155-18-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_|AM8P190MB0850:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f3773a80-629d-482e-528e-08dcf3844358 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|1800799024|36860700013; X-Microsoft-Antispam-Message-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Y9zznQZOSnadQjaM5sQY1jrxpaIJDoNHISLd9yVOW5WE64?= =?us-ascii?Q?Asxj+p00JR9uZaw4PQJaj8yc5BNOWBevcQ10PCvx52VkyCHagQk7kC/veSyO?= =?us-ascii?Q?JcGMg5RKGcFTeuwvYSAVfDFh3op3rcQaUjjbD2f6wYkLq9gQmcrAsrzFXyfS?= =?us-ascii?Q?H0gj0p9V2c7qDq1FDqMyOSZwSIfjCKmNZ1j6OU+eIWCJqkbvLNAebCkf0WUh?= =?us-ascii?Q?14gY/viU/8552Grm1kvXlQUorX5xa4yFRc0ifUAdTfkI1GrD7pjEENsfTHj2?= =?us-ascii?Q?CVh5p0BEhVHnkkUNyBZK2OU6B1mnVrbFIHeYYjBNV6VI5QAiomwoD34s/pqV?= =?us-ascii?Q?jhjfnRsX1UO9JfjkpFhDjMh2QmI9KNYBA5uk3jFKBUkQ5lC1W/BKdqTFtXIm?= =?us-ascii?Q?nrppwNAjI097vCfRhTJzor4hzCxIHanyOwcoxRRLCrkVlzswIm8yAahz0waJ?= =?us-ascii?Q?73uY5xrWXstXiAjZbBkpfcVJFySWUttGIumC+HGzhqm7QXvKndg8steNIgpk?= =?us-ascii?Q?VuQ3zUj6HGsZEViEugCK+p5fga0XW2xL6oKyGFVXTByJ71GnVA=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)(82310400026)(1800799024)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: N6+4r6v+3ugaTIoxV5mcwAwkSwU2cpaSrnX5pDCgBq2QX2HAEzj8G5jqC/dKxDou5UgYFcbkJiUigeUaIrrdIjQfOLXRuJAnMdBhJ+6U7UZa56rjrtDwuWrZ+/QO/qhImvcODM1VawDomEpQu19rVHR259iQUE3dlSAciQglp/fLeg002m4ZkHKroil8k75TLl2AHoOybwrPpYUKgXRwemgd8I6CDE7Is+1tZlOtDvVgwcPXzR7GHjlgARpr4cJ/v13FGT8S/Q89QBI2hRGdsjV1wRwWVYqc5TqXFJh/f2lHRCIsQQOtiKmCXOrQJVSdTLIBj0zz/R9e3SIw0ZD09DJD3TvSx6nfoDfzMQhKd3KS7qPAOOq6FMnW2pg5PVYitXMZYqI2NMtSu0Op8YtZ1BSOBzu0WQeV9/NUmeW5h9yyZxVI7plw6mb8xApWxJUEq5X2pQ8EhzTGrYz02fznCY808zLYIggD709gQWvLsab0IZ14xxgbgZ1YO6xHvcDmBOMMNeAc98ixLrRBsoNaisTCnOaPdBow6y0CwAXLeO5EH+TQr0uSOJheplwGmqQSlcj8lovR2il6Q6TpPowv6ZRYgoZhCfLIu79XI3L5rGS/B7UWg8m3QLWbK7mDASArWWWVTwjJte2tiFdO34VIFVb5DqhRdwXGKfBeUY5aSAk= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 17:00:56.8205 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f3773a80-629d-482e-528e-08dcf3844358 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: AM8P190MB0850 X-BESS-ID: 1729702858-303923-12647-44295-2 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.172 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.259925 [from cloudscan19-83.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