Ack-by: Shivanshu Shukla <[email protected]>
-----Original Message-----
From: Kadam, Pallavi <[email protected]>
Sent: Thursday, September 9, 2021 4:23 PM
To: [email protected]
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected];
[email protected]; [email protected]; Yigit, Ferruh
<[email protected]>; Wu, Jingjing <[email protected]>; Xing, Beilei
<[email protected]>; Menon, Ranjit <[email protected]>; Shukla,
Shivanshu <[email protected]>; Kadam, Pallavi <[email protected]>
Subject: [PATCH v3 2/3] lib/net: fix support of random
IAVF PMD needs to generate a random MAC address if it is not configured by host.
'random' is now supported on Windows.
Fixes: 16f0d03098cb ("net: build on Windows")
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Pallavi Kadam <[email protected]>
Reviewed-by: Ranjit Menon <[email protected]>
---
lib/net/rte_ether.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/lib/net/rte_ether.c b/lib/net/rte_ether.c index
34605838b5..ced65ed9f3 100644
--- a/lib/net/rte_ether.c
+++ b/lib/net/rte_ether.c
@@ -10,16 +10,12 @@
void
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
}
void
--
2.31.1.windows.1