patch 'ethdev: check that at least one FEC mode is specified' has been queued to stable release 22.11.3
Xueming Li
xuemingl at nvidia.com
Thu Aug 10 01:47:37 CEST 2023
Hi,
FYI, your patch has been queued to stable release 22.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 08/11/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=7594b6e44d13945cffa0f7fce3ba14bc156a2cbb
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 7594b6e44d13945cffa0f7fce3ba14bc156a2cbb Mon Sep 17 00:00:00 2001
From: Denis Pryazhennikov <denis.pryazhennikov at arknetworks.am>
Date: Mon, 8 May 2023 15:47:06 +0400
Subject: [PATCH] ethdev: check that at least one FEC mode is specified
Cc: Xueming Li <xuemingl at nvidia.com>
[ upstream commit 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a ]
The behaviour is undefined in the rte_eth_fec_set() function
when the fec_capa parameter is equal to zero.
Add a check to handle this case.
Fixes: b7ccfb09da95 ("ethdev: introduce FEC API")
Signed-off-by: Denis Pryazhennikov <denis.pryazhennikov at arknetworks.am>
Acked-by: Ivan Malov <ivan.malov at arknetworks.am>
Acked-by: Viacheslav Galaktionov <viacheslav.galaktionov at arknetworks.am>
Acked-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
lib/ethdev/rte_ethdev.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 08a08cf431..437d04b34e 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -4362,6 +4362,11 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
dev = &rte_eth_devices[port_id];
+ if (fec_capa == 0) {
+ RTE_ETHDEV_LOG(ERR, "At least one FEC mode should be specified\n");
+ return -EINVAL;
+ }
+
if (*dev->dev_ops->fec_set == NULL)
return -ENOTSUP;
return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));
--
2.25.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2023-08-09 21:51:18.674558300 +0800
+++ 0015-ethdev-check-that-at-least-one-FEC-mode-is-specified.patch 2023-08-09 21:51:18.134352000 +0800
@@ -1 +1 @@
-From 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a Mon Sep 17 00:00:00 2001
+From 7594b6e44d13945cffa0f7fce3ba14bc156a2cbb Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 9fdcf2be070dcd5ea3d845ce798c298c5dfbaa4a ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +24 @@
-index 731423ef03..1e024802ae 100644
+index 08a08cf431..437d04b34e 100644
@@ -25 +27 @@
-@@ -4828,6 +4828,11 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
+@@ -4362,6 +4362,11 @@ rte_eth_fec_set(uint16_t port_id, uint32_t fec_capa)
@@ -36 +38 @@
- ret = eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));
+ return eth_err(port_id, (*dev->dev_ops->fec_set)(dev, fec_capa));
More information about the stable
mailing list