From: "Shukla, Shivanshu" <shivanshu.shukla@intel.com>
To: "Kadam, Pallavi" <pallavi.kadam@intel.com>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>,
"fady@mellanox.com" <fady@mellanox.com>,
"Narcisa.Vasile@microsoft.com" <Narcisa.Vasile@microsoft.com>,
"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Wu, Jingjing" <jingjing.wu@intel.com>,
"Xing, Beilei" <beilei.xing@intel.com>,
"Menon, Ranjit" <ranjit.menon@intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 2/3] lib/net: fix support of random
Date: Wed, 22 Sep 2021 21:00:10 +0000 [thread overview]
Message-ID: <DM6PR11MB4547F93B0EAE88CCCEDA6C588CA29@DM6PR11MB4547.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210909232321.5091-3-pallavi.kadam@intel.com>
Ack-by: Shivanshu Shukla <shivanshu.shukla@intel.com>
-----Original Message-----
From: Kadam, Pallavi <pallavi.kadam@intel.com>
Sent: Thursday, September 9, 2021 4:23 PM
To: dev@dpdk.org
Cc: thomas@monjalon.net; Zhang, Qi Z <qi.z.zhang@intel.com>; fady@mellanox.com; Narcisa.Vasile@microsoft.com; dmitry.kozliuk@gmail.com; Yigit, Ferruh <ferruh.yigit@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Menon, Ranjit <ranjit.menon@intel.com>; Shukla, Shivanshu <shivanshu.shukla@intel.com>; Kadam, Pallavi <pallavi.kadam@intel.com>
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: fady@mellanox.com
Cc: stable@dpdk.org
Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com>
Reviewed-by: Ranjit Menon <ranjit.menon@intel.com>
---
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
next prev parent reply other threads:[~2021-09-22 21:08 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 23:08 [dpdk-dev] [PATCH] net/iavf: enable on Windows Pallavi Kadam
2021-09-09 20:05 ` [dpdk-dev] [PATCH v2 0/3] Support iavf PMD " Pallavi Kadam
2021-09-09 20:05 ` [dpdk-dev] [PATCH v2 1/3] net/iavf: build " Pallavi Kadam
2021-09-09 20:05 ` [dpdk-dev] [PATCH v2 2/3] lib/net: fix support of random Pallavi Kadam
2021-09-09 20:05 ` [dpdk-dev] [PATCH v2 3/3] doc: update iavf PMD and 21.11 release notes Pallavi Kadam
2021-09-09 23:23 ` [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows Pallavi Kadam
2021-09-09 23:23 ` [dpdk-dev] [PATCH v3 1/3] net/iavf: build " Pallavi Kadam
2021-09-22 20:58 ` Shukla, Shivanshu
2021-09-09 23:23 ` [dpdk-dev] [PATCH v3 2/3] lib/net: fix support of random Pallavi Kadam
2021-09-22 21:00 ` Shukla, Shivanshu [this message]
2021-09-30 16:46 ` Thomas Monjalon
2021-09-30 22:36 ` Kadam, Pallavi
2021-09-09 23:23 ` [dpdk-dev] [PATCH v3 3/3] doc: update iavf PMD and 21.11 release notes Pallavi Kadam
2021-09-22 21:01 ` Shukla, Shivanshu
2021-09-30 16:49 ` Thomas Monjalon
2021-09-30 19:07 ` Thomas Monjalon
2021-09-22 20:56 ` [dpdk-dev] [PATCH v3 0/3] Support iavf PMD on Windows Shukla, Shivanshu
2021-09-22 20:58 ` Shukla, Shivanshu
2021-09-27 21:33 ` Shukla, Shivanshu
2021-09-30 20:15 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM6PR11MB4547F93B0EAE88CCCEDA6C588CA29@DM6PR11MB4547.namprd11.prod.outlook.com \
--to=shivanshu.shukla@intel.com \
--cc=Narcisa.Vasile@microsoft.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=fady@mellanox.com \
--cc=ferruh.yigit@intel.com \
--cc=jingjing.wu@intel.com \
--cc=pallavi.kadam@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=ranjit.menon@intel.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).