patch 'net/hns3: fix some return values' has been queued to stable release 21.11.6
Kevin Traynor
ktraynor at redhat.com
Thu Nov 16 14:23:04 CET 2023
Hi,
FYI, your patch has been queued to stable release 21.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/21/23. 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/6b71d322adea61ff64568e97724f8f141fce9ac1
Thanks.
Kevin
---
>From 6b71d322adea61ff64568e97724f8f141fce9ac1 Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1 at huawei.com>
Date: Tue, 31 Oct 2023 20:23:56 +0800
Subject: [PATCH] net/hns3: fix some return values
[ upstream commit 08159599978f7f7eb6c4aaed7c290e33b8bc3d64 ]
1. Fix the return value of hns3_get_imissed_stats_num as 'uint16_t'.
2. Add some error check for return value.
Fixes: fcba820d9b9e ("net/hns3: support flow director")
Signed-off-by: Jie Hai <haijie1 at huawei.com>
---
drivers/net/hns3/hns3_ethdev_vf.c | 5 ++++-
drivers/net/hns3/hns3_fdir.c | 2 +-
drivers/net/hns3/hns3_stats.c | 15 ++++++++++-----
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index f4a37f433b..2c5f19c50e 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -2204,6 +2204,9 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
if (pci_dev->kdrv == RTE_PCI_KDRV_IGB_UIO ||
pci_dev->kdrv == RTE_PCI_KDRV_UIO_GENERIC) {
- if (hns3vf_enable_msix(pci_dev, true))
+ ret = hns3vf_enable_msix(pci_dev, true);
+ if (ret != 0) {
hns3_err(hw, "Failed to enable msix");
+ return ret;
+ }
}
diff --git a/drivers/net/hns3/hns3_fdir.c b/drivers/net/hns3/hns3_fdir.c
index 4432279e6d..a2dd25fb21 100644
--- a/drivers/net/hns3/hns3_fdir.c
+++ b/drivers/net/hns3/hns3_fdir.c
@@ -976,5 +976,5 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns,
rule->key_conf.spec.dst_port, ret);
else
- hns3_remove_fdir_filter(hw, fdir_info, &rule->key_conf);
+ ret = hns3_remove_fdir_filter(hw, fdir_info, &rule->key_conf);
return ret;
diff --git a/drivers/net/hns3/hns3_stats.c b/drivers/net/hns3/hns3_stats.c
index 169bad1412..79e4063b00 100644
--- a/drivers/net/hns3/hns3_stats.c
+++ b/drivers/net/hns3/hns3_stats.c
@@ -772,5 +772,5 @@ hns3_mac_stats_reset(struct hns3_hw *hw)
}
-static int
+static uint16_t
hns3_get_imissed_stats_num(struct hns3_adapter *hns)
{
@@ -994,5 +994,5 @@ hns3_imissed_stats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *xstats,
struct hns3_hw *hw = &hns->hw;
struct hns3_rx_missed_stats *imissed_stats = &hw->imissed_stats;
- int imissed_stats_num;
+ uint16_t imissed_stats_num;
int cnt = *count;
char *addr;
@@ -1171,5 +1171,5 @@ hns3_imissed_stats_name_get(struct rte_eth_dev *dev,
struct hns3_adapter *hns = dev->data->dev_private;
uint32_t cnt = *count;
- int imissed_stats_num;
+ uint16_t imissed_stats_num;
uint16_t i;
@@ -1540,6 +1540,11 @@ hns3_stats_init(struct hns3_hw *hw)
}
- if (!hns->is_vf)
- hns3_mac_stats_reset(hw);
+ if (!hns->is_vf) {
+ ret = hns3_mac_stats_reset(hw);
+ if (ret) {
+ hns3_err(hw, "reset mac stats failed, ret = %d", ret);
+ return ret;
+ }
+ }
return hns3_tqp_stats_init(hw);
--
2.41.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-11-16 13:21:53.093361590 +0000
+++ 0022-net-hns3-fix-some-return-values.patch 2023-11-16 13:21:52.445946360 +0000
@@ -1 +1 @@
-From 08159599978f7f7eb6c4aaed7c290e33b8bc3d64 Mon Sep 17 00:00:00 2001
+From 6b71d322adea61ff64568e97724f8f141fce9ac1 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 08159599978f7f7eb6c4aaed7c290e33b8bc3d64 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 0a227e6e45..156fb905f9 100644
+index f4a37f433b..2c5f19c50e 100644
@@ -23 +24 @@
-@@ -2082,6 +2082,9 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
+@@ -2204,6 +2204,9 @@ hns3vf_reinit_dev(struct hns3_adapter *hns)
@@ -35 +36 @@
-index c80fa59e63..d100e58d10 100644
+index 4432279e6d..a2dd25fb21 100644
@@ -38 +39 @@
-@@ -979,5 +979,5 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns,
+@@ -976,5 +976,5 @@ int hns3_fdir_filter_program(struct hns3_adapter *hns,
@@ -46 +47 @@
-index c2e692a2c5..9a1e8935e5 100644
+index 169bad1412..79e4063b00 100644
More information about the stable
mailing list