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 030C045C24; Thu, 31 Oct 2024 16:03:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F089A432CA; Thu, 31 Oct 2024 16:03:09 +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 E0F7840273 for ; Thu, 31 Oct 2024 16:00:32 +0100 (CET) Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02lp2110.outbound.protection.outlook.com [104.47.11.110]) by mx-outbound47-58.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 31 Oct 2024 15:00:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b3Aa42UT7m9OVanXOoVf+AQZ0AgWuZ+a+YWa3G6vH29D4FvXkUv64z3KuWsdTvz89nuJDpbegGKAANfvH1dSHLDN4eZcy6YnSTOfLNDxOHfjFXXdyaXmMfBSiQLqcnjuwqQJPjeXHOTF2dnr2DoqJqGnNSM3r3KfBEuvvv1JADCJUUXQFXhvhohLFWCSo0D8lRR5xl4JGEB7cxgtazkdWWHrQ6WB4PrL4zjAGmIC0AI9WGljBhNIP+zJlYNBBwb8yoWArUIEFYs8LeiA6dNStLtdsj/p/CrF18yJhz/cPU8GM4tHpZ3rp0qRLmCCiHQ5MCyMepBNX1wN+AOF39Gi0g== 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=fCOkcJ2C9w3pLI8DOlp3wG9UiLbQ5ri8t+Mw9AS7GhM=; b=knX1U041zpLwfXLMwCkp36fBIxFtxf+OVOHRXNJbyO0Cruf6hccTUHhXCSnpHhY1pQNXsAieThGPmmP8XXLG2bplbodxvYGCh6djLreaumUWD1KfIl7gFUOsWAm13u+YaL7HicDgHEysU2PoBeAmPM3JxELiT8cDqIJAJ2Imh0JaStUN4tMNpozlHqM7jtw5/ROW6D2nY43GzVqLeU4Ff5x+uu441EN9Pas5MnTpBWdnqQRLE/9K2hOObmSrZs+iWiAvx7gf0YUa6BEs7kxsCzUrO48Pp1G+a73mEcEqirG7UZ7zAr2i/8pEZljjGXXPPwGV6aMDYcUagu3AMtQI3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=monjalon.net 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=fCOkcJ2C9w3pLI8DOlp3wG9UiLbQ5ri8t+Mw9AS7GhM=; b=Z0QAksFD8ejzQhwxD5QYnHw2cN6hudhtZ0L0GnIbzrdYH4AVYdf3JS9O7UXXRurffrfA5ys8K00JJ/5i1cdTckoNBTITLpIg6/M6+7GhAWG25DINiz9DOQeT4kmlDXf/X1eJddlJnXw8sD5Gj/Tt6uIsPYI/W5lkQ1ZKGGnCuIM= Received: from AS4PR10CA0015.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:5dc::11) 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; Thu, 31 Oct 2024 15:00:22 +0000 Received: from AM2PEPF0001C70C.eurprd05.prod.outlook.com (2603:10a6:20b:5dc:cafe::4a) by AS4PR10CA0015.outlook.office365.com (2603:10a6:20b:5dc::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.23 via Frontend Transport; Thu, 31 Oct 2024 15:00:22 +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=k8s-node-23.default.svc.cluster.local; Received: from k8s-node-23.default.svc.cluster.local (178.72.21.4) by AM2PEPF0001C70C.mail.protection.outlook.com (10.167.16.200) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Thu, 31 Oct 2024 15:00:21 +0000 From: Danylo Vodopianov To: thomas@monjalon.net, aman.deep.singh@intel.com, yuying.zhang@intel.com, orika@nvidia.com, mko-plv@napatech.com, ckm@napatech.com, sil-plv@napatech.com Cc: dev@dpdk.org, ferruh.yigit@amd.com Subject: [PATCH v1 2/2] app/testpmd: fix flow destroy Date: Thu, 31 Oct 2024 16:00:10 +0100 Message-ID: <20241031150010.2991953-3-dvo-plv@napatech.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20241031150010.2991953-1-dvo-plv@napatech.com> References: <20241031150010.2991953-1-dvo-plv@napatech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C70C:EE_|VE1P190MB1024:EE_ X-MS-Office365-Filtering-Correlation-Id: 70c41c80-80af-4eaa-5b7d-08dcf9bcbe3d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Ky9TK3RneDhVMW9UWGlmNFFuUEgwbVFBN3NHbTBHSytNclhPUnZHU0YvalUx?= =?utf-8?B?QVRwdW0ydlgzODVQOERRc2dINng4NDZvalVObU5HNG5vdFdhQkdKT0cyUmlI?= =?utf-8?B?N2QrODJ3eWtZWnpHUjd0NW9ETWxaMzFjSHozb0N6TXdIVG1qT2daMHBPUFk1?= =?utf-8?B?ZE5udkVjN0hYc3BlWGs1MGNzOC8vUTgzK0U3WVlXNFRUbllpVStKd1cyRnVQ?= =?utf-8?B?SnBPZnVZODB6cXBUTlVkdXdVQmdaQ0grR05EQVRabHZTbWxvRjFsMENWcDVB?= =?utf-8?B?TzFucmcreW5kZm94Qy9XQ2FoTlNQTHhaOTk1YnJ6L05wN3RYdmUvK3VZMEhB?= =?utf-8?B?dTM1bVpRSURRNXU0UFluaDVHV0ZwUmcvQS9yOWdYQTl2RHVMSzRGc0YrUkpC?= =?utf-8?B?MkppTHYyL3pUdk05dndKNjBKRXRpQzdhVTVmRkc1TE9nVVQyZWE0QStIRGtv?= =?utf-8?B?RVNNRks4YkZ4UWlHWTRWMGtTMS9iWnJKeEtxcStQcmN6SkRYdlFyR09RVm5H?= =?utf-8?B?SlVYMjZ3NzZaZmQ2ZzB3MEF2ODNjbVFZbVExcGs1aWVSL2ovajNaenZERDZV?= =?utf-8?B?T3lDN3NPeDZ0dXo2V2NZeDFrQXAvSnVYWkp6Q2FWK3pZSzFuV1kxV21NZzFk?= =?utf-8?B?ZXhNN09McCtmUWJDdW44RnJJYmpEVVlmclAwT1drN2M2dlJTU0x6Z3VvTThQ?= =?utf-8?B?SU9mNEU1ejhuRjlpZWtZY0I0d1JFYk9YU1BhNXg5dU8vRHg2ZDJwaFVqdkRy?= =?utf-8?B?WVdzRHA0WmQ0QmpSR1V5Z1NiUWR1emFBL2JwRXNHTEJZZkN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NNdVMwNGxMdnYzTVNvQ0ptOHRJcjBjeG1xOW96?= =?utf-8?B?Rk44Uk5yZ0pNSExrUXZGWDBDZUExL1J2NlpTYzcrUWVuT21GWWVtb2ZYa0cz?= =?utf-8?B?TVpSOGpYa2pPUmFFMnlmMWhnTHN2bFpISXRGd2gwUlRZbjdKUDhiczRPRVdk?= =?utf-8?B?MWJjbXV3aFphWXcwRXJENHlQRFYvOG1EMG1pclROWjVOOUE9PQ==?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:k8s-node-23.default.svc.cluster.local; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: cx4dQ+CUcFJss6XU7HqnZDJL9y65+y58yxtzwZlbkTfj+FoP7yydsxu7lRLYGlRFF9kYsuHsrH0M5p5DmrXadXlXhKA7g5A0TWgVtXy3nb8+sego9xNBygbjdYCV0EdNZbvuzEIsOsa42TZD2k8V99KOu5b5DUGztBGfx90bElvBhpCsa2vN1tGj47ejpXthKZtqzl+3Hoo8yy6YOBLq+VtJqAtgySkLVPfB1Cgok6QkJ3Yrb+jFN2O0Q6YO/tE1TsoX8BiUysh+QOcCUChiS6chDDl0drdbgKXSeAQ0/v3cDHyKykM7DcBghCpnIb9YxYZXgvDHDseLKPG7RgtfmwkklB75d6baVv2ZvZbEHvLip7Nb8BMJtbCK6yS+4GFmaPERYnYKNIGFqmLK0QFETTzzc3sdTqfRaUxX/7YAU1snmvwZJTyJcHTHPQC7TtG1NsOzRgoBQtkQaqPd/HytH2jv+Zn0WaBx5e41saicIDryXWThXtt/EJfIolZDBsrGO9wjVVIDAX+OQG4EAKcr7P0Wj8jpA0AqvHI6w10vXppIDElC/B+H29a/q1kwHM2eVtO4BpxNdJud4gf8wmx9MdXmrqJ9gQR0AbVcV5nICqj1feRxF8OYRlrx1cwtVpWH9KEEUpNxRsS/dvJLFXtP7mYPWDalyoq9XB60rL3TD+Y= X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 15:00:21.7815 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70c41c80-80af-4eaa-5b7d-08dcf9bcbe3d 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=[k8s-node-23.default.svc.cluster.local] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C70C.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1P190MB1024 X-BESS-ID: 1730386831-312090-12771-31733-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.11.110 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVoZGFiZAVgZQ0MzEzNLIzNjC2C jFMDHZPC3NKNnAAEibGJuYGiWmpijVxgIAjw5OSkEAAAA= X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260105 [from cloudscan11-84.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-Mailman-Approved-At: Thu, 31 Oct 2024 16:03:06 +0100 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 Avoid removal of additional flows after requested number of flows has been already removed. Issue with removal of multiple flows is internal testpmd bug at port_flow_destroy(). This function goes through all flows and compares given flow ‘id’ with them. However in some cases it can advance pointer with “given ID” and thus remove additional flow. Fixes: de956d5ecf08 ("app/testpmd: support age shared action context") Signed-off-by: Danylo Vodopianov --- app/test-pmd/config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index bf50f6adef..50c4b018c1 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -4170,8 +4170,12 @@ port_flow_aged(portid_t port_id, uint8_t destroy) ctx.pf->rule.attr->ingress ? 'i' : '-', ctx.pf->rule.attr->egress ? 'e' : '-', ctx.pf->rule.attr->transfer ? 't' : '-'); + /* use local copy of id as ctx.pf is freed by + * port_flow_destroy() during processing + */ + uint64_t flow_id = ctx.pf->id; if (destroy && !port_flow_destroy(port_id, 1, - &ctx.pf->id, false)) + &flow_id, false)) total++; break; case ACTION_AGE_CONTEXT_TYPE_INDIRECT_ACTION: -- 2.43.5