From: Oliver Neukum <oneukum@suse.com>
To: Andrew Lunn <andrew@lunn.ch>, Oliver Neukum <oneukum@suse.com>
Cc: hayeswang@realtek.com, netdev@vger.kernel.org
Subject: Re: [RFC] r8152: pass through needs to be singular
Date: Thu, 4 Aug 2022 11:24:20 +0200 [thread overview]
Message-ID: <d8e45a94-e16a-1152-afad-2ebb15b48d67@suse.com> (raw)
In-Reply-To: <YuknNESeYxCjcPrD@lunn.ch>
On 02.08.22 15:31, Andrew Lunn wrote:
>> True. Nevertheless, do we really want to say that we dislike a design
>> so much that we are not fixing bugs?
>
> I'm not sure we can fix it. Part of that long thread about why this
> whole concept is broken is that we have no idea which interface is the
> one which should give the MAC address to. If we change it to only give
> out the MAC address once, all we really do is change it from one bug
> to another bug.
I am afraid I have to beg to differ.
We have a couple of related issues here. Obviously whoever designed
MAC pass-through did not consider the case of somebody using two
docking stations at the same time. While pass-through is used I agree
that this is unsolvable.
Yet connecting two (or even more) docking stations to a host is
within spec. They are USB devices (partially) and if they contain
a NIC it is clear what we have to do.
We would operate them with
1. a MAC contained on the device
2. if the device contains no MAC, we'd use a random MAC, but a
different one per device. User space can assign any MAC it wants to,
but we are talking defaults here.
Now, the question arises whether we let another feature interfere
with that. And then I must say, if we do that and we have decided
to take a feature that does so, we'll have to do it in a way that
stays within spec. Yet I am sorry, you cannot give out the same
MAC to two devices at the same time, if you want to do so.
So while the bug in the driver derives from a stupid design,
it nevertheless is a bug and my patch fixes it. Optimally?
No, of course not, the design is broken.
>>> What exactly is your problem which you are trying to fix?
>> Adressing the comment Hayes made when reset_resume() was fixed
>> from a deadlock, that it still assigns wrong MACs. I feel that
>> before I fix keeping the correct address I better make sure the
>> MAC is sane in the first place.
>
> I would say that reset_resume() should restore whatever the MAC
> address was before the suspend.
The problem is that these devices reread the passed through MAC
at post_reset(). Do you want reset_resume() to act differently?
> It does not matter if the MAC address
> is not unique. As far as i know, the kernel never prevents the user
> assigning the same MAC address on multiple interfaces via ip link set.
> So it could actually be a user choice.
Iff the user does so. Until then it is a kernel bug.
Regards
Oliver
next prev parent reply other threads:[~2022-08-04 9:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-28 19:18 [RFC] r8152: pass through needs to be singular Oliver Neukum
2022-07-28 22:11 ` Andrew Lunn
2022-08-02 10:52 ` Oliver Neukum
2022-08-02 13:31 ` Andrew Lunn
2022-08-04 9:24 ` Oliver Neukum [this message]
2022-08-04 13:24 ` Andrew Lunn
2022-08-04 13:29 ` Oliver Neukum
2022-08-04 14:31 ` Andrew Lunn
2022-08-03 3:48 ` Hayes Wang
2022-08-04 8:57 ` Oliver Neukum
2022-08-08 7:04 ` Hayes Wang
2022-08-23 7:53 ` Oliver Neukum
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=d8e45a94-e16a-1152-afad-2ebb15b48d67@suse.com \
--to=oneukum@suse.com \
--cc=andrew@lunn.ch \
--cc=hayeswang@realtek.com \
--cc=netdev@vger.kernel.org \
/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).