[dpdk-dev] [PATCH 4/5] net/bnxt: check if MAC address is all zeros
Ferruh Yigit
ferruh.yigit at intel.com
Mon Jan 22 13:26:20 CET 2018
On 1/22/2018 6:20 AM, Ajit Khaparde wrote:
> In certain cases the MAC address of a port could be all zeros.
> Catch it early, log a message and fail the initiaization.
>
> Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
<...>
> @@ -3247,6 +3247,16 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
> rc = -ENOMEM;
> goto error_free;
> }
> +
> + if (check_zero_bytes(bp->dflt_mac_addr, ETHER_ADDR_LEN)) {
There is already a function is_zero_ether_addr() which can be used here that
prevents exposing your check_zero_bytes() function, up to you which one to use.
More information about the dev
mailing list