net: add macro to extract MAC address bytes
[dpdk.git] / drivers / net / mlx4 / mlx4.c
index 7cd35cd..7f9f300 100644 (file)
@@ -201,6 +201,7 @@ mlx4_proc_priv_init(struct rte_eth_dev *dev)
        struct mlx4_proc_priv *ppriv;
        size_t ppriv_size;
 
+       mlx4_proc_priv_uninit(dev);
        /*
         * UAR register table follows the process private structure. BlueFlame
         * registers for Tx queues are stored in the table.
@@ -1013,11 +1014,8 @@ err_secondary:
                              " (error: %s)", strerror(err));
                        goto port_error;
                }
-               INFO("port %u MAC address is %02x:%02x:%02x:%02x:%02x:%02x",
-                    priv->port,
-                    mac.addr_bytes[0], mac.addr_bytes[1],
-                    mac.addr_bytes[2], mac.addr_bytes[3],
-                    mac.addr_bytes[4], mac.addr_bytes[5]);
+               INFO("port %u MAC address is " RTE_ETHER_ADDR_PRT_FMT,
+                    priv->port, RTE_ETHER_ADDR_BYTES(&mac));
                /* Register MAC address. */
                priv->mac[0] = mac;