patch 'ethdev: fix MAC address in telemetry device info' has been queued to stable release 21.11.1
Kevin Traynor
ktraynor at redhat.com
Tue Mar 1 11:41:57 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/06/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/116bfaa14e1db21c3d3fbd2ec4cfd125c790bded
Thanks.
Kevin
---
>From 116bfaa14e1db21c3d3fbd2ec4cfd125c790bded Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 16 Feb 2022 15:13:16 +0100
Subject: [PATCH] ethdev: fix MAC address in telemetry device info
[ upstream commit ffe77e911f6a3d62757bc740670c4fda28f882f2 ]
The right size for a human readable MAC is RTE_ETHER_ADDR_FMT_SIZE.
While at it, the net library provides a helper for MAC address
formatting. Prefer it.
Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Reported-by: Christophe Fontaine <cfontain at redhat.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
lib/ethdev/rte_ethdev.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e59958e6f5..bf93534b90 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6307,5 +6307,5 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
{
struct rte_tel_data *rxq_state, *txq_state;
- char mac_addr[RTE_ETHER_ADDR_LEN];
+ char mac_addr[RTE_ETHER_ADDR_FMT_SIZE];
struct rte_eth_dev *eth_dev;
char *end_param;
@@ -6348,11 +6348,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
rte_tel_data_add_dict_int(d, "rx_mbuf_alloc_fail",
eth_dev->data->rx_mbuf_alloc_failed);
- snprintf(mac_addr, RTE_ETHER_ADDR_LEN, "%02x:%02x:%02x:%02x:%02x:%02x",
- eth_dev->data->mac_addrs->addr_bytes[0],
- eth_dev->data->mac_addrs->addr_bytes[1],
- eth_dev->data->mac_addrs->addr_bytes[2],
- eth_dev->data->mac_addrs->addr_bytes[3],
- eth_dev->data->mac_addrs->addr_bytes[4],
- eth_dev->data->mac_addrs->addr_bytes[5]);
+ rte_ether_format_addr(mac_addr, sizeof(mac_addr),
+ eth_dev->data->mac_addrs);
rte_tel_data_add_dict_string(d, "mac_addr", mac_addr);
rte_tel_data_add_dict_int(d, "promiscuous",
--
2.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-03-01 10:41:02.422757833 +0000
+++ 0041-ethdev-fix-MAC-address-in-telemetry-device-info.patch 2022-03-01 10:41:01.308244099 +0000
@@ -1 +1 @@
-From ffe77e911f6a3d62757bc740670c4fda28f882f2 Mon Sep 17 00:00:00 2001
+From 116bfaa14e1db21c3d3fbd2ec4cfd125c790bded Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit ffe77e911f6a3d62757bc740670c4fda28f882f2 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 70c850a2f1..29a3d80466 100644
+index e59958e6f5..bf93534b90 100644
@@ -24 +25 @@
-@@ -5632,5 +5632,5 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
+@@ -6307,5 +6307,5 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
@@ -31 +32 @@
-@@ -5673,11 +5673,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
+@@ -6348,11 +6348,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
More information about the stable
mailing list