public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: <Mario_Limonciello@Dell.com>
Cc: <gregkh@linuxfoundation.org>, <hayeswang@realtek.com>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-usb@vger.kernel.org>, <pali.rohar@gmail.com>,
	<anthony.wong@canonical.com>
Subject: Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address
Date: Thu, 02 Jun 2016 20:04:02 +0200	[thread overview]
Message-ID: <87vb1rwjql.fsf@nemi.mork.no> (raw)
In-Reply-To: <6d9575fd791c4e25b464b9a1b11daa83@ausx13mpc124.AMER.DELL.COM> (Mario Limonciello's message of "Thu, 2 Jun 2016 15:46:41 +0000")

<Mario_Limonciello@Dell.com> writes:

>> > 2) Track whether this is the first or second USB NIC plugged in.  Only offer it
>> on the first NIC detected by r8152.  When the second NIC is plugged in don't
>> match from ACPI.
>> > There would be a question of what to do if the first NIC is removed and
>> added back if it should get the persistent system MAC or not.
>> > I'd say yes, just make sure that only one NIC can have it at a time.
>> 
>> You are going to get things very complex very quickly if you try to do this.
>
> It's really not that hard, track a module wide static variable whether
> the feature is in use.  Track in each device whether the feature was
> in use.  If it in use, don't assign the next device plugged in via the
> ACPI string.  If a device is removed that has the feature activated,
> change the module wide static variable.

Having the mac address jump around in an arbitrary way like this is
going to confuse the hell out of your users.  Consider what happens if
the user docks a laptop with an r8152 usb dongle already plugged in...
How are you going to explain that the dock gets some other mac address
in this case? How are you going to explain the difference between using
an r8152 based dongle and some other ethernet usb dongle with your
systems?

Make it behave consistently if you're going to add this.  Which can be
done by specifically matching the Dell dock (doesn't it have an unique
Dell device ID?) and ignoring any other r8152 device.  You could also
choose to set the same mac for all r8152 devices.  Which is fine, but
will probably confuse many users.

What you definitely should not do is to change the mac for some
arbitrary "first" device.  Then you are better off with the userspace
proposal where you and your users have some chance to implement a
sensible policy based on e.g. usb port numbers.



Bjørn

  parent reply	other threads:[~2016-06-02 18:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-01 21:50 [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Mario Limonciello
2016-06-01 22:27 ` Andrew Lunn
2016-06-01 22:31   ` Mario_Limonciello
2016-06-01 23:06     ` Greg KH
2016-06-02  1:54       ` Mario_Limonciello
2016-06-01 23:05 ` Greg KH
2016-06-02  2:10   ` Mario_Limonciello
2016-06-02 15:22     ` Greg KH
     [not found]       ` <20160602152244.GA26494-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-06-02 15:46         ` Mario_Limonciello-DYMqY+WieiM
2016-06-02 16:09           ` Greg KH
2016-06-02 16:58             ` Mario_Limonciello
2016-06-03  9:23               ` Hayes Wang
     [not found]                 ` <0835B3720019904CB8F7AA43166CEEB2FED973-JIZ+AM9kKNzuvTFwvkocLypo8c9IxeqyAjHCUHv49ws@public.gmane.org>
2016-06-03 14:52                   ` Mario_Limonciello-DYMqY+WieiM
2016-06-02 18:04           ` Bjørn Mork [this message]
2016-06-02 18:28             ` Mario_Limonciello
2016-06-02 19:03               ` Pali Rohár
2016-06-02 19:18                 ` Mario_Limonciello
2016-06-02 18:44             ` Pali Rohár
2016-06-02  2:53   ` Mario_Limonciello
2016-06-02  8:11     ` Bjørn Mork
2016-06-02 14:29       ` Mario_Limonciello
2016-06-02  7:27   ` Bjørn Mork
2016-06-02  6:10 ` Hayes Wang
2016-06-02  7:46 ` Pali Rohár
2016-06-02 14:45   ` Mario_Limonciello
2016-06-02 15:01     ` Andrew Lunn
2016-06-02 15:07       ` Mario_Limonciello

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=87vb1rwjql.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=Mario_Limonciello@Dell.com \
    --cc=anthony.wong@canonical.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hayeswang@realtek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pali.rohar@gmail.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