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 43D88A0547; Thu, 9 Sep 2021 23:27:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78D2F41130; Thu, 9 Sep 2021 23:27:01 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 9262C4067E for ; Thu, 9 Sep 2021 23:26:57 +0200 (CEST) X-IPAS-Result: =?us-ascii?q?A2EXAwDoejph/0HRBwpagmKEZJxrlHWBfAsBAQEBAQEBA?= =?us-ascii?q?QEJQQQBAYRzAoI/JzQJDgECBAEBAQEDAgMBAQEBAQEDAQEBBQEBAQEBAQUCA?= =?us-ascii?q?QEBAQKBIIUvRoI1IoN1BjIBRhBRVxmCcbV7gQKIFIFjgTqJB4R1N4FVRIJRg?= =?us-ascii?q?iyFEYUuBIZtcoEOgkAplHeLdJxyLQeDLoExBgudAxoxpwW3LoRGgWGCFTMaI?= =?us-ascii?q?4M5URkPjiwWjk5UOAIGCwEBAwmQdwEB?= IronPort-PHdr: A9a23:Xwl0+hJAnX90XGdrZNmcuChmWUAX0o4c3iYr45Yqw4hDbr6kt8y7e hCFvbM01w6CBNiKo9t/yMPu+5j6XmIB5ZvT+FsjS7drEyE/tMMNggY7C9SEA0CoZNTjbig9A dgQHAQ9pyLzPkdaAtvxaEPPqXOu8zESBg//NQ1oLejpB4Lelcu62/6u95HJfglFij6wbbxvI Bi2qQjaq9Ubj5ZlJqst0BXCv2FGe/5RxWNmJFKTmwjz68Kt95N98Cpepuws+ddYXar1Y6o3Q 7pYDC87M28u/83kqQPDTQqU6XQCVGgdjwdFDBLE7BH+WZfxrzf6u+9g0ySUIcH6UbY5Uimk4 qx2ShHnlT0HOiY5/m/Jl8J+gqFVrhWjqBxxzIHab5qYOOZ9c67HYd8XX3ZNUtpXWidcAo28d YwPD+8ZMOhCtYb9o18OogGgBQmtGejhzyVHiWLs0q0/zu8sFhnG0xYkH9IKqnvUstT1OL0RU e+v0abH1zDDYuhX2Tf79IjHbBQhreuQUrJ3dMrc0E8iHB7KgVuMs4LqJS+V1vgTvGiB6eptT fyjhnA6pg1tozWj2Nohh4nNi48byF3K+jt1zZo1K9C2VEN2YN2pHZlfuSyYKoZ7Q8MsTmN0t Cg61LELu522cigMxZ86xBDfc+SKf5WU7h75VuudOyl0iG5hdb6lhhu/8U6twfDmWMauylZFt C9Fn8HJtnAKyhPc9NCKSuB4/ke9wTaP0B3T6v1cLUA0i6XbL5khz6Y3lpoJqkTDGyD2l1/qg KOKdUgo4Oqo6+r9brXnoJ+cK5F7igXkPqsyncy/BPw0MgkIX2eF5eSxzKDv8VHjTLhIlPE6j LXVvZTAKckapqO1GwpV3Zwi6xa7ATemytMYnXwfIVJdYh2Hi4zpNEvQIPD5F/u/gE6jnypxy PDDJbDhA5PNLmTdn7flZ7py90lcyA8rwdBF+51UEq0BIO70WkLpqdPXEAE5PhepzOb/Fdp91 ZkSWWWVAq+WY+vutgqE6/wHL/GAZ8kSojmuBeIi4qvWhHs9kEEcNYqg0ZISICSgF/BiKluYJ 3nljt4EOWYMogc6CuftjQvRAnZoe3+uUvdktXkAA4W8ANKbLr0= IronPort-HdrOrdr: A9a23:lN22X6qCcz6uhySd7pnLHwMaV5ooeYIsimQD101hICG9vPb3qy nIpoV86faaslYssR0b9exofZPwJE80lqQFhrX5Q43SPzUO0VHAROxfBMnZslnd8kbFl9K1u5 0OT0E4MrbN5F5B5/oSmDPIceod/A== X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="243229673" X-IronPort-AV: E=Sophos;i="5.85,281,1624345200"; d="scan'208";a="243229673" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 14:26:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,281,1624345200"; d="scan'208";a="479853160" Received: from win-kgkr85lv27f.jf.intel.com (HELO localhost.localdomain) ([10.166.188.124]) by orsmga008.jf.intel.com with ESMTP; 09 Sep 2021 14:26:55 -0700 From: Pallavi Kadam To: dev@dpdk.org Cc: thomas@monjalon.net, 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, pallavi.kadam@intel.com Date: Thu, 9 Sep 2021 16:23:20 -0700 Message-Id: <20210909232321.5091-3-pallavi.kadam@intel.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210909232321.5091-1-pallavi.kadam@intel.com> References: <20210909200533.3747-1-pallavi.kadam@intel.com> <20210909232321.5091-1-pallavi.kadam@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [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" 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