[dpdk-stable] patch 'net/hns3: fix VF mailbox head field' has been queued to stable release 20.11.2

Xueming Li xuemingl at nvidia.com
Mon May 10 18:01:48 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/12/21. 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/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/d0897ad2fbdc3e81fb3b2392dc8322dcb8567072

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From d0897ad2fbdc3e81fb3b2392dc8322dcb8567072 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Wed, 31 Mar 2021 18:01:41 +0800
Subject: [PATCH] net/hns3: fix VF mailbox head field
Cc: Luca Boccassi <bluca at debian.org>

[ upstream commit 38d5b71c27d6fd9324cbaeed972df382c2c7a34b ]

Currently, the VF mailbox synchronization communication is based on
three fields: head/tail/lost, when head equals tail plus lost, it
means the response is received successfully.

The head field indicates the number of requests that are successfully
sent. If the request sending fails, it should not be updated.

This patch fix the above bug by roll back updates when the sending
fails.

Fixes: 463e748964f5 ("net/hns3: support mailbox")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
---
 drivers/net/hns3/hns3_mbx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
index 82b634c365..0327bc1526 100644
--- a/drivers/net/hns3/hns3_mbx.c
+++ b/drivers/net/hns3/hns3_mbx.c
@@ -171,6 +171,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
 		hw->mbx_resp.head++;
 		ret = hns3_cmd_send(hw, &desc, 1);
 		if (ret) {
+			hw->mbx_resp.head--;
 			rte_spinlock_unlock(&hw->mbx_resp.lock);
 			hns3_err(hw, "VF failed(=%d) to send mbx message to PF",
 				 ret);
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-05-10 23:59:30.739303500 +0800
+++ 0160-net-hns3-fix-VF-mailbox-head-field.patch	2021-05-10 23:59:26.610000000 +0800
@@ -1 +1 @@
-From 38d5b71c27d6fd9324cbaeed972df382c2c7a34b Mon Sep 17 00:00:00 2001
+From d0897ad2fbdc3e81fb3b2392dc8322dcb8567072 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Luca Boccassi <bluca at debian.org>
+
+[ upstream commit 38d5b71c27d6fd9324cbaeed972df382c2c7a34b ]
@@ -17 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +28 @@
-index 499285d7c2..8ea8998ac7 100644
+index 82b634c365..0327bc1526 100644
@@ -29 +31 @@
-@@ -142,6 +142,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,
+@@ -171,6 +171,7 @@ hns3_send_mbx_msg(struct hns3_hw *hw, uint16_t code, uint16_t subcode,


More information about the stable mailing list