netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: "David Laight" <David.Laight@ACULAB.COM>,
	"'Bjørn Mork'" <bjorn@mork.no>,
	"Oliver Neukum" <oneukum@suse.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: question on random MAC in usbnet
Date: Mon, 20 Nov 2023 10:48:22 -0600	[thread overview]
Message-ID: <d089926c25a2c5e4593dbe6db9250843badc9771.camel@redhat.com> (raw)
In-Reply-To: <64dfec9e75a744cf8e7f50807140ba9a@AcuMS.aculab.com>

On Sun, 2023-11-19 at 11:09 +0000, David Laight wrote:
> From: Bjørn Mork
> > Sent: 16 November 2023 11:32
> ...
> > > Do you think that behavior should be changed to using
> > > a separate random MAC for each device that requires it?
> > 
> > I'm in favour.
> > 
> > I could be wrong, but I don't expect anything to break if we did
> > that.
> > The current static address comes from eth_random_addr() in any
> > case, so
> > the end result as seen from the mini drivers should be identical. 
> > The
> > difference will be seen in userspace and surrounding equipment, And
> > those should be for the better.
> 
> It might cause grief when a USB device 'bounces' [1].
> At the moment it will pick up the same 'random' MAC address.
> But afterwards it will change.

Can that be achieved with userspace helpers too? They can match against
USB device details (or just use a static MAC for everything like the
driver does today) and set that on the device before anything else in
userspace starts using it.

Dan

> 
> So you might want to save the MAC on device removal and
> re-use it on the next insert.
> 
> [1] We ended up putting the USB interface inside a 'bond'
> in order to stop the interface everything was using
> randomly disappearing due to common-mode noise on the
> USB data lines causing a disconnect.
> 
>         David
> 
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes,
> MK1 1PT, UK
> Registration No: 1397386 (Wales)


      parent reply	other threads:[~2023-11-20 16:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-16 10:14 question on random MAC in usbnet Oliver Neukum
2023-11-16 11:31 ` Bjørn Mork
2023-11-16 12:32   ` Oliver Neukum
2023-11-19 11:09   ` David Laight
2023-11-19 16:13     ` Andrew Lunn
2023-11-20 11:06     ` Oliver Neukum
2023-11-20 16:48     ` Dan Williams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d089926c25a2c5e4593dbe6db9250843badc9771.camel@redhat.com \
    --to=dcbw@redhat.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=bjorn@mork.no \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).