From: Johannes Berg <johannes@sipsolutions.net>
To: Loic Poulain <loic.poulain@linaro.org>,
"Kumar, M Chetan" <m.chetan.kumar@intel.com>
Cc: "Network Development" <netdev@vger.kernel.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"Sudi, Krishna C" <krishna.c.sudi@intel.com>,
linuxwwan <linuxwwan@intel.com>, "Dan Williams" <dcbw@redhat.com>,
"Bjørn Mork" <bjorn@mork.no>, "Jakub Kicinski" <kuba@kernel.org>
Subject: Re: [PATCH V3 15/16] net: iosm: net driver
Date: Tue, 25 May 2021 14:55:09 +0200 [thread overview]
Message-ID: <c7d2dd39e82ada5aa4e4d6741865ecb1198959fe.camel@sipsolutions.net> (raw)
In-Reply-To: <CAMZdPi_VbLcbVA34Bb3uBGDsDCkN0GjP4HmHUbX95PF9skwe2Q@mail.gmail.com> (sfid-20210525_101545_116148_0A5A9BB6)
On Tue, 2021-05-25 at 10:24 +0200, Loic Poulain wrote:
> >
> > Can you please share us more details on wwan_core changes(if any)/how we should
> > use /sys/class/wwan0 for link creation ?
>
> Well, move rtnetlink ops to wwan_core (or wwan_rtnetlink), and parse
> netlink parameters into the wwan core. Add support for registering
> `wwan_ops`, something like:
> wwan_register_ops(wwan_ops *ops, struct device *wwan_root_device)
>
> The ops could be basically:
> struct wwan_ops {
> int (*add_intf)(struct device *wwan_root_device, const char *name,
> struct wwan_intf_params *params);
> int (*del_intf) ...
> }
>
> Then you could implement your own ops in iosm, with ios_add_intf()
> allocating and registering the netdev as you already do.
> struct wwan_intf_params would contain parameters of the interface,
> like the session_id (and possibly extended later with others, like
> checksum offload, etc...).
>
> What do you think?
Note that I kind of tried this in my version back when:
https://lore.kernel.org/netdev/20200225105149.59963c95aa29.Id0e40565452d0d5bb9ce5cc00b8755ec96db8559@changeid/#Z30include:net:wwan.h
See struct wwan_component_device_ops.
I had a different *generic* netlink family rather than rtnetlink ops,
but that's mostly an implementation detail. I tend to like genetlink
better, but having rtnetlink makes it easier in iproute2 (though it has
some generic netlink code too, of course.)
Nobody really seemed all that interested back then.
And frankly, I'm really annoyed that while all of this played out we let
QMI enter the tree with their home-grown stuff (and dummy netdevs,
FWIW), *then* said the IOSM driver has to go to rtnetlink ops like them,
instead of what older drivers are doing, and *now* are shifting
goalposts again towards something like the framework I started writing
early on for the IOSM driver, while the QMI driver was happening, and
nobody cared ...
Yeah, life's not fair and all that, but it does kind of feel like
arbitrary shifting of the goal posts, while QMI is already in tree. Of
course it's not like we have a competition with them here, but having
some help from there would've been nice. Oh well.
Not that I disagree with any of this, it does technically make sense.
However, I think at this point it'd be good to see some comments here
from DaveM/Jakub that they're going to force Qualcomm to also go down
this route, because they're now *heavily* invested in their own APIs,
and inventing a framework just for the IOSM driver is fairly pointless.
> I also plan to submit a change to add a wwan_register_netdevice()
> function (similarly to WiFi cfg80211_register_netdevice), that could
> be used instead of register_netdevice(), basically factorizing wwan
> netdev registration (add "wwan" dev_type, add sysfs link to the 'wwan'
> device...).
Be careful with that, I tend to think we made some mistakes in this
area, look at the recent locking things there. We used to do stuff from
a netdev notifier, and that has caused all kinds of pain recently when I
reworked the locking to not be so overly dependent on the RTNL all the
time (which really has become the new BKL, at least for desktop work,
sometimes I can't even type in the UI when the RTNL is blocked). So
wwan_register_netdevice() is probably fine, doing netdev notifier I'd
now recommend against.
But in any case, that's just a side thread.
johannes
next prev parent reply other threads:[~2021-05-25 12:55 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 14:01 [PATCH V3 00/16] net: iosm: PCIe Driver for Intel M.2 Modem M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 01/16] net: iosm: entry point M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 02/16] net: iosm: irq handling M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 03/16] net: iosm: mmio scratchpad M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 04/16] net: iosm: shared memory IPC interface M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 05/16] net: iosm: shared memory I/O operations M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 06/16] net: iosm: channel configuration M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 07/16] net: iosm: wwan port control device M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 08/16] net: iosm: bottom half M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 09/16] net: iosm: multiplex IP sessions M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 10/16] net: iosm: encode or decode datagram M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 11/16] net: iosm: power management M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 12/16] net: iosm: shared memory protocol M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 13/16] net: iosm: protocol operations M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 14/16] net: iosm: uevent support M Chetan Kumar
2021-05-20 14:01 ` [PATCH V3 15/16] net: iosm: net driver M Chetan Kumar
2021-05-21 19:55 ` Loic Poulain
2021-05-24 10:36 ` Kumar, M Chetan
2021-05-25 8:24 ` Loic Poulain
2021-05-25 12:55 ` Johannes Berg [this message]
2021-05-25 14:59 ` Loic Poulain
2021-05-27 9:40 ` Johannes Berg
2021-05-27 11:39 ` Loic Poulain
2021-06-01 7:31 ` Johannes Berg
2021-05-20 14:01 ` [PATCH V3 16/16] net: iosm: infrastructure M Chetan Kumar
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=c7d2dd39e82ada5aa4e4d6741865ecb1198959fe.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=bjorn@mork.no \
--cc=dcbw@redhat.com \
--cc=krishna.c.sudi@intel.com \
--cc=kuba@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linuxwwan@intel.com \
--cc=loic.poulain@linaro.org \
--cc=m.chetan.kumar@intel.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