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 1BB49432E9; Thu, 9 Nov 2023 19:37:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D9C8540A67; Thu, 9 Nov 2023 19:37:19 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2086.outbound.protection.outlook.com [40.107.244.86]) by mails.dpdk.org (Postfix) with ESMTP id CC2BB4026B for ; Thu, 9 Nov 2023 19:37:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YJWOmwemyYHS54sXS1/Yd5SuzCSQLalbf3pSNx091uGzWX4aDcG+gbS+dWXzQ80QgnrfyEVs89n/nreiKlCPzJ87RTIesNh3iyXWUTcLGULiExkUGCZa/C8EZxo3/hwenFozzWmGQH7B8ouac6uW/Op82WUMjPy15CnhWVpm7M1b9dMmhbOey/aiZIah2geN4ilC16pOGw1P/kRIVep7rJq54XKYioHhoR4zhrVqk1radbsk1AiJk1eNgh90bYTMePZIZ1JyEdCPXsJbc9oTJGDGF83YOJVxCGTMOdPioCy7Kz4SdAnn8CLTs6JejbG8DE3tNsHloOs6Bh3OBXgW2Q== 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=GH97sy1Ih13ZTEon+Xpp1h0fPaiV2BGa2+vhAg8SOkA=; b=G/MACvs8oIZuIgmqWst/ahj/+V6mz+z4QtZFEpHlGXeTKM4UEpoejb6jJgcwJq2bD9UCH5z9JCF/kGP4a2ohREnh/8sDPtiEWs72h5oAjOptKyGUzGoBi1AVhMq44UUF7a7ImB5ja9wzodrDiIUntw3wUCY96JIUYOC8/SQu5746U1c7mal/03r0mwToPn3jfdgXPutpEbKzHbPP2yhTST0p3kr12lhjLc2843YRnrVsk4x+q74FEcaqfdHShZsJTwvPrRAfoYeSdqFyaPZbZHcosAdVNzEayiwW4WDXw9O1FC2Yzch27l/6MzBkBhDhJwq6az9h9hTLB7ea+B3W6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org 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=GH97sy1Ih13ZTEon+Xpp1h0fPaiV2BGa2+vhAg8SOkA=; b=Xxm33KGSoNXcgrntruMb+T5hVprTNWMUqj6K+pXWsFc+TFdAJ0QbgItle8Kl5r/rqPXNe6A0cHGdj099VdVNuuhOq3yECUdP4PPAP3ZjC9Ml0tJ0LCcExyNUluQsaoz1eJuONCsnSU0HTRiyEa0kScW7sYQAVeexsGiP2A7VnlUoGvUiXuvBVUAbPGeGN9L/jRbl5iVaBQWB4FVoHoxAf/u4kD0KqzyywB7MJfi2D+As6HWnYV8S7NPgBEHDnK7CY+5ZoJ55GNl3bq37lx83vp3MBHVoWTliHI+iIOFQHpooWmNzsBzVBjWkpU9vwZ5jMa+D3vdqDuQCr25VSEOZwQ== Received: from CH5P220CA0017.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:1ef::8) by CY8PR12MB7243.namprd12.prod.outlook.com (2603:10b6:930:58::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.29; Thu, 9 Nov 2023 18:37:16 +0000 Received: from MWH0EPF000971E2.namprd02.prod.outlook.com (2603:10b6:610:1ef:cafe::c5) by CH5P220CA0017.outlook.office365.com (2603:10b6:610:1ef::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.19 via Frontend Transport; Thu, 9 Nov 2023 18:37:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E2.mail.protection.outlook.com (10.167.243.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.16 via Frontend Transport; Thu, 9 Nov 2023 18:37:15 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 9 Nov 2023 10:36:54 -0800 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.986.41; Thu, 9 Nov 2023 10:36:51 -0800 From: Gregory Etelson To: , CC: , , Ori Kam , Aman Singh , Yuying Zhang Subject: [PATCH v2] app/testpmd: fix indirect action list parameters parsing Date: Thu, 9 Nov 2023 20:36:37 +0200 Message-ID: <20231109183637.498742-1-getelson@nvidia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108163445.422772-1-getelson@nvidia.com> References: <20231108163445.422772-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E2:EE_|CY8PR12MB7243:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a2084d6-2a74-476c-5265-08dbe152e55f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: l5xj4RKgG7ItAgUe8t1GGwDCCLc5l5l/+Ja/SZ2pEBfDE/5JndpU+JZIL7teLVuAc1Kd6syKMbCHNaqvp3o8apTUjXDCcndxv+MRlFHnXqOubOK973WaqlbCJlXrZE6IitG/2c4SISygTyYTT74SMZtSHQUB+SRFbgB36NwviYY/1TSwPrMjztiG/YuI0sfKC7Da+IszL0vpfSeC+Y+DPV6DO7H7ADhvpKZvZg5xE+MHOGSP6+jU3nl5jWV9auqB3HAc2QvGpPTofEDVT1g5Dn+D15TnT8forOBOGtALSPZFe6Yvsj1zjppVMu6TFbdu3k0kju2JupNGZAB2HQffdK83efsJnmvkUnMTHaxRaSFJ4WZlX1iZyCogfiYk6xiR+MIDuRS5AVOH91tbE1jCbHLYXTShnghRLGQ957rvcc7iKCw7YfzHtZjWWN4FFi+5C7g9Uo6FaCO6ZQ3hjgjFMng2Hsv2GsopnZzQf/jMRFDc/rL+uaUK0ODioZ6cB5IjgeiGm8Da/Fd35/Wh1Mg6K2tjHhGRUl8ASWjzrJRUFI5HkK+WRkFxhYGH9g/hEI1yiolOS9dX5GbE/tSgIQWbKtvsvrKSGLAM2VyJMH42i2SbSuA+ITUbs5Bt6Wt6iL1FP5Pfip/LG3TCKEgDgVbpOdGnCtAUOyMkPBZQOCsUVrB82m5szJFgZtrLdz4ln9wcHhwM266WxR+tjRQR8LHADEb7FBspNwJvB9OXy/obQBs= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(186009)(64100799003)(82310400011)(451199024)(1800799009)(40470700004)(46966006)(36840700001)(7636003)(336012)(1076003)(2616005)(426003)(2906002)(26005)(6286002)(16526019)(86362001)(5660300002)(83380400001)(316002)(47076005)(4326008)(8936002)(8676002)(356005)(41300700001)(82740400003)(55016003)(70206006)(36756003)(110136005)(70586007)(478600001)(54906003)(7696005)(36860700001)(40480700001)(6666004)(40460700003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2023 18:37:15.3135 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7a2084d6-2a74-476c-5265-08dbe152e55f 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E2.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7243 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 Indirect actions list arguments parser was configured to place target number into 64bit value, while the code provided 32bits memory. The patch updated variable size for translation results. Fixes: 72a3dec7126f ("ethdev: add indirect flow list action") Signed-off-by: Gregory Etelson --- v2: define `id` as uintptr_t --- app/test-pmd/cmdline_flow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 0d521159e9..397f9bc3eb 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -11331,7 +11331,7 @@ parse_indlst_id2ptr(struct context *ctx, const struct token *token, struct rte_flow_action *action = ctx->object; struct rte_flow_action_indirect_list *action_conf; const struct indlst_conf *indlst_conf; - uint32_t id; + uintptr_t id; int ret; if (!action) @@ -11350,7 +11350,8 @@ parse_indlst_id2ptr(struct context *ctx, const struct token *token, 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); + printf("no indirect list handle for id %"PRIu64"\n", + id); return -1; } break; -- 2.39.2