[v1 01/12] net/enetc: Add initial ENETC4 PMD driver support

Stephen Hemminger stephen at networkplumber.org
Mon Dec 2 23:30:20 CET 2024


On Fri, 18 Oct 2024 12:56:33 +0530
vanshika.shukla at nxp.com wrote:

> 	if ((high_mac | low_mac) == 0) {
> +		char *first_byte;
> +
> +		ENETC_PMD_NOTICE("MAC is not available for this SI, "
> +				"set random MAC");
> +		mac = (uint32_t *)hw->mac.addr;
> +		*mac = (uint32_t)rte_rand();
> +		first_byte = (char *)mac;
> +		*first_byte &= 0xfe;	/* clear multicast bit */
> +		*first_byte |= 0x02;	/* set local assignment bit (IEEE802) */

Why do you need to reinvent rte_eth_random_addr()?


More information about the dev mailing list