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 58E4E45BC0; Tue, 29 Oct 2024 17:45:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AA92842F2B; Tue, 29 Oct 2024 17:43:39 +0100 (CET) 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 AB9E942EE7 for ; Tue, 29 Oct 2024 17:43:10 +0100 (CET) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02lp2042.outbound.protection.outlook.com [104.47.11.42]) by mx-outbound12-25.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 16:43:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=l2wFgDCFXe38bYfq7Sl4qbjTfnOuOoyOb6zM/5/GgxRD0fHrVhJ2yhzoMhvCdMTC19eOiW4T1GI9g3B2EIsskdKchReqtdIOB9pJbppUWJgOhBgWw/ZWqUEvFdojQRqxi30NfBf3wV5kf4VbDA1kY4OMKXB5GM0jbLrKqzVcXaapYaHgOR11xDWbVnpheS0n2HXjo9PUyYx5aEzzLSscFIZ0Ap8xy+Q9EIhkRukWGDvWBtI2A+6MN1WDNh/eiT8YuKbW54D6cFoceatd3PRH5mIITVjZQYGP3FmcQZGFlg8z3z/1pH4oitScdoANcuHqtWO5ZwW/2XvhsOMmmfN2GA== 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=BnFKjGyzayvxbTXBn7P2g6mEDGE7Rfwd1/Ga8cgf9030XeUlt0iwPVHinuHYRD8IIMj7agPE8VUdK9ab590zddnBBHfIkXi32bHcFPuyP80LQCakswz10D0+d6/Y/5+xEG1YDeGLn5GPV129HdTPIJJCMLGup9NA1PumQo6zBQH4jTwswVpCgnYWmHjb3P8j1zB04cKtGbHAccUuXfitZ90+G7OjRH/cxjw87Ll5j/LWrYYoGYi8lq6jtEjvu7ZHjbMYFYRlkY/3DX+UC2qQXCVwCQVoheZyhjxxWzUEPjMR97rgDilqMMsV5OzpVH38MWhnBHhrs6jA1oPZYoA75Q== 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=WiwPhS7Ypg+zO39l0ermOvhIiPPAZUBMNibg+DiUqwC9zBLT0Fes8jcRUStyFdmEbfryGkGfER6M3wZlVFln+SWm5HHU5kaScdkU0VCSpJUoBVbCIw07SORUdiEC/l3LD/w6fqJmrUQDtfqV4bmMq6NArWNUepkSPdxmSPYj7Z4= Received: from DUZPR01CA0195.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::26) by VE1P190MB1024.EURP190.PROD.OUTLOOK.COM (2603:10a6:800:1a2::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:43:03 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::32) by DUZPR01CA0195.outlook.office365.com (2603:10a6:10:4b6::26) 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:43:03 +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:43:03 +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 17/86] net/ntnic: add item port ID Date: Tue, 29 Oct 2024 17:41:21 +0100 Message-ID: <20241029164243.1648775-18-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_|VE1P190MB1024:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 90594764-fa55-4b1f-03d8-08dcf838c1de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X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lmWwaSCgRZ7LBOS0WF5Q/ZHKuNRCgmNh9x7Mb27YCFhN7dd?= =?us-ascii?Q?MahUC48TJMhSCHSlK28ZmPWsVxcNAvturDzsHWT3b/Xj49UXSgcdpYybwkt7?= =?us-ascii?Q?VVa2GEORXXAEQyIzAYWsibYxZX5u0neCmPQubzOXqobjlUi3174izwf6vtkK?= =?us-ascii?Q?MgDLs3PTRk6tO0f4XiIilS1DztG1PmRETYWbLZIlBnxzrXpcoAAsa/fMLuYM?= =?us-ascii?Q?yJp7Bf3h7+8hAhI5GVn4fD/0vVd/K6dNfEkvIN/6BXeDOQc9hTrzn/gXnB+Z?= =?us-ascii?Q?k+7WbWVCU78PxwkaZTecQgfBwHBpGS4DsFJETKpc1MzFGpup4VDauefwGoqb?= =?us-ascii?Q?JOxuqQOtE1nJ7fHihiZxXvMHa9WDsdMZ+gILsGe1en9v+90FdpS/5NDdLjt+?= =?us-ascii?Q?ENyluxCGUtfRPUtR6wX3Ny7OTTNW+tKKy1y9OiHORaDxljar4HXis5DpTNw5?= =?us-ascii?Q?tCSo9a+qMrGo2fhXEeyl1wJfn9ZG2CTpwr8gINKYWEJ9U/1+S4qF6kDL/HFm?= =?us-ascii?Q?Z4ivdUCVb0eP8dAE9tDLRdexjCZ54jNvlj2BcCXTVHq2H2wzGA=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)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: jEB8ExeVdcZHyBjbQU2kwtqnLPtKePhqpbTkOwLwPWayADxhVSXuwxXsafO2D7vQ4cfay8GJ2C4Ay9pV9leNr3AIsbNTgkKUWWXqjakEs5P7gmZbfoSCZl6tl47pYVQKopPcgv/Dj6qp2L0YbzgPtjEWciu1ggRtEfGSz+0H5lny7FZk7ICcRQGPynjquxGhxE8vNYKfLDCLl35KBwpatj9ikapmZOgGDCz9wcPBx4dvTQpTF9SeBcOVp0JSMsfYlVUKPtw2INNHQLjozLiB9doxTxlBHBHT5wb/eMQFbzLxOA6KR7rQjHGRVGLVtQPMRYAFIbpW/YGZLg/lXyS6gVPVT7kRqpJIL+Wt9a5c4qLKgjhUreBo35VmMRB6IShk8atPqLCYONfu4jl9UojbI5ZXnJh1ZCbWnHe+r7qwE5+UQ/GZJ6M40w7yu1vKnjInrhuKfmoGwchfoCe5/C5pNl1SeilM4GYBgb0qkrWmHErtDk/DuEeJ6xlDfxKPoDSPRICt/urf5o1O0j6m/czsJ5Y9whnB0JLPKRbzHdxRUpCsZJDq5r5v57tcvWMWd0DuoVmPsQwe2sudZkiCCu6o9uSk6D6aaU6lNcP//Lt1BVIvN8z+9UK+wCXxckNW3sn5i/ocn3ygjAEqt2AnwkWURZBL18teUV54An4/mSX3/PY= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:43:03.1521 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 90594764-fa55-4b1f-03d8-08dcf838c1de 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: VE1P190MB1024 X-BESS-ID: 1730220188-303097-12762-29331-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.11.42 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.260063 [from cloudscan14-53.eu-central-1a.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