From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Horman Subject: Re: [PATCH 19/25] mlx4: Randomizing mac addresses for slaves Date: Fri, 6 Nov 2009 15:06:24 +1100 Message-ID: <20091106040624.GA6629@verge.net.au> References: <4AF19E69.8070605@mellanox.co.il> <15ddcffd0911041333l165ee274mfae3508a3db755e7@mail.gmail.com> <2ED289D4E09FBD4D92D911E869B97FDD0166CA59@mtlexch01.mtl.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Liran Liss , Or Gerlitz , Yevgeny Petrilin , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, Tziporet Koren To: Roland Dreier Return-path: Received: from kirsty.vergenet.net ([202.4.237.240]:58173 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750741AbZKFEGU (ORCPT ); Thu, 5 Nov 2009 23:06:20 -0500 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Nov 05, 2009 at 07:58:12AM -0800, Roland Dreier wrote: > > > This approach seems to be common practice now (e.g., drivers/net/igb/igb_main.c:1332). > > In any case, the user can change the randomized mac. > > igb uses the full output of random_ether_addr(). I'd be fine with > that. However setting the OUI means you only get 24 bits of randomness > which makes a collision a lot more likely. IIRC that was precisely why the OUI isn't used for the igb driver. Perhaps some infrastructure (by which I mean a random_mac() function) is warranted so at least this discussion can be concentrated around that rather than repeating it for each driver that needs random mac addresses.