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 1998343E57 for ; Sat, 13 Apr 2024 15:00:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0AB2D40E8A; Sat, 13 Apr 2024 15:00:48 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2083.outbound.protection.outlook.com [40.107.92.83]) by mails.dpdk.org (Postfix) with ESMTP id A032940E8A for ; Sat, 13 Apr 2024 15:00:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WeAGFO6OgW0gYqWHwwvP7By3a2LXagJ9HmKLRdjCPOR1E+NYRSOdrNSwOl4aY0/IWJrkYID5lvIwYVU3lLWNYj3QLFgz6C5q5ePFZ04FHLpzwsZLVDOVAABZouDg/R5rzFbwk0/KogMAeL37vjchDlRVwICrsT+RBiVdyVagLLZtOxs4dWlJGp5lA5lDYPcjTC4WeSO5iM4d2McaePCg1y3HOBCRePC7pG1bui7Nubx8TIS+SfJJXEk3Deynvma855uF9ChYe9U65MdnrlvBAmVFK8VPllJiGsgpPmXRuVi11/zMH9JWKvPsmyGg59BWhm1OQ3F3fUq0b/3ze+IfvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=F03UEwAXln6Xj2DKmkXA3MKfOMYcUPzFrIsk/V6fEds=; b=mOQH1HU7prWNSqL19QDcLb76KjhEtonwNjeFJlsda2uUItvuLdtOqkFaR9l3nhQOa9qn3RoENtvaMY38HKx8KidGKGG+zXWDodYshZEOTpwZgkgZuhTcQni2wEFRO6GoCbazZM7sRe2mFi1DT6Fzr6aLq7B+TXaiFHw/VKiLB/ZLQB9hAiXl6Oz3GzHGh7QuVA1gOW7pzgiLmcECkViFgnOlxbJEGJTtcHFY8khU0PfR95+oEfBeHLhhe5bRZs6DezS/eB/sMTTRG176qExVM94q8o3Xz+/hIDRjAmBGW8Q35YpvBf3nnXcafkYo1QJAu8UQddnnYryQ82Csb1BDZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=amd.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F03UEwAXln6Xj2DKmkXA3MKfOMYcUPzFrIsk/V6fEds=; b=ltJmBtrzU72uJvINuX4sRg6T/7E9ja298Qe8ijmcqyndWSGka9wcODObO7S0P3jSvEVXmIuq8gbqmTgJV7eP7SQumvMnwZ88ox/bDluJDnivtM6N12dpCHOiEvOOLkx6X2YqMIbtIMC/ly35rNG5A1xj5FqatppQkQTIpQCjSvlaeY+Z+v5lWyvsN2hXXug2mQ6+Epx6sOhy039WFtfVpC1SffFxoOLDQA2D8IrAFY4ofyVArjyxcum6aLmkpRs4QBRNNrkVBhYjF9vhftc6KM9SrXONVgoEZi6n4r6ZjmhLpdfOy6Tgo73GMAk2Yoc9JiOcDDeI3t/IbBvr5w2zvQ== Received: from MW4PR04CA0281.namprd04.prod.outlook.com (2603:10b6:303:89::16) by MW4PR12MB6729.namprd12.prod.outlook.com (2603:10b6:303:1ed::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Sat, 13 Apr 2024 13:00:43 +0000 Received: from MWH0EPF000989E9.namprd02.prod.outlook.com (2603:10b6:303:89:cafe::18) by MW4PR04CA0281.outlook.office365.com (2603:10b6:303:89::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.21 via Frontend Transport; Sat, 13 Apr 2024 13:00:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by MWH0EPF000989E9.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 13:00:43 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sat, 13 Apr 2024 06:00:22 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Sat, 13 Apr 2024 06:00:21 -0700 From: Xueming Li To: Shani Peretz CC: Ferruh Yigit , dpdk stable Subject: patch 'app/testpmd: fix auto-completion for indirect action list' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:53 +0800 Message-ID: <20240413125005.725659-113-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E9:EE_|MW4PR12MB6729:EE_ X-MS-Office365-Filtering-Correlation-Id: 07cbcb24-516d-47b5-9f98-08dc5bb9ba98 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9RJF1ExLyZQLNSYBOa/9QvTu5mTAkwWx/kdeVYui89iVVU2aUwLQ8sLiOP4Q8rZuOI+wu04QCvu/+dDNcWSUPauys6UZMdMn/YJ6K17NnROmIKJxy0bnXag3uAeNd2kL0SCwT3WWtzYkwj9CP9197ZZx1D7+jjg9ghzLXEkaZt+d/N9YYf0zVfxpkFB/EcnWB/fyfVHH2QrWk3asVEf4wCvSRHn05+xkiTWLfNUdQbMnwXQgYgMg0dXjfmE7MBDHDgkPjdCmbHQhAA0/Ej6lyNpVE1tqCMwQx95QK9uJY8C+1oQzXFYBAzRYDzSCMXScYQJRNDmu3VHbbSUJKwIJpYcdqQzAt6R16xKaMOFXvvNcjR5BrzQU1e+8QGjj/e+iYzMiQwP2TxQycaNLizY/qorOITXf+LWaNZhvpXiJDpZ0lol5KGB+0wJbwJUxz+hZGNyH0hFLHuzuzJGMTcMuqgbevnAgL3GcKBDpCzr4k2IBexof6NQerC90GkHfvhKB6Z03mkPI7CJgmPqbKWW2TdpfXg46OqyHNn+tEjWGw1oUBSQM1oDtWxcmqkqWCV/lAhKdK7rtXJFVDrRBF/Gh1Rv5fspt4miPbiocqIBQu2zFU5LJ2EYQD53RUs9z2wBtQ1cJG3+oKTDZM+jAzGPBQgZFgYhhp7tNbjMxLZpwBd/XP/pIQ8lrvc9uTfTDTa9Api2v/Z40wPiF930EPVEYlsAVWnsqc7kx+1dxfGe/f6iP+cHHMymI476zpZpsCovc X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(1800799015)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 13:00:43.6472 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 07cbcb24-516d-47b5-9f98-08dc5bb9ba98 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000989E9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6729 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=f7d1b5cff39f423c2afcb4f8a12c9e2abb63bd50 Thanks. Xueming Li --- >From f7d1b5cff39f423c2afcb4f8a12c9e2abb63bd50 Mon Sep 17 00:00:00 2001 From: Shani Peretz Date: Mon, 18 Mar 2024 11:21:09 +0200 Subject: [PATCH] app/testpmd: fix auto-completion for indirect action list Cc: Xueming Li [ upstream commit aaa5b54d3890cf32fa1eabbcb3e306ebdc4f938c ] In the process of auto completion of a command in testpmd, the parser splits the command into tokens, where each token represents an argument and defines a parsing function. The parsing function of the indirect_list action argument was returning before having the opportunity to handle the argument. The fix ensures that the function appropriately handles the argument before finishing. Fixes: 72a3dec7126f ("ethdev: add indirect flow list action") Signed-off-by: Shani Peretz Tested-by: Ferruh Yigit --- .mailmap | 1 + app/test-pmd/cmdline_flow.c | 46 ++++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.mailmap b/.mailmap index 3b32923fef..57e72894c0 100644 --- a/.mailmap +++ b/.mailmap @@ -1281,6 +1281,7 @@ Shahed Shaikh Shai Brandes Shailendra Bhatnagar Shally Verma +Shani Peretz Shannon Nelson Shannon Zhao Shaopeng He diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index b19b3205f0..681924b379 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -7395,11 +7395,13 @@ static const struct token token_list[] = { .type = "UNSIGNED", .help = "unsigned integer value", .call = parse_indlst_id2ptr, + .comp = comp_none, }, [INDIRECT_LIST_ACTION_ID2PTR_CONF] = { .type = "UNSIGNED", .help = "unsigned integer value", .call = parse_indlst_id2ptr, + .comp = comp_none, }, [ACTION_SHARED_INDIRECT] = { .name = "shared_indirect", @@ -11334,34 +11336,36 @@ parse_indlst_id2ptr(struct context *ctx, const struct token *token, uint32_t id; int ret; - if (!action) - return -1; ctx->objdata = 0; ctx->object = &id; ctx->objmask = NULL; ret = parse_int(ctx, token, str, len, ctx->object, sizeof(id)); + ctx->object = action; if (ret != (int)len) return ret; - ctx->object = action; - action_conf = (void *)(uintptr_t)action->conf; - action_conf->conf = NULL; - switch (ctx->curr) { - case INDIRECT_LIST_ACTION_ID2PTR_HANDLE: - action_conf->handle = (typeof(action_conf->handle)) - port_action_handle_get_by_id(ctx->port, id); - if (!action_conf->handle) { - printf("no indirect list handle for id %u\n", id); - return -1; + + /* set handle and conf */ + if (action) { + action_conf = (void *)(uintptr_t)action->conf; + action_conf->conf = NULL; + switch (ctx->curr) { + case INDIRECT_LIST_ACTION_ID2PTR_HANDLE: + action_conf->handle = (typeof(action_conf->handle)) + port_action_handle_get_by_id(ctx->port, id); + if (!action_conf->handle) { + printf("no indirect list handle for id %u\n", id); + return -1; + } + break; + case INDIRECT_LIST_ACTION_ID2PTR_CONF: + indlst_conf = indirect_action_list_conf_get(id); + if (!indlst_conf) + return -1; + action_conf->conf = (const void **)indlst_conf->conf; + break; + default: + break; } - break; - case INDIRECT_LIST_ACTION_ID2PTR_CONF: - indlst_conf = indirect_action_list_conf_get(id); - if (!indlst_conf) - return -1; - action_conf->conf = (const void **)indlst_conf->conf; - break; - default: - break; } return ret; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:08.477437587 +0800 +++ 0113-app-testpmd-fix-auto-completion-for-indirect-action-.patch 2024-04-13 20:43:05.137753749 +0800 @@ -1 +1 @@ -From aaa5b54d3890cf32fa1eabbcb3e306ebdc4f938c Mon Sep 17 00:00:00 2001 +From f7d1b5cff39f423c2afcb4f8a12c9e2abb63bd50 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit aaa5b54d3890cf32fa1eabbcb3e306ebdc4f938c ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ -index e189477a2f..a0b19832b5 100644 +index 3b32923fef..57e72894c0 100644 @@ -29 +31 @@ -@@ -1293,6 +1293,7 @@ Shahed Shaikh +@@ -1281,6 +1281,7 @@ Shahed Shaikh @@ -38 +40 @@ -index fd6c51f72d..60ee9337cf 100644 +index b19b3205f0..681924b379 100644 @@ -41 +43 @@ -@@ -7839,11 +7839,13 @@ static const struct token token_list[] = { +@@ -7395,11 +7395,13 @@ static const struct token token_list[] = { @@ -55 +57 @@ -@@ -11912,34 +11914,36 @@ parse_indlst_id2ptr(struct context *ctx, const struct token *token, +@@ -11334,34 +11336,36 @@ parse_indlst_id2ptr(struct context *ctx, const struct token *token,