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 4A15645B96; Mon, 21 Oct 2024 23:07:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E21B40B95; Mon, 21 Oct 2024 23:06:01 +0200 (CEST) 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 1052340696 for ; Mon, 21 Oct 2024 23:05:48 +0200 (CEST) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2176.outbound.protection.outlook.com [104.47.17.176]) by mx-outbound19-70.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Oct 2024 21:05:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c4hGXEkXBfzozJvwu5j3rXu/bCGkTmdkQ6CchJERjZvdvkYCPP7ikCKJzMoEBF4wLLbYYfUN7hEuqKPXg3kYXiUBu+D30r74jw4Cdii2cGybrRBNAkHvKtkAV2KUwceFfW5IqwhaBeMt2selQ56z6OWJH5OMdzmik6eVFr0gCrm5JbBVH/ox/ugLa/j8HpFVZjVZumF7zcA5tx49eqnsH3qKO9aol3YAeBnjr0UMfZNhxFNi+j67XTzdR3h2HDCKJCfrQlTXyrOOPPZdgbReKpZBWky7HDIxJ5J5lrA2C7DndDv3GcTa1lnS7rU/opaDjCY1DWH72Q6N9clA6AKl6g== 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=BmIR/guw29ks2QwseVp/D0uJkmT9HeXjzldO2rYTf6A=; b=N4lX4cQjXdoHKwrAHuEcrMisLLZMRzJ7Xjk8g1+qAyxEDrLWr0aNSrMKO0QkXen5jfYuYN5zV/Otgayzz7webPFaimvuiB7d3vRnfLlaMuoKSoyDZSRkpfPW7Yn+aQvJDy3Q9WUmDAKTAowBKf1V0iFEo5Us4wiJBXQ6igXWDR32tK+YMQWBT030KBuYy6vZ8jjzXkKj3Bq/rCTwrhyVXN0gWRNnznDxrHtmhtwHm0bflMddgYjY4v1tTZspu/g0nvOlOTMT+yXlUKqXKAtaacN7+Nabhlw0kZ4u7oD7Rq49ey9LcA8kKUZRCJMkAHDCoGgAsiReNprQpDaAhpw5Gg== 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=BmIR/guw29ks2QwseVp/D0uJkmT9HeXjzldO2rYTf6A=; b=X5LIa42GLGM44TwgST+JyX5Ls9dTHaZK3ZhIUfkprynWvvlJt765xduK0P7NbxUByQh8huKIFEtR6TLbslfYYyTRP/dL4pFYZpYOfRk7wzC9zqoKvFbV/ry4Moq58+KV7+k82pmeLSKUiTX5HRE2jGIEYz3fwxLSQOqTcpD6/+Y= Received: from AS9PR04CA0150.eurprd04.prod.outlook.com (2603:10a6:20b:48a::23) by PA4P190MB1247.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:106::17) 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:45 +0000 Received: from AMS0EPF000001A8.eurprd05.prod.outlook.com (2603:10a6:20b:48a:cafe::f1) by AS9PR04CA0150.outlook.office365.com (2603:10a6:20b:48a::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.29 via Frontend Transport; Mon, 21 Oct 2024 21:05:45 +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:45 +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 17/73] net/ntnic: add item port ID Date: Mon, 21 Oct 2024 23:04:19 +0200 Message-ID: <20241021210527.2075431-18-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_|PA4P190MB1247:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f2d5e2f7-033b-495e-5dd3-08dcf2142171 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?wuMObAs3CI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= =?us-ascii?Q?aD/a0Axe3UAndbRVjnFUCIZb180G6Sc2RYPFlY3ZzfZYTXFmJagzeHIdttDE?= =?us-ascii?Q?yFYoQpiTWDh+SwCobSCeNDIeS863JCAvX56ofM0RMs7aXBFWhzsVXdiiQpI/?= =?us-ascii?Q?XlSGDNM28P7dCh2edWkrAzrn1/IBUBwFdDtmR+FwaIir2r7W/wYPWyT8Byom?= =?us-ascii?Q?f1YSHpl9TzzMYkT6bJLyIonZ+uRiNvkt0MQIqDbaPuPQG9o4m13FpTtmeXhx?= =?us-ascii?Q?nyYdar5lTK8CFmk/OBOSLD3iGyNvHZKfdfEHm6SQI5WWjhQxjOTSmfQfjYKx?= =?us-ascii?Q?5T/XUhXpSdpuma03tK6PuU6/IFrogWGtpnndd+d2K6VauiUsdbxl8sLe+AS1?= =?us-ascii?Q?CCia+L8Ph9DdD1gLdyxdGoxNI9K+7RD/I8Wf+z0oXX+5Qfjp9NhQu1KzCyAV?= =?us-ascii?Q?X767MW/rVdyIvnkfypi2d3F43OY3WM0VNvS4xCfkwV6SK0NsQG18tCYRJBN9?= =?us-ascii?Q?MokRp50ex1MXHe8tOahG83nc3oE4aQKv+s3oM2eu03Bi9T1ncQ=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)(1800799024)(36860700013)(376014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: SuAWDgGqatjGEUq6k0mwqGfOynv+6DsGQV3By4+9Xtu6QvJdCQGNjvHJkXDE5A2oBQgAW4wcOq38Uk5WIY+YH9Hn7M4u5TPJuKVnT+6ukYLTWk3AsJ3i+6KkCKjOIsXPNC52HGgxZ9aiHYB9uGoPswExu3QDf8juwiQxGc1RGgt6B+TvHjG6CTBf0GMTo+Dyf/9GbHeWI7PcTwtnAmpNMbPpIIkWVuhlMuO2myB3dZAyL/wd/VCCJq+b7EPjoPsMGKsLa7vQinD9bIRSemkaL+xsbyk0Zaesmq9zKLzUdq8gk4C27QlkNiWrDTFGQN/zkjcVwbUdCtMAg8DWP1ek44cTKYonNJfRtvUljfcFxz7Z7DvbITiu8KFrnJBPv8ZsMthLvUYRQr8EXKmP/1Euv9Rbt+4SzlNYne0m0TVRes7S1RTMeYj3BbinzeVZ86tFGXF43dD2kS0QnVeeDdB1eL1WGsqrlYEWHHcIDnNscgDX4EZB9BY3TxP4zOj1GMg23xniMiRV77JZ74DnJn6eqfVKu64eA4Wh/oxAl2UOkbuYjm6WVhyjjKyaWyDgdWsi1nT5cd5kbQvO0UJ+N2MSEcMKsyWgfyVNBvCPdEuwQF+RUia0NxO2P5NvYlO3XWIljoDHYfjoAhJuCl+r90GLAZNZ4Wi7pG03qMYSgbEnL4Q= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 21:05:45.2706 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2d5e2f7-033b-495e-5dd3-08dcf2142171 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: PA4P190MB1247 X-BESS-ID: 1729544747-304934-12651-45450-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.176 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoYmZgZAVgZQMM08KS0pMTEt0c zCJDXZwMQ4Nc3A1CLFxMTCyCDV2NxAqTYWAEofa8tBAAAA X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.259883 [from cloudscan8-241.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_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 8862ac2a0e..6c716695bd 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 @@ -930,6 +930,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