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 7D36BA0547; Thu, 9 Sep 2021 20:08:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 136AD41139; Thu, 9 Sep 2021 20:08:24 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id D4A2F4013F for ; Thu, 9 Sep 2021 20:08:20 +0200 (CEST) X-IPAS-Result: =?us-ascii?q?A2EYAwDmTDph/x0Y/QpagmKEZJxrlHWBfAsBAQEBAQEBA?= =?us-ascii?q?QEJQQQBAYRzAoJAJjQJDgECBAEBAQEDAgMBAQEBAQEDAQEBBQEBAQEBAQUCA?= =?us-ascii?q?QEBAQKBIIUvRoI1IoN1BjIBRhBRVxmCcbRYgQKIFIFjgTqJB4R1N4FVRIJRg?= =?us-ascii?q?iyFEYUuBIZtcoEOgkAplHeLdJxyLQeDLoExBgudAxoxpwW3LoRGgWGCFTMaI?= =?us-ascii?q?4M5URkPjiwWjk5UOAIGCwEBAwmQdwEB?= IronPort-PHdr: A9a23:ysCkAxdG98G0eiUYybKEzve7lGM+497LVj580XLHo4xHfqnrxZn+J kuXvawr0AWRG9yAurkV16L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQF cVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHNfwlEniexbL12I Rm5qQjcudQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2U bJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5 KptVRTmijoINyQh/W/XlMJ+kaxVrhGmqRN9zY7bb46bOeFicq7eZ94WWXBMUtpNWyFHH4iyb 5EPD+0EPetAtYfyvV8OrR+kCgmyBePk1zpGiWXr0qIg1uQqDAbL3BQ6ENIKtHTbtsv1NKYIX eC21qbH0C/Mb/ZN1Df87ojIbg4uofWWUb1sdsrRzFAiGgXYhVqftYLrJSma1vgRs2eF9epgU /qih3A5pgxsvjSix9kgh5TJi48RxF3J9yp3zJgpKNO4RkN2fd+pHZhSui+VNYZ7X8IvTWFqt SomyrMKp5y2cSsKxpkh2hXRaOSHfpCV7h7/TuqdPzd1iXx/dL6hiBu+61asx+n6W8KpylhFt DBFncPJtn0V0hzT7dWIReVl80e63DaPyxjT6uZZIUAojabbK4Auwro3lpcLsUrNGTL4lkL3g qKKakko5ual5/7pYrXjvJOcNol0ih3gPaQqgMCwHeM4Mg0WU2ia/+SzyqHj8FXkTLlWlPE6j KnUvZ7AKcgFqaO1GRFZ34I75xa6FTim0dAYnXcdLFJCfRKKl5DpNEvKIPD8F/i/nVWsnC1ox //cI7LuGJDNI2PCkLfnYbZy9UpcxBAvwtBY4pJYEqsBL+7rWk/tqNzYCQc0PBGqzOb5E9hyy 5seVn+MAqODN6PSq1CItaoTJLyAaZE9tC7xKL4i/fG9o2U+nAoldK2t1IUWIFOxEv1jaxGBa H7oi8kAV2QDsgM7ZO3slFCGFzVUYiDhDOoH+jgnBdf+Xs/4TYe3jenZtBo= IronPort-HdrOrdr: A9a23:5NQE0a+xHJ8BRQn16nBuk+DbI+orL9Y04lQ7vn2ZhyY6TiX+rb HJoB1173/JYVoqNE3I3OrwXZVoIkmskqKdn7NhXotKNTOO0AaVxcNZnO/fKlbbehEWmNQz6U 4mScND4dvLZ2SS9fyKgjWFLw== X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="220896607" X-IronPort-AV: E=Sophos;i="5.85,281,1624345200"; d="scan'208";a="220896607" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 11:08:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,281,1624345200"; d="scan'208";a="539803612" Received: from win-kgkr85lv27f.jf.intel.com (HELO localhost.localdomain) ([10.166.188.124]) by FMSMGA003.fm.intel.com with ESMTP; 09 Sep 2021 11:08:18 -0700 From: Pallavi Kadam 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 Date: Thu, 9 Sep 2021 13:05:32 -0700 Message-Id: <20210909200533.3747-3-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210909200533.3747-1-pallavi.kadam@intel.com> References: <20210528230838.10620-1-pallavi.kadam@intel.com> <20210909200533.3747-1-pallavi.kadam@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 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" 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 Reviewed-by: Ranjit Menon --- 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