patch 'examples/ntb: check info query return' has been queued to stable release 21.11.9

Kevin Traynor ktraynor at redhat.com
Wed Nov 27 18:18:30 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.9

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

Thanks.

Kevin

---
>From aa15e16eee6f1d8ce9fce5112deeefd3018f8526 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Fri, 4 Oct 2024 09:21:53 -0700
Subject: [PATCH] examples/ntb: check info query return
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit 07e4dc04d99a99699d71a0a39dd2a7034049e663 ]

The ethdev_info is only valid if rte_eth_dev_info_get returns success.

Fixes: 5194299d6ef5 ("examples/ntb: support more functions")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
 examples/ntb/ntb_fwd.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 41bb536141..05826dc493 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -1444,5 +1444,8 @@ main(int argc, char **argv)
 
 	if (eth_port_id < RTE_MAX_ETHPORTS) {
-		rte_eth_dev_info_get(eth_port_id, &ethdev_info);
+		ret = rte_eth_dev_info_get(eth_port_id, &ethdev_info);
+		if (ret)
+			rte_exit(EXIT_FAILURE, "Can't get info for port %u\n", eth_port_id);
+
 		eth_pconf.rx_adv_conf.rss_conf.rss_hf &=
 				ethdev_info.flow_type_rss_offloads;
-- 
2.47.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-11-27 17:17:40.883147668 +0000
+++ 0083-examples-ntb-check-info-query-return.patch	2024-11-27 17:17:38.285269684 +0000
@@ -1 +1 @@
-From 07e4dc04d99a99699d71a0a39dd2a7034049e663 Mon Sep 17 00:00:00 2001
+From aa15e16eee6f1d8ce9fce5112deeefd3018f8526 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 07e4dc04d99a99699d71a0a39dd2a7034049e663 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 56c7672392..37d60208e3 100644
+index 41bb536141..05826dc493 100644
@@ -24 +25 @@
-@@ -1286,5 +1286,8 @@ main(int argc, char **argv)
+@@ -1444,5 +1444,8 @@ main(int argc, char **argv)



More information about the stable mailing list