From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 ; 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: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekgedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdej ueeiiedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 30 Sep 2021 12:46:30 -0400 (EDT) From: Thomas Monjalon To: Pallavi Kadam 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > Reviewed-by: Ranjit Menon > --- > 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 > }