[dpdk-stable] patch 'net/hns3: check PCI config space write' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue Nov 17 12:13:53 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

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/19/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.

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/99ce983148f897470afccb3bed09b0b2e036b9f3

Thanks.

Luca Boccassi

---
>From 99ce983148f897470afccb3bed09b0b2e036b9f3 Mon Sep 17 00:00:00 2001
From: Lijun Ou <oulijun at huawei.com>
Date: Mon, 9 Nov 2020 22:29:00 +0800
Subject: [PATCH] net/hns3: check PCI config space write

[ upstream commit 6dd32ded17d85eec8c15f4635b668528520256c4 ]

Here adds a check for the return value when calling
rte_pci_write_config.

Coverity issue: 363714
Fixes: cea37e513329 ("net/hns3: fix FLR reset")

Signed-off-by: Lijun Ou <oulijun at huawei.com>
---
 drivers/net/hns3/hns3_ethdev_vf.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index b61616090b..4359b2efdb 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -167,8 +167,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
 			control |= PCI_MSIX_FLAGS_ENABLE;
 		else
 			control &= ~PCI_MSIX_FLAGS_ENABLE;
-		rte_pci_write_config(device, &control, sizeof(control),
-				     (pos + PCI_MSIX_FLAGS));
+		ret = rte_pci_write_config(device, &control, sizeof(control),
+					  (pos + PCI_MSIX_FLAGS));
+		if (ret < 0) {
+			PMD_INIT_LOG(ERR, "failed to write PCI offset 0x%x",
+				    (pos + PCI_MSIX_FLAGS));
+		}
 		return 0;
 	}
 	return -1;
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-17 11:13:13.777693290 +0000
+++ 0019-net-hns3-check-PCI-config-space-write.patch	2020-11-17 11:13:12.901116206 +0000
@@ -1 +1 @@
-From 6dd32ded17d85eec8c15f4635b668528520256c4 Mon Sep 17 00:00:00 2001
+From 99ce983148f897470afccb3bed09b0b2e036b9f3 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 6dd32ded17d85eec8c15f4635b668528520256c4 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 6f71cd6606..1535f26713 100644
+index b61616090b..4359b2efdb 100644
@@ -22 +23 @@
-@@ -148,8 +148,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
+@@ -167,8 +167,12 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
@@ -36 +37 @@
- 	return -ENXIO;
+ 	return -1;


More information about the stable mailing list