From patchwork Thu Mar 7 10:27:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Etelson X-Patchwork-Id: 138097 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7D8B043BA7; Thu, 7 Mar 2024 11:27:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0929242D26; Thu, 7 Mar 2024 11:27:53 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2069.outbound.protection.outlook.com [40.107.92.69]) by mails.dpdk.org (Postfix) with ESMTP id 61EC040272 for ; Thu, 7 Mar 2024 11:27:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MjBFkS+pUaPwuiuX+m1Dv4DN7ekzHfwiSf1Lf5rd1eeu+HwSYDnuAkAej1FVbVPJEn1rGcU5UfJusvRLePv8VPioYPUZE0iDcviBXY4k1FATZc99eGwcpkwnE/wjr+8AP//It95m2FHYe87jOh0v+Q2Elqjbi10+zP7bq5SbbEX8fAQBaL6MgnWXhTTpE9+RvQR51zEubLQQlWbKZQSKKQzoGSZ6hMi16qen+/i8etsIjZ3GVgaU44aa/MMHtdTdMBSz1BAol0hrTjOWamMSphU7+XMDQvxLF3nVGOVZ900LINNVtu1zqhqZ8J7CZ0RR4bm11CihdnOr7RD4GuMK4w== 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=bgZDE+fwQa1zpFa37Kh28MYgnKkjG0HSI64KyzC7OtI=; b=MsFshzYabw0+x8Rak/bhnqkbTgkS93TAnWDe2PbOJWnSq7NUJTH6mEL4O++I5+j8TnofbzUYK13VgJrWOj+HSUIDUt+kgVBjCFXyqj/iPyyXjXjvGfTp9p0TqDYiNYi6oaFbRp4/yHJN786ZYU/g47pINOrwthcWhwxfVWz88uyEMUowjt3OcGI5cABOJGX1bIZ1S0PHzDFycGkGz1oYJ+AYPCslh5dQRQzaTQPNN7G0Hmi1+lixgx7v5ERz96Ueskt52f0HMOwbTLOfSVkskQGEv0xWP0TU1BtWJD9ThikpAZ69elQFNSNtoeT9dmgpFivgOBJaiRw8JYfcx41LGw== 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=bgZDE+fwQa1zpFa37Kh28MYgnKkjG0HSI64KyzC7OtI=; b=MF7syCGn8/SfVpCKOtv8js6j79bZx5gPYWGI5zJqsUCcW2su+A13ku6x9s7hTRRIygNV32xde7qQfHCyhX3kmMc49eZl2ffozHQlusTQeSmptzETq0f2U54kYORLr4taswcPIuwAdJFm6jKE+XUpvxMu0QafXzCMT+b6H44IZ7XR+s38e16txdpjZhUksvtU+H1GAg+o0slaOvcal9/Qm6sedCd6ORtS4l+ZIJn/cYWR8AeclE8EAVd7YkPCFyU7qpumGZI8G3xSm0ptUzWa0c+T4twK5ww/RjmIQHGKfhHREDQi+yECZq2iiLqq1s04jYy6XcAPjjbQrp3sZlPvcA== Received: from BN9PR03CA0986.namprd03.prod.outlook.com (2603:10b6:408:109::31) by MW3PR12MB4377.namprd12.prod.outlook.com (2603:10b6:303:55::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Thu, 7 Mar 2024 10:27:48 +0000 Received: from BN1PEPF00004680.namprd03.prod.outlook.com (2603:10b6:408:109:cafe::5f) by BN9PR03CA0986.outlook.office365.com (2603:10b6:408:109::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.27 via Frontend Transport; Thu, 7 Mar 2024 10:27:48 +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 BN1PEPF00004680.mail.protection.outlook.com (10.167.243.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Thu, 7 Mar 2024 10:27:47 +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, 7 Mar 2024 02:27:33 -0800 Received: from nvidia.com (10.126.231.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; Thu, 7 Mar 2024 02:27:30 -0800 From: Gregory Etelson To: CC: , , , Dariusz Sosnowski , Ori Kam , "Aman Singh" , Yuying Zhang Subject: [PATCH] app/testpmd: fix async indirect list action creation Date: Thu, 7 Mar 2024 12:27:11 +0200 Message-ID: <20240307102711.1138300-1-getelson@nvidia.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004680:EE_|MW3PR12MB4377:EE_ X-MS-Office365-Filtering-Correlation-Id: 77cba809-4163-45ae-b3f7-08dc3e913c27 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ToWrQhZ4hBRNStvQVQm4SNEmOFr4xHz4evVgM+QL7veu9Yeeu3mYPRKmAa85Daukg2hJqJ1NZFJK1zHY3PJbF0XrsZj3OQDUfA0T+GEzulZJM9swpbz2WfA6Gp7/BqtDodpC7Pcuu7r1NzBN3DxVKrHveROZCPrdekoM8EY7Uh7yxakh55TtUU4Xf1xA0Z3chE4Y842/DfirYTDPdbtic4wI0MHUiMDd9YyXd4u97jr6+9o4qhQRvN2UAD0nZ/ASoPe1NKKQAZXIZ/kPy/ytJgI8Ofbxq8Vm1/hplHiwT3YK7fQhNurxRnDv3GkNK7TTmFHt/K8oHJ2dhseJiryZfbX/FR4z/putvltH9b2RNLanm+9HM3pS99oujgMpYFuoE5i0aSfpdScywSrCzo6T4Uj9DFun3B6eTCCNyEVMhnDX8QDV7J0VFA95FvAN5Q8ZNAAT2YHCBC0sfiDhp8Txc4OBnlWA+oRhKkckAML/hflTKaklhLc1YvNcxp/qF9Z18ICqIpPJUmda4oJ/KsSuwf6V03tu/o95UJzooMxGNXEw4ddZ9+qvu9D72x0wlqeiq8ltuS7KuZmdigyJHVIK82sxQgSxKa9UO81Dum0icCs2tfrgCxXwAQQlwJTQEdTRMJ9KNchFeiFWyUJT+l5/GbGu4Z38bqk/l1/Gq9V+q6aklm8L8dcD7BJrJFuh14s/LCubQriCXN1SHS8by7f/wuxTTV6sMsUXfTXwj5T7/ka0nvS29akZM6OBScrC736w 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)(376005)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2024 10:27:47.8307 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77cba809-4163-45ae-b3f7-08dc3e913c27 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: BN1PEPF00004680.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4377 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 Testpmd calls the same function to create legacy indirect action and indirect list action. The function did not identify required action correctly. The patch adds the `indirect_list` boolean function parameter that is derived from the action type. Fixes: ee752a734d14 ("app/testpmd: add INDIRECT_LIST flow action support") Signed-off-by: Gregory Etelson Acked-by: Dariusz Sosnowski --- app/test-pmd/cmdline_flow.c | 1 + app/test-pmd/config.c | 5 ++--- app/test-pmd/testpmd.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 5f761903c1..fd6c51f72d 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -13237,6 +13237,7 @@ cmd_flow_parsed(const struct buffer *in) port_queue_action_handle_create( in->port, in->queue, in->postpone, in->args.vc.attr.group, + in->command == QUEUE_INDIRECT_ACTION_LIST_CREATE, &((const struct rte_flow_indir_action_conf) { .ingress = in->args.vc.attr.ingress, .egress = in->args.vc.attr.egress, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 968d2164ab..ba1007ace6 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3099,6 +3099,7 @@ port_queue_flow_update(portid_t port_id, queueid_t queue_id, int port_queue_action_handle_create(portid_t port_id, uint32_t queue_id, bool postpone, uint32_t id, + bool indirect_list, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *action) { @@ -3108,8 +3109,6 @@ port_queue_action_handle_create(portid_t port_id, uint32_t queue_id, int ret; struct rte_flow_error error; struct queue_job *job; - bool is_indirect_list = action[1].type != RTE_FLOW_ACTION_TYPE_END; - ret = action_alloc(port_id, id, &pia); if (ret) @@ -3131,7 +3130,7 @@ port_queue_action_handle_create(portid_t port_id, uint32_t queue_id, /* Poisoning to make sure PMDs update it in case of error. */ memset(&error, 0x88, sizeof(error)); - if (is_indirect_list) + if (indirect_list) queue_action_list_handle_create(port_id, queue_id, pia, job, &attr, conf, action, &error); else diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 55df12033a..0afae7d771 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1002,6 +1002,7 @@ int port_queue_flow_update(portid_t port_id, queueid_t queue_id, const struct rte_flow_action *actions); int port_queue_action_handle_create(portid_t port_id, uint32_t queue_id, bool postpone, uint32_t id, + bool indirect_list, const struct rte_flow_indir_action_conf *conf, const struct rte_flow_action *action); int port_queue_action_handle_destroy(portid_t port_id,