patch 'pcapng: handle failure of link status query' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Tue Mar 8 15:14:56 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/14/22. 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/23237c380ec2bff9ffdd5b657a983020cb7efb5f

Thanks.

Kevin

---
>From 23237c380ec2bff9ffdd5b657a983020cb7efb5f Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Thu, 10 Feb 2022 15:09:04 -0800
Subject: [PATCH] pcapng: handle failure of link status query

[ upstream commit 442878db2e35ab276a1cd78cd836008e15eccd8b ]

If rte_ethlink_get fails, the code can just not add speed
to the pcap file.

Coverity issue: 373664
Fixes: 8d23ce8f5ee9 ("pcapng: add new library for writing pcapng files")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 lib/pcapng/rte_pcapng.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/pcapng/rte_pcapng.c b/lib/pcapng/rte_pcapng.c
index 03edabe73e..9db058fe42 100644
--- a/lib/pcapng/rte_pcapng.c
+++ b/lib/pcapng/rte_pcapng.c
@@ -178,6 +178,6 @@ pcapng_add_interface(rte_pcapng_t *self, uint16_t port)
 
 	/* DPDK reports in units of Mbps */
-	rte_eth_link_get(port, &link);
-	if (link.link_status == RTE_ETH_LINK_UP)
+	if (rte_eth_link_get(port, &link) == 0 &&
+	    link.link_status == RTE_ETH_LINK_UP)
 		speed = link.link_speed * PCAPNG_MBPS_SPEED;
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-03-08 13:55:29.387710308 +0000
+++ 0041-pcapng-handle-failure-of-link-status-query.patch	2022-03-08 13:55:28.512315207 +0000
@@ -1 +1 @@
-From 442878db2e35ab276a1cd78cd836008e15eccd8b Mon Sep 17 00:00:00 2001
+From 23237c380ec2bff9ffdd5b657a983020cb7efb5f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 442878db2e35ab276a1cd78cd836008e15eccd8b ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 5ae96a5bc9..90b2f5bc69 100644
+index 03edabe73e..9db058fe42 100644
@@ -22 +23 @@
-@@ -177,6 +177,6 @@ pcapng_add_interface(rte_pcapng_t *self, uint16_t port)
+@@ -178,6 +178,6 @@ pcapng_add_interface(rte_pcapng_t *self, uint16_t port)



More information about the stable mailing list