DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pallavi Kadam <pallavi.kadam@intel.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, qi.z.zhang@intel.com, -fady@mellanox.com,
	dmitry.kozliuk@gmail.com, jingjing.wu@intel.com,
	beilei.xing@intel.com, ranjit.menon@intel.com,
	shivanshu.shukla@intel.com, pallavi.kadam@intel.com
Subject: [dpdk-dev] [PATCH v2 2/3] lib/net: fix support of random
Date: Thu,  9 Sep 2021 13:05:32 -0700	[thread overview]
Message-ID: <20210909200533.3747-3-pallavi.kadam@intel.com> (raw)
In-Reply-To: <20210909200533.3747-1-pallavi.kadam@intel.com>

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


  parent reply	other threads:[~2021-09-09 18: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   ` Pallavi Kadam [this message]
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
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=20210909200533.3747-3-pallavi.kadam@intel.com \
    --to=pallavi.kadam@intel.com \
    --cc=-fady@mellanox.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=jingjing.wu@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=shivanshu.shukla@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).