10/09/2021 01:23, Pallavi Kadam: > IAVF PMD needs to generate a random MAC address if it is not configured > by host. > 'random' is now supported on Windows.
This patch can be the first of this series to respect the dependency order. > Fixes: 16f0d03098cb ("net: build on Windows") > Cc: f...@mellanox.com > Cc: sta...@dpdk.org This commit log does not explain why it was disabled before, and what makes it possible now, but for sure, there is no need to backport. I will remove above lines. > Signed-off-by: Pallavi Kadam <pallavi.ka...@intel.com> > Reviewed-by: Ranjit Menon <ranjit.me...@intel.com> > --- > rte_eth_random_addr(uint8_t *addr) > { > -#ifdef RTE_EXEC_ENV_WINDOWS /* FIXME: random is not supported */ > - RTE_SET_USED(addr); > -#else > uint64_t rand = rte_rand(); > uint8_t *p = (uint8_t *)&rand; > > rte_memcpy(addr, p, RTE_ETHER_ADDR_LEN); > addr[0] &= (uint8_t)~RTE_ETHER_GROUP_ADDR; /* clear multicast bit > */ > addr[0] |= RTE_ETHER_LOCAL_ADMIN_ADDR; /* set local assignment bit */ > -#endif > }