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 7188143E57 for ; Sat, 13 Apr 2024 14:57:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B327402CB; Sat, 13 Apr 2024 14:57:55 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2049.outbound.protection.outlook.com [40.107.96.49]) by mails.dpdk.org (Postfix) with ESMTP id 373D240E25 for ; Sat, 13 Apr 2024 14:57:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=noyPXw6S2yMrnA1LGoyrhXUgCXqanejMASxGPL3yb6Pwh0PbgHhlZ4TQMAZcRCy1oGZ2lrIrO+PtuhKnOughZqYS0rPzm4elNteToVUv1x7EBSGzrJSCIuOd2zMx1FXBvVzyzxGzXwZVGZTT1bcNnwSBPdbT57RTSuQNJ2jVgd5M/pWGDE+kFW2JcGntKlquyskxCXc4/uNN1GazV3pHsoYAmKeXIsN/YCKdP6r10hAN0z4VQU6YoIAnktKL1QsjQ8IsV+32nBH1rK+poXFJ3dLAj3OEFSv9p2nNklIlhDMvd7l/NzafN7lp9lrCLduAld+XBg8RVh7ErKKZKA9oyg== 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=zMrKtsET25X8VRsuR8b6cZQ7WQ5PjM0herJGhXS8aeE=; b=df9cb/euHM8CGBxNTsyeUNKmG295Vpp7XWURzFA8fJins7JeqMRvEYdZJVyojE7W8HExX0sA/JAfxO9w6mJJVXkkR2ul0AzgMu/Zo1xW9fCoDDd4/LCZWu3/7Q9J8zYlBs7MU0zZmsETNT/PXnz8/X6EdrvfyybE0j6wsFL4uTGP3pX+fzsvdmDwBHumibc0VS6JK06bw9Ple3gfxcgfqsI/DhSfABqqlptM1MkMuw3McFoWqfO+nRQLXHDiBvSgCjADQxIE13Y12yp8cCjqDoXQqyrPgVE8GaNEuczJIKjnwcfA+KuvT3iinNskM3BOf3bcR/jl6MncmMXNqlpbhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=amazon.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=zMrKtsET25X8VRsuR8b6cZQ7WQ5PjM0herJGhXS8aeE=; b=G+Ljdekgh4DNuG4WCmu3wX2kqqlvbEY1YmhbRF9R5+Rw/FFkqkrN2g/5cytLQrsEWcXOVfnZIKBDNuzX/ef6grDutb9XjbW31aWcJ936wpgjNDhNWZ61Vy5R5+SIu/rwudVBOZK7MRD/fl9+EJodC0TnQ/gEvhCsQgkTYyNurKE6tsjFGgNrGXVV3z0LIALgSgeE2y9/4A2HPTR4ZVw/9OxnbepSjGzOpSGf7PMYBOzaauAheAt05uWtwq6hwokQQw3VQTYQeAeDDYFTuhZ5BjNTdj9oE6tD2KInyGkL3ew7DYdonVhO3+OtigeGtk+guI05r0fxtU8OnK1tB6XyVw== Received: from CH0P221CA0011.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:11c::28) by MN0PR12MB6176.namprd12.prod.outlook.com (2603:10b6:208:3c3::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Sat, 13 Apr 2024 12:57:49 +0000 Received: from DS3PEPF0000C380.namprd04.prod.outlook.com (2603:10b6:610:11c:cafe::b6) by CH0P221CA0011.outlook.office365.com (2603:10b6:610:11c::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.31 via Frontend Transport; Sat, 13 Apr 2024 12:57:49 +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 DS3PEPF0000C380.mail.protection.outlook.com (10.167.23.10) 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 12:57:48 +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 05:57:39 -0700 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; Sat, 13 Apr 2024 05:57:38 -0700 From: Xueming Li To: Shai Brandes CC: Amit Bernstein , dpdk stable Subject: patch 'net/ena/base: limit exponential backoff' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:24 +0800 Message-ID: <20240413125005.725659-84-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.231.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: DS3PEPF0000C380:EE_|MN0PR12MB6176:EE_ X-MS-Office365-Filtering-Correlation-Id: c81cbb95-bc83-4ceb-492a-08dc5bb95276 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AGHgkIqgtO1Jffq9QYi8sU3R70s5Vquxr/StOux3muR4b2yTlvMqy7B3x2HrX3KYHos11n29ppE1EB7Vq/6jJR8f3lZw/Unx2KVH99LbMJS3tT1JLFHB+lBqXvcFPZUPEZSEUIEBkbnzDmrbbJS8Bnf+4X7C43JYhOzp9dno57YgoK5eUpR2T5ECndd4FrRCFtc38QXrCLwYAeOC5JQJg2qoz3yY/f7gHPxjKqQ3MgVEtK602eVJu0FbBd0t8Z/j4lI1uSFy3P0gEfOD5OcugYujkPezdcQNaog9qr01vuyOZi+6xuhcNM9uaLQMT7i6iTl8tkrgEpr87QPU+kVoBdeBw2kBbwy1sBSabGZkJFKqFlSrKvvC2stBXMaoRhBOi7WYva1N+wqusPkwRPcHG62NP5EmA8+voq9GP/+3BnVha3/nNQ8JRQLLNxyx56NWv7H+nZELlGiuDGWds6xkpz5+UGXyQnzI6qUobG3jnsw9x3OFd3Do+JN4Tc2Dz5swQxNQ+Y3rPxfIiMx1SMsTv12goC3XHQ2J40pu2ZT/KJFwdUrNNq8rZ5BukTA1scjCKqvttxOCW87WvhJRukp+Ih0T/KRSe0Wvv/Cw6CC0yZyrmm1t2yq2u3GnLClGv/6GBXt4G/ElQQWb+/TqHPOrXnHLTrCn8ghkkRJGi02b0Eue/cCt1yO2mFZ1o3axYcDajqOwFZfrdt8vimpyoDedupqSI9kQZXJnGTHOIqPF6q3jhTu29rP37ovefzNq8SPt 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)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:57:48.8922 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c81cbb95-bc83-4ceb-492a-08dc5bb95276 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: DS3PEPF0000C380.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6176 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=e1abac3de0eed7755edee3400722db6df5395abe Thanks. Xueming Li --- >From e1abac3de0eed7755edee3400722db6df5395abe Mon Sep 17 00:00:00 2001 From: Shai Brandes Date: Tue, 12 Mar 2024 20:06:52 +0200 Subject: [PATCH] net/ena/base: limit exponential backoff Cc: Xueming Li [ upstream commit 4b378679c88ff231b97b71aaedc2d424e82f1aba ] Limit the value of the exponent used for this backoff at (1<<16) to prevent it from reaching to an excessive value (1<<32) or potentially even overflowing. In addition, for uniformity and readability purposes, the min/max parameter in the calls of ENA_MIN32 and ENA_MAX32 macros was changed to be first. Fixes: 0c84e04824db ("net/ena/base: make delay exponential in polling functions") Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/base/ena_com.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index 6953a1fa33..31c37b0ab3 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -34,6 +34,8 @@ #define ENA_REGS_ADMIN_INTR_MASK 1 +#define ENA_MAX_BACKOFF_DELAY_EXP 16U + #define ENA_MIN_ADMIN_POLL_US 100 #define ENA_MAX_ADMIN_POLL_US 5000 @@ -545,8 +547,9 @@ static int ena_com_comp_status_to_errno(struct ena_com_admin_queue *admin_queue, static void ena_delay_exponential_backoff_us(u32 exp, u32 delay_us) { + exp = ENA_MIN32(ENA_MAX_BACKOFF_DELAY_EXP, exp); delay_us = ENA_MAX32(ENA_MIN_ADMIN_POLL_US, delay_us); - delay_us = ENA_MIN32(delay_us * (1U << exp), ENA_MAX_ADMIN_POLL_US); + delay_us = ENA_MIN32(ENA_MAX_ADMIN_POLL_US, delay_us * (1U << exp)); ENA_USLEEP(delay_us); } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:07.564358479 +0800 +++ 0084-net-ena-base-limit-exponential-backoff.patch 2024-04-13 20:43:05.037753879 +0800 @@ -1 +1 @@ -From 4b378679c88ff231b97b71aaedc2d424e82f1aba Mon Sep 17 00:00:00 2001 +From e1abac3de0eed7755edee3400722db6df5395abe Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 4b378679c88ff231b97b71aaedc2d424e82f1aba ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org