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 0236543CA5; Thu, 14 Mar 2024 12:43:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F03B742EBB; Thu, 14 Mar 2024 12:43:28 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2054.outbound.protection.outlook.com [40.107.237.54]) by mails.dpdk.org (Postfix) with ESMTP id 7966B42EA8 for ; Thu, 14 Mar 2024 12:43:21 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ver5bGLYQ97F7rLpnFJE6Sj89AC8EwPU9IjfJET1JcyRB1M7q/QyCznGb459+R3mHr1ejABY/QLpm9auWeNU95+hdKEbLG9Tbn/DRUYUP55U1UDy1ZF3SkO1GG+5hQlfcGddWjjAMwdkhPk7tLYMtFrA2WWs1xilqZ1uRDOE2Ut1Vc4HyPAYvJau7I7EEaEMpafUH7y6xHKUFIyf8cH/R3kkURZVB9x6o5GCwjxfry6k32LV+8STWszzLFpjLaCDUSORHl2VZnDZTWFgLaKNqmUfCROf6kh1IDShDevsvlnzY/YudH++30pStkJeMQIAzKXaDEyJYZ/B2SAB377TTQ== 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=Cx06RviQA/BcyHoUJNh6LyGqfiZBMQWWd4HL5w4QWno=; b=T+mEuTJ9CbyRvi0ftEDnK9/6fxMxb+6ZMpnum2zDymhxm+ldfWJsjsF4qBuP1Xm4IllprkttlhBWra1jVFuxjX3duixy+C9Cogs5MeX1LmIRKT+7fOrBJHIEaAXHVDxphI24lvySdvfh4gUP2SyuatwOsep/ifuE2MqZsxj0FOeBScqeH3frC4xcYIhmcZm6Uk3UDH/e7vMUHHBQAcBXbm4EpxQKu6XgY5z7XRngrFGxBpji3SYSARK/bvRWlkqv1N3Ck6teiRa6L22gFTfKXXrqbvdGMZyIC7IgEQQ3HqNRXc6nG0fuOSrH0EuytTWtGM9dIV//cpJWgRebFmkNsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=monjalon.net 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=Cx06RviQA/BcyHoUJNh6LyGqfiZBMQWWd4HL5w4QWno=; b=iwyt2+ntxZ0gAjxUU9ZrPE98KCkpeZtm87O0Zqfm6OP4TT83MyD33hcm+SndHQ301QpWLMXuGdsowz2vByIRMvgGj++Cxjm3NTLBeSjImf9pkzp4JaJw+7L1EA+2cNDe165dyQYVBy4bZ5Xj47E6JmoRZ4pPZlV5Ee5rsnshMhO1aPrIeQZ7hPO5ST5mLZ7+d4IlDxTacvsCx/njEmuh2BHwJh8vVEFYj/Nbj3xkJ3e02S45KbUkRYXB6BYqi11dx4JgaXMbhahiGIJeNzeC3Jv8/cLJommIPoHVW4NyZT3sZd7Q27K+tFBEPMGSGXT1leO2wRdzkZcSDjLTo9Ve4Q== Received: from DM6PR21CA0009.namprd21.prod.outlook.com (2603:10b6:5:174::19) by DS0PR12MB7725.namprd12.prod.outlook.com (2603:10b6:8:136::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.35; Thu, 14 Mar 2024 11:43:19 +0000 Received: from CH3PEPF00000010.namprd04.prod.outlook.com (2603:10b6:5:174:cafe::19) by DM6PR21CA0009.outlook.office365.com (2603:10b6:5:174::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.7 via Frontend Transport; Thu, 14 Mar 2024 11:43:19 +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 CH3PEPF00000010.mail.protection.outlook.com (10.167.244.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.12 via Frontend Transport; Thu, 14 Mar 2024 11:43:18 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) 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, 14 Mar 2024 04:43:07 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 14 Mar 2024 04:43:06 -0700 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12 via Frontend Transport; Thu, 14 Mar 2024 04:43:03 -0700 From: Itamar Gozlan To: , , , , , , , Dariusz Sosnowski , Ori Kam , Suanming Mou , Matan Azrad CC: , Subject: [PATCH 06/13] net/mlx5/hws: simplify send_queues_close code Date: Thu, 14 Mar 2024 13:42:13 +0200 Message-ID: <20240314114220.203241-6-igozlan@nvidia.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240314114220.203241-1-igozlan@nvidia.com> References: <20240314114220.203241-1-igozlan@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF00000010:EE_|DS0PR12MB7725:EE_ X-MS-Office365-Filtering-Correlation-Id: 292d526b-3c5d-4760-aa90-08dc441bf1a8 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lgXFcQ5C4kT4VF13PeVyxVQis6WnRCWdhfV2k2jL726bhvih4RhW3r03wYMtVV2mNlKebAHIvlhcGrk6mspf3UzAL4wppS3m79ceb8hj/YM/85ghEQJOhMcxk2i9mgv1WtZqIRfzZlLG6BEIJe4x8aH0o1sepQMuZHfDPeABSyvys61ctFhZzhI9m5RvrsV6zfFPD80I3NipJ3t2Ui6f7EQcJDhC+89j+SYXxbXG7ZxS/qPZLTBv6TRCisfYKHtUZ8lEsvAyKKugkdO21k+MVvnL63WJptpNJ26vWaYVg4NB8N83JbA2PLltzSyX5sb1VNbuWWOv4H4o84YP6MKfzzPahrlbKwLZGMNKcEL69G6hU037Ypug7FquM0c+fO8RSBUQdiF3/qym3UD4wIy2TeBDgzaLkVqF8JMr7837LY76nm13J9C82JOaNoNlAhZquQrjQP2Wuh11cllW+rGKQJp+1hxy+pZyJ8uG5KMyiH/5ImiMxCsK+89wdzGMsTbVkl7/NFSq9BJIVl4X3+LX79UM5nLOgGx7jHdjdR9x5SZ4tagd0E+aLjUYstPElGSoE5D9aA0jemHwMIQ8uVVj2strzPyormKwwlREwiAYJncf/e7950OMHkWZvFjZdUZVMoL7N/iPcQaH9PQiyT5++iGOIpwJDaa4PfEvfU3wwp7ilMDx9UAbbVE1Mi1f1hvk2AMg/lC27EPy1MEDTAgOTL2jxlF8i+jN2ebqPyJj/9P4nAhHr/ZnYqwrHeC9jDExMwjDcjubq6KQ0IEH8cm9jg== 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)(82310400014)(376005)(1800799015)(36860700004)(921011); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2024 11:43:18.7373 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 292d526b-3c5d-4760-aa90-08dc441bf1a8 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: CH3PEPF00000010.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7725 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 From: Yevgeny Kliteynik Small simplification to the send_queues_close code Signed-off-by: Yevgeny Kliteynik Acked-by: Matan Azrad --- drivers/net/mlx5/hws/mlx5dr_send.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c index d58fdb108f..d61862f074 100644 --- a/drivers/net/mlx5/hws/mlx5dr_send.c +++ b/drivers/net/mlx5/hws/mlx5dr_send.c @@ -970,13 +970,8 @@ int mlx5dr_send_queue_open(struct mlx5dr_context *ctx, static void __mlx5dr_send_queues_close(struct mlx5dr_context *ctx, uint16_t queues) { - struct mlx5dr_send_engine *queue; - - while (queues--) { - queue = &ctx->send_queue[queues]; - - mlx5dr_send_queue_close(queue); - } + while (queues--) + mlx5dr_send_queue_close(&ctx->send_queue[queues]); } void mlx5dr_send_queues_close(struct mlx5dr_context *ctx) -- 2.39.3