From 5233ee29cc1e8b209e92e05ab699ee900e8c0b44 Mon Sep 17 00:00:00 2001 From: Alok Mishra Date: Fri, 26 Apr 2024 18:40:13 +0500 Subject: dev: fix mac address dump in trace output "port->attr.hw_addr" is set during the port initialization. It won't be updated if the mac address of the port is changed via the vpp command line. Use "port->primary_hw_addr" to dump the updated mac address correclty. Type: fix Fixes: 38c619115b Change-Id: I6c99fcfdfae67efb3606e17f36781c56716ff7ea Signed-off-by: Alok Mishra --- src/vnet/dev/format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnet/dev/format.c b/src/vnet/dev/format.c index ed83a0eba95..f599c0f8b85 100644 --- a/src/vnet/dev/format.c +++ b/src/vnet/dev/format.c @@ -101,7 +101,7 @@ format_vnet_dev_port_info (u8 *s, va_list *args) u32 indent = format_get_indent (s); s = format (s, "Hardware Address is %U", format_vnet_dev_hw_addr, - &port->attr.hw_addr); + &port->primary_hw_addr); s = format (s, ", %u RX queues (max %u), %u TX queues (max %u)", pool_elts (port->rx_queues), port->attr.max_rx_queues, pool_elts (port->tx_queues), port->attr.max_tx_queues); -- cgit 1.2.3-korg