[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHNKnsQW_s6vJu2Otb91WaFebP1-wt7ZB7drxCTvnwFkPVk0SA@mail.gmail.com>
Date: Wed, 2 Jun 2021 18:38:49 +0300
From: Sergey Ryazanov <ryazanov.s.a@...il.com>
To: Johannes Berg <johannes@...solutions.net>
Cc: Loic Poulain <loic.poulain@...aro.org>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
m.chetan.kumar@...el.com
Subject: Re: [RFC 3/4] wwan: add interface creation support
On Wed, Jun 2, 2021 at 3:56 PM Johannes Berg <johannes@...solutions.net> wrote:
>>> The only thing I'd be worried about is that different implementations
>>> use it for different meanings, but I guess that's not that big a deal?
>>
>> The spectrum of sane use of the IFLA_PARENT_DEV_NAME attribute by
>> various subsystems and (or) drivers will be quite narrow. It should do
>> exactly what its name says - identify a parent device.
>
> Sure, I was more worried there could be multiple interpretations as to
> what "a parent device" is, since userspace does nothing but pass a
> string in. But we can say it should be a 'struct device' in the kernel.
>
>> We can not handle the attribute in the common rtnetlink code since
>> rtnetlink does not know the HW configuration details. That is why
>> IFLA_PARENT_DEV_NAME should be handled by the RTNL ->newlink()
>> callback. But after all the processing, the device that is identified
>> by the IFLA_PARENT_DEV_NAME attribute should appear in the
>> netdev->dev.parent field with help of SET_NETDEV_DEV(). Eventually
>> RTNL will be able to fill IFLA_PARENT_DEV_NAME during the netdevs dump
>> on its own, taking data from netdev->dev.parent.
>
> I didn't do that second part, but I guess that makes sense.
>
> Want to send a follow-up patch to my other patch? I guess you should've
> gotten it, but if not the new series is here:
>
> https://lore.kernel.org/netdev/20210602082840.85828-1-johannes@sipsolutions.net/T/#t
Yes, I saw the second version of your RFC and even attempted to
provide a full picture of why this attribute should be generic.
I will send a follow-up series tonight with parent device exporting
support and with some usage examples.
>> I assume that IFLA_PARENT_DEV_NAME could replace the IFLA_LINK
>> attribute usage in such drivers as MBIM and RMNET. But the best way to
>> evolve these drivers is to make them WWAN-subsystem-aware using the
>> WWAN interface configuration API from your proposal, IMHO.
>
> Right.
--
Sergey
Powered by blists - more mailing lists