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 038494624E for ; Mon, 17 Feb 2025 18:07:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E87E402AB; Mon, 17 Feb 2025 18:07:16 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 2163D400D6 for ; Mon, 17 Feb 2025 18:07:14 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-38f504f087eso26425f8f.1 for ; Mon, 17 Feb 2025 09:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812034; x=1740416834; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YmnR975GY6/ljeHLJWpqA9KeRCCVxPZ+BzXtdleqbus=; b=ZBGXiuFU0YrVyYMfwelLI9M0CBDrNKT/jui8tKpW3Km9YOwoyIXZ15v8Pq89c2b6it TXtXUBW6kp2+8nR3bLtLxlsVKxC3yFlPXo9EYu9CLR2REPxz95bgn7cp+bOgofV8hb8E aX859u1Ztvsoyb0hIKIP1BNgEa9jGJR8KS7TLWKvT3TLMQeee1s4k1xbKVB7Xu4w20/0 yaBfvexRR/0H3SDCCby2um0cbCGRLdW/yAoiNifTAnxteTwwB8p+Odox/m5Ic6XwhwA+ MN6YVOF5nN0aChDSLRCb4H9G5ki4C3BlH62LNw/Mtrx5tXRKK4FmIamSkjjHk3rGPZWI 96Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812034; x=1740416834; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YmnR975GY6/ljeHLJWpqA9KeRCCVxPZ+BzXtdleqbus=; b=XII1fw63YOqXM/Ry9wFmXbGRpLoB40lg5k5adbXa1pXxa3YK2Lgouy/mLoJq+WYoXk jaZSWFhGQdwiqjjwLbkYeLctEPiK5aqMVVSii0GeCoIsnS0x0HiQ94c+jix7tXoh6YGO 0Gw1LKAPeDDu0zIY/bUCYKmZPZ9PFerp07RHBbhzOirCYkLYO9Ko2iD/cFTqLASKcKAX wmNZAlbwrgPoKSnuY0X2PVUn+YkL2HBK4bN91MFVZUG37zQffM+JMT4mbyb9bwaOMGsn a0vtxIttH4DjNM/4Vrwx/wNwdzvKB5eTBbZYlylL4cCs7QvmxgkfGjnBuvnQxbswinEM 5mbA== X-Forwarded-Encrypted: i=1; AJvYcCXvfpnKRjInHa5AZcBA1yhCMTx9CS3w6kY5PWR51YxjUkdFIEb6ttmABzFSklsOD30pRtQQnA4=@dpdk.org X-Gm-Message-State: AOJu0YxbUW+YgYgzxwUcimBGb/HHh9Y2fPJx8xdCcSU6vuW+aJDNgDdY xCGopYHNTulg6D+VeeBUoYOBIx3J/b5Up4pOQ5vITXAKquPcX5gS0zg6IM+2BuJXOw== X-Gm-Gg: ASbGncvSMNlSwI4bKrI6YRwFqns+/qGiU0DPHs+3Js3YAccMEiPyNSN20uMGwcm4oT4 ev8fV0L4G4dlxlVb5tVg1LiWpyao5hvt1JUHP10SXC8mTpesR0QyMj6Mz39IJUwKs+6IOpctF5N 61CnmUhjUwQStuF0RRAbzDjQN0LgWItbWzrAN/zgObDVY0XsgfHFEekjZZb0tAM8hJA3TSl8Hcf do3sP4FivJrFAJ74AX2OMjj1Dvf6Wr256E7TIBH/tDpPIjvPAzJZ3ZmPsVYEeeHs8JUTKuCSbrC 7+4wfoB34SOxK2zHKcbW3w== X-Google-Smtp-Source: AGHT+IHaCrVDpc0qmRvL16sVdiLBOhHTYAbRRNBYjGCZspMWhORCAD1IeAt6QP7Exe8dT82ZV2PkfA== X-Received: by 2002:a5d:6d8c:0:b0:38f:394f:d8c with SMTP id ffacd0b85a97d-38f394f9cc5mr7640463f8f.33.1739812033639; Mon, 17 Feb 2025 09:07:13 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-38f259d65dfsm12970208f8f.64.2025.02.17.09.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:07:13 -0800 (PST) From: luca.boccassi@gmail.com To: Pawel Malinowski Cc: Anatoly Burakov , Bruce Richardson , dpdk stable Subject: patch 'net/igc/base: fix semaphore timeout value' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:15 +0000 Message-ID: <20250217170456.1068278-42-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/25. 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://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/572d5ab2cd6b6fd7bf1bc9a9c7783431f5ef769c Thanks. Luca Boccassi --- >From 572d5ab2cd6b6fd7bf1bc9a9c7783431f5ef769c Mon Sep 17 00:00:00 2001 From: Pawel Malinowski Date: Thu, 6 Feb 2025 16:08:32 +0000 Subject: [PATCH] net/igc/base: fix semaphore timeout value [ upstream commit 7caabb9834bc9596190c03279eae8980b1c24800 ] According to datasheet, software ownership of SWSM.SWESMBI bit should not exceed 100ms. Current implementation caused incorrect timeout counter values, where each iteration equals 50us delay. Because of that, driver was allowed to wait for semaphore even for 1.5s. This might trigger DPC timeout. This implementation hardcodes value to 2000, which multiplied by 50us, gives 100ms of possible wait time. Fixes: 8cb7c57d9b3c ("net/igc: support device initialization") Signed-off-by: Pawel Malinowski Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- drivers/net/igc/base/igc_defines.h | 1 + drivers/net/igc/base/igc_i225.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/igc/base/igc_defines.h b/drivers/net/igc/base/igc_defines.h index 61964bcdd2..ca882ebff1 100644 --- a/drivers/net/igc/base/igc_defines.h +++ b/drivers/net/igc/base/igc_defines.h @@ -516,6 +516,7 @@ /* SW Semaphore Register */ #define IGC_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */ #define IGC_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */ +#define IGC_SWSM_TIMEOUT 2000 /* Driver Semaphore max timeout counter */ #define IGC_SWSM_DRV_LOAD 0x00000008 /* Driver Loaded Bit */ #define IGC_SWSM2_LOCK 0x00000002 /* Secondary driver semaphore bit */ diff --git a/drivers/net/igc/base/igc_i225.c b/drivers/net/igc/base/igc_i225.c index 6c45fa5427..5c2c756bad 100644 --- a/drivers/net/igc/base/igc_i225.c +++ b/drivers/net/igc/base/igc_i225.c @@ -385,7 +385,7 @@ s32 igc_setup_copper_link_i225(struct igc_hw *hw) static s32 igc_get_hw_semaphore_i225(struct igc_hw *hw) { u32 swsm; - s32 timeout = hw->nvm.word_size + 1; + s32 timeout = IGC_SWSM_TIMEOUT; s32 i = 0; DEBUGFUNC("igc_get_hw_semaphore_i225"); -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:18.352252382 +0000 +++ 0042-net-igc-base-fix-semaphore-timeout-value.patch 2025-02-17 16:13:16.842441592 +0000 @@ -1 +1 @@ -From 7caabb9834bc9596190c03279eae8980b1c24800 Mon Sep 17 00:00:00 2001 +From 572d5ab2cd6b6fd7bf1bc9a9c7783431f5ef769c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 7caabb9834bc9596190c03279eae8980b1c24800 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -22,2 +23,2 @@ - drivers/net/intel/igc/base/igc_defines.h | 1 + - drivers/net/intel/igc/base/igc_i225.c | 2 +- + drivers/net/igc/base/igc_defines.h | 1 + + drivers/net/igc/base/igc_i225.c | 2 +- @@ -26,5 +27,5 @@ -diff --git a/drivers/net/intel/igc/base/igc_defines.h b/drivers/net/intel/igc/base/igc_defines.h -index 280570b157..3cb2f430c5 100644 ---- a/drivers/net/intel/igc/base/igc_defines.h -+++ b/drivers/net/intel/igc/base/igc_defines.h -@@ -525,6 +525,7 @@ +diff --git a/drivers/net/igc/base/igc_defines.h b/drivers/net/igc/base/igc_defines.h +index 61964bcdd2..ca882ebff1 100644 +--- a/drivers/net/igc/base/igc_defines.h ++++ b/drivers/net/igc/base/igc_defines.h +@@ -516,6 +516,7 @@ @@ -38,5 +39,5 @@ -diff --git a/drivers/net/intel/igc/base/igc_i225.c b/drivers/net/intel/igc/base/igc_i225.c -index 23c68a3948..7352ba240a 100644 ---- a/drivers/net/intel/igc/base/igc_i225.c -+++ b/drivers/net/intel/igc/base/igc_i225.c -@@ -388,7 +388,7 @@ s32 igc_setup_copper_link_i225(struct igc_hw *hw) +diff --git a/drivers/net/igc/base/igc_i225.c b/drivers/net/igc/base/igc_i225.c +index 6c45fa5427..5c2c756bad 100644 +--- a/drivers/net/igc/base/igc_i225.c ++++ b/drivers/net/igc/base/igc_i225.c +@@ -385,7 +385,7 @@ s32 igc_setup_copper_link_i225(struct igc_hw *hw)