From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id BDAB3A0C43;
	Thu, 30 Sep 2021 18:46:33 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 45E4240DDA;
	Thu, 30 Sep 2021 18:46:33 +0200 (CEST)
Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com
 [66.111.4.221]) by mails.dpdk.org (Postfix) with ESMTP id 54B8D4067E
 for <dev@dpdk.org>; Thu, 30 Sep 2021 18:46:32 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailnew.nyi.internal (Postfix) with ESMTP id D20DC580FE4;
 Thu, 30 Sep 2021 12:46:31 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute1.internal (MEProxy); Thu, 30 Sep 2021 12:46:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=fm2; bh=
 8iKT2MYzIMzWkcAfW/jqxnj+PktB2yuLqe++qXaqPqY=; b=T7gI6U6tOQvuV0Mg
 dyxR/BV/r8ap5aNgQHPd5F8rXXAIoQkGTckvCjkYGmtIQlUZ157RwKIaoL8pUPAm
 367YTDdWuQoBc22+IwFrx1PRwnPOLNYb1o4ph0IoT4NTjl1eT9gdOPuaujJEiuRx
 3KNtvcvSqyw3UoXylyv0MsrmjrEkKOHfyqv+k5qMzJQibLc1369GBMSsqJ7SwL1x
 h7rfTnvHWXAVpuNmM1QoGhkJjiOReZb33WOMHQYdejgh1KsS86RtKVMk5YnDy6g6
 5g/GcNHN5LD7T5lkzeVbDEeTBQyzDScUOJpwQoSFQTyGoBlgFl1ZXxjR67Fn6JVb
 /qbW0Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm3; bh=8iKT2MYzIMzWkcAfW/jqxnj+PktB2yuLqe++qXaqP
 qY=; b=WRTms3Tj4yu1/XxUJKedrGh4XE1qgcuK+FfYLK1wAv5pvpA6/0nWJfw+d
 zogXm7zN7KuLcfRCPnKJ77p9bfPdq3KtnIT947eCOouk4Dz4eCraCSnCeu5eJaNK
 5ncFyFultkAShW38nDKLbEnAeLjTAffGhlVXu8yZ8U6ntXYQaRKl3MnGOfk0H0Lp
 VVL6UN6Bkzo+B7YQ/YPHnUCEUgInnsJEM+kH50hQ1Vg9aFKtNsghBtX0s6/OoX4Z
 mvhQ4OnZeneYv+C9uIub53FZ+IJ6MWVD7S8BHxRzHT7TWVKc0to76lc6u+D7AZhZ
 js1yguHVHLvl7Va6ELSoW8LTD/saA==
X-ME-Sender: <xms:5-lVYQnesUdIkOZCGnHAU-fQ4MMIQmRZAouFHV5YIT-kkAOxcGOTUA>
 <xme:5-lVYf27eRpr1Aq0h7L7-SLeRx6lzDU-heDDfnJ2yMeoQRb0nHKQd6Wd5t5WNV6pB
 l9IpzryKquN1CPPlg>
X-ME-Received: <xmr:5-lVYeqwVk8zMdQMU6E1GU9lqVtny1srxr4hA7n-dqcD57qtYVPZrFYQ_vAhgWqifvqqBGjSqIo_Y6_EU6CNlJ0d4Q>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekgedguddtfecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm
 rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc
 ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej
 ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh
 hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght
X-ME-Proxy: <xmx:5-lVYcn7dvPd7rOqJ4RdlIsocThwHVkW_TrrEdpDJg4saDTXnNZLvg>
 <xmx:5-lVYe2ObzfNynGCtQ2w3ptXXUAcjjxGwpFLsMpvIAWOeQt1-EaBhw>
 <xmx:5-lVYTtlS56h_ptr5m_fylCbN5aHPXCmZN_Ei6Sfk55Sm7_68O2Y-Q>
 <xmx:5-lVYcygVlMTJtyvzt42JwYxdtHLviAweUgeY15GOEJtYUn3Wpd-yw>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 30 Sep 2021 12:46:30 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Pallavi Kadam <pallavi.kadam@intel.com>
Cc: dev@dpdk.org, qi.z.zhang@intel.com, fady@mellanox.com,
 Narcisa.Vasile@microsoft.com, dmitry.kozliuk@gmail.com, ferruh.yigit@intel.com,
 jingjing.wu@intel.com, beilei.xing@intel.com, ranjit.menon@intel.com,
 shivanshu.shukla@intel.com
Date: Thu, 30 Sep 2021 18:46:29 +0200
Message-ID: <2407308.xtS4jV28jI@thomas>
In-Reply-To: <20210909232321.5091-3-pallavi.kadam@intel.com>
References: <20210909200533.3747-1-pallavi.kadam@intel.com>
 <20210909232321.5091-1-pallavi.kadam@intel.com>
 <20210909232321.5091-3-pallavi.kadam@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH v3 2/3] lib/net: fix support of random
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

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: fady@mellanox.com
> Cc: stable@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.kadam@intel.com>
> Reviewed-by: Ranjit Menon <ranjit.menon@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
>  }