[dpdk-stable] patch 'net/hinic/base: fix port start during FW hot update' has been queued to stable release 19.11.3
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue May 19 15:02:25 CEST 2020
Hi,
FYI, your patch has been queued to stable release 19.11.3
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/21/20. 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.
Thanks.
Luca Boccassi
---
>From d57282791c7b346e138cb451935834b7b4d84d50 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
Date: Tue, 17 Mar 2020 23:01:12 +0800
Subject: [PATCH] net/hinic/base: fix port start during FW hot update
[ upstream commit 0194313b2df66d9308c79f501d1018a99b32098b ]
When repeatedly hotupdate firmware and start/stop port at the same time,
port start may be failed when cmdq reinit failed at the FW active phase,
so if cmdq fails, then reinit the cmdq when port start.
Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
---
drivers/net/hinic/base/hinic_pmd_cmdq.c | 4 ++++
drivers/net/hinic/base/hinic_pmd_cmdq.h | 1 +
drivers/net/hinic/base/hinic_pmd_nicio.c | 9 +++++++++
3 files changed, 14 insertions(+)
diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.c b/drivers/net/hinic/base/hinic_pmd_cmdq.c
index d73e2bf592..685498ec2f 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.c
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.c
@@ -7,6 +7,7 @@
#include "hinic_pmd_hwif.h"
#include "hinic_pmd_wq.h"
#include "hinic_pmd_mgmt.h"
+#include "hinic_pmd_mbox.h"
#include "hinic_pmd_cmdq.h"
#define CMDQ_CMD_TIMEOUT 5000 /* millisecond */
@@ -439,11 +440,14 @@ static int hinic_set_cmdq_ctxts(struct hinic_hwdev *hwdev)
cmdq_ctxt, in_size, NULL,
NULL, 0);
if (err) {
+ if (err == HINIC_MBOX_PF_BUSY_ACTIVE_FW)
+ cmdqs->status |= HINIC_CMDQ_SET_FAIL;
PMD_DRV_LOG(ERR, "Set cmdq ctxt failed");
return -EFAULT;
}
}
+ cmdqs->status &= ~HINIC_CMDQ_SET_FAIL;
cmdqs->status |= HINIC_CMDQ_ENABLE;
return 0;
diff --git a/drivers/net/hinic/base/hinic_pmd_cmdq.h b/drivers/net/hinic/base/hinic_pmd_cmdq.h
index da939e16fa..4ce0a4c5b8 100644
--- a/drivers/net/hinic/base/hinic_pmd_cmdq.h
+++ b/drivers/net/hinic/base/hinic_pmd_cmdq.h
@@ -170,6 +170,7 @@ struct hinic_cmdq_ctxt {
enum hinic_cmdq_status {
HINIC_CMDQ_ENABLE = BIT(0),
+ HINIC_CMDQ_SET_FAIL = BIT(1)
};
enum hinic_cmdq_cmd_type {
diff --git a/drivers/net/hinic/base/hinic_pmd_nicio.c b/drivers/net/hinic/base/hinic_pmd_nicio.c
index 59e39ed984..31a13fbdcf 100644
--- a/drivers/net/hinic/base/hinic_pmd_nicio.c
+++ b/drivers/net/hinic/base/hinic_pmd_nicio.c
@@ -533,6 +533,15 @@ int hinic_init_qp_ctxts(struct hinic_hwdev *hwdev)
return err;
}
+ if (hwdev->cmdqs->status & HINIC_CMDQ_SET_FAIL) {
+ err = hinic_reinit_cmdq_ctxts(hwdev);
+ if (err) {
+ PMD_DRV_LOG(ERR, "Reinit cmdq context failed, rc: %d\n",
+ err);
+ return err;
+ }
+ }
+
err = init_qp_ctxts(nic_io);
if (err) {
PMD_DRV_LOG(ERR, "Init QP ctxts failed, rc: %d", err);
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-05-19 14:04:44.999169703 +0100
+++ 0010-net-hinic-base-fix-port-start-during-FW-hot-update.patch 2020-05-19 14:04:44.068645689 +0100
@@ -1,14 +1,15 @@
-From 0194313b2df66d9308c79f501d1018a99b32098b Mon Sep 17 00:00:00 2001
+From d57282791c7b346e138cb451935834b7b4d84d50 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
Date: Tue, 17 Mar 2020 23:01:12 +0800
Subject: [PATCH] net/hinic/base: fix port start during FW hot update
+[ upstream commit 0194313b2df66d9308c79f501d1018a99b32098b ]
+
When repeatedly hotupdate firmware and start/stop port at the same time,
port start may be failed when cmdq reinit failed at the FW active phase,
so if cmdq fails, then reinit the cmdq when port start.
Fixes: d9ce1917941c ("net/hinic/base: add hardware operation")
-Cc: stable at dpdk.org
Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
---
More information about the stable
mailing list