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 1192FA00C2 for ; Thu, 3 Nov 2022 10:33:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0E9BD4069B; Thu, 3 Nov 2022 10:33:02 +0100 (CET) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mails.dpdk.org (Postfix) with ESMTP id BC21D40694 for ; Thu, 3 Nov 2022 10:33:00 +0100 (CET) Received: by mail-wr1-f49.google.com with SMTP id y16so1694599wrt.12 for ; Thu, 03 Nov 2022 02:33:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=3jQspGBHDfdXHLT/voB+w6U7l/4MCtynVTbWjA6Z+Oo=; b=F1ggQUh+DCtrRBp5X4uDzUl5kIgTR9R/ynde+ICym2n0d17vuGkLthN+j5n9aNFurq 5JgOpcoFtFDoT1aXSwW5HpUg1Hmtna65jZNkDLbYaOyjU+ssfw3pdVeZp4qsGC5Znra9 O4N+21n6YN/VgJx5c73r2ohFT4uulM4sDQxrzuHE08n2k9KN7rG5L5/52oiV6LkDoK1y cWn0+yMEb7QPDJ7Dt8WaNHgB2sWbz1csI9Uji73dvfuIowOfBWj6iVtOinsNKzy6oEcw igRHj6gEIp7kmWhnaeSsC6Osx/0ldqUthmQjBdHQXAa8Pj1K5MXfcMN0d/ANzFkENfYf 032A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=3jQspGBHDfdXHLT/voB+w6U7l/4MCtynVTbWjA6Z+Oo=; b=mLY3LDyw5lpTwEORcMrOb1F4ba8qCEQu8d3KqaR9DDQmUJwirzzjRhIIZGMvr+HQW5 DrhwknTI2bPouWmPTg1id0J40hTly27EogCUy94Z0LyEAL38+IITIxpbPfOBQdiN9gns C9EdwlkwMD6MfMMawoYuq9+wfaq0QUoo+ABmMWQmpjqflQViduygIEHGsf9bUofVl0ZV 2tjzNvztB/js7rW0dfqVYZKphyLZnF2s/8H347/xIskkeF9Y/yAcH//+vnCVQUAka/2F Y6N6p36DcC7Mv50IM891FfV26+yrVNFmk+0Xr0s00BPgeKnbEDsRIa1HXbkJFIMmbyWE fX9g== X-Gm-Message-State: ACrzQf3uEC+wWUl9CARFmSVKDdoq5OKZ2vbR7qB0axFqo17z+H6oxbK+ fAAutgt2X89StbkHvzo3RSjZojO63GJUx0SN X-Google-Smtp-Source: AMsMyM4dPS04K4s+oDCifdupPwwdbr5miw9NExkQRpoVFAyOizvKtcTu0NGvqNZ14jt/vT9Tqt1m5Q== X-Received: by 2002:adf:f98a:0:b0:236:677c:2407 with SMTP id f10-20020adff98a000000b00236677c2407mr18416933wrr.578.1667467980483; Thu, 03 Nov 2022 02:33:00 -0700 (PDT) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id e7-20020a5d5007000000b00236644228besm374304wrt.40.2022.11.03.02.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:32:59 -0700 (PDT) From: luca.boccassi@gmail.com To: Chengwen Feng Cc: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: revert fix mailbox communication with HW' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:27:47 +0000 Message-Id: <20221103092758.1099402-89-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-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 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1fa481da5bdd86946062f431901db52ae3bfd835 Thanks. Luca Boccassi --- >From 1fa481da5bdd86946062f431901db52ae3bfd835 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Fri, 30 Sep 2022 15:22:18 +0800 Subject: [PATCH] net/hns3: revert fix mailbox communication with HW [ upstream commit e0ec62d6e9185890716761ba00d9775d82507293 ] VF's command receive queue was mainly used to receive mailbox messages from PF. There are two type mailbox messages: request response message and message pushed by PF. There are two types of threads that can handle these messages: 1) the interrupt thread of the main process: it could handle both types of messages. 2) other threads: it could only handle request response messages. The collaboration mechanism between the two type threads is that other threads set the opcode of processed messages to zero so that the interrupt thread of the main process does not process these messages again. Because other threads can only process part of the messages, after the processing is complete, the next-to-use pointer of the command receive queue should not be updated. Otherwise, some messages (e.g. messages pushed by PF) maybe discarded. Unfortunately, the patch to be reverted updates next-to-use pointer of the command receive queue in other threads context, and this will lead to discard some mailbox message. So this commit reverts commit 599ef84add7e ("net/hns3: fix mailbox communication with HW") Fixes: 599ef84add7e ("net/hns3: fix mailbox communication with HW") Signed-off-by: Chengwen Feng Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_mbx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index 1c95eb219d..e8d336f516 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -442,8 +442,10 @@ scan_next: next_to_use = (next_to_use + 1) % hw->cmq.crq.desc_num; } - crq->next_to_use = next_to_use; - hns3_write_dev(hw, HNS3_CMDQ_RX_HEAD_REG, crq->next_to_use); + /* + * Note: the crq->next_to_use field should not updated, otherwise, + * mailbox messages may be discarded. + */ } void -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:30.899653474 +0000 +++ 0089-net-hns3-revert-fix-mailbox-communication-with-HW.patch 2022-11-03 09:27:25.549425848 +0000 @@ -1 +1 @@ -From e0ec62d6e9185890716761ba00d9775d82507293 Mon Sep 17 00:00:00 2001 +From 1fa481da5bdd86946062f431901db52ae3bfd835 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e0ec62d6e9185890716761ba00d9775d82507293 ] + @@ -31 +32,0 @@ -Cc: stable@dpdk.org @@ -40 +41 @@ -index 02028dcd9c..910a16c999 100644 +index 1c95eb219d..e8d336f516 100644 @@ -43 +44 @@ -@@ -436,8 +436,10 @@ scan_next: +@@ -442,8 +442,10 @@ scan_next: