net/ixgbe: check driver type in MACsec API
[dpdk.git] / drivers / net / bnxt / bnxt_util.c
index 7d33427..dda40af 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <inttypes.h>
+#include <rte_ether.h>
 
 #include "bnxt_util.h"
 
@@ -16,3 +17,13 @@ int bnxt_check_zero_bytes(const uint8_t *bytes, int len)
                        return 0;
        return 1;
 }
+
+void bnxt_eth_hw_addr_random(uint8_t *mac_addr)
+{
+       rte_eth_random_addr(mac_addr);
+
+       /* Set Organizationally Unique Identifier (OUI) prefix */
+       mac_addr[0] = 0x00;
+       mac_addr[1] = 0x0a;
+       mac_addr[2] = 0xf7;
+}