dev: fix mac address dump in trace output 29/40829/3
authorAlok Mishra <almishra@marvell.com>
Fri, 26 Apr 2024 13:40:13 +0000 (18:40 +0500)
committerDamjan Marion <dmarion@0xa5.net>
Mon, 13 May 2024 14:59:38 +0000 (14:59 +0000)
"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 <almishra@marvell.com>
src/vnet/dev/format.c

index ed83a0e..f599c0f 100644 (file)
@@ -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);