netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kumar, M Chetan" <m.chetan.kumar@intel.com>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: "Network Development" <netdev@vger.kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"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: Mon, 24 May 2021 10:36:46 +0000	[thread overview]
Message-ID: <90f93c17164a4d8299d17a02b1f15bfa@intel.com> (raw)
In-Reply-To: <CAMZdPi-Xs00vMq-im_wHnNE5XkhXU1-mOgrNbGnExPbHYAL-rw@mail.gmail.com>

Hi Loic,

> > +static void ipc_netdev_setup(struct net_device *dev) {}
> > +
> > +struct iosm_wwan *ipc_wwan_init(struct iosm_imem *ipc_imem, struct
> > +device *dev) {
> > +       static const struct net_device_ops iosm_wwandev_ops = {};
> > +       struct iosm_wwan *ipc_wwan;
> > +       struct net_device *netdev;
> > +
> > +       netdev = alloc_netdev(sizeof(*ipc_wwan), "wwan%d",
> NET_NAME_ENUM,
> > +                             ipc_netdev_setup);
> > +
> > +       if (!netdev)
> > +               return NULL;
> > +
> > +       ipc_wwan = netdev_priv(netdev);
> > +
> > +       ipc_wwan->dev = dev;
> > +       ipc_wwan->netdev = netdev;
> > +       ipc_wwan->is_registered = false;
> > +
> > +       ipc_wwan->ipc_imem = ipc_imem;
> > +
> > +       mutex_init(&ipc_wwan->if_mutex);
> > +
> > +       /* allocate random ethernet address */
> > +       eth_random_addr(netdev->dev_addr);
> > +       netdev->addr_assign_type = NET_ADDR_RANDOM;
> > +
> > +       netdev->netdev_ops = &iosm_wwandev_ops;
> > +       netdev->flags |= IFF_NOARP;
> > +
> > +       SET_NETDEV_DEVTYPE(netdev, &wwan_type);
> > +
> > +       if (register_netdev(netdev)) {
> > +               dev_err(ipc_wwan->dev, "register_netdev failed");
> > +               goto reg_fail;
> > +       }
> 
> So you register a no-op netdev which is only used to represent the modem
> instance, and to be referenced for link creation over IOSM rtnetlinks?

That’s correct driver creates wwan0 (no-op netdev) to represent the
modem instance and is referenced for link creation over IOSM rtnetlinks.

> The new WWAN framework creates a logical WWAN device instance (e.g;
> /sys/class/wwan0), I think it would make sense to use its index as parameter
> when creating the new links, instead of relying on this dummy netdev. Note
> that for now the wwan_device is private to wwan_core and created implicitly
> on the WWAN control port registration.

In order to use WWAN device instance any additional changes required inside
wwan_core ?  Or simply passing /sys/class/wwan0 device to ip link add is enough.

Can you please share us more details on wwan_core changes(if any)/how we should
use /sys/class/wwan0 for link creation ?

> Moreover I wonder if it could also be possible to create a generic WWAN link
> type instead of creating yet-another hw specific one, that could benefit
> future WWAN drivers, and simplify user side integration, with a common
> interface to create links and multiplex PDN (a bit like wlan vif).

Common interface could benefit both wwan drivers and user side integration. 
WWAN framework generalizes WWAN device control port, would it also consider
WWAN netdev part ? Is there a plan to support such implementation inside
wwan_core.

Regards,
Chetan

  reply	other threads:[~2021-05-24 10:36 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 [this message]
2021-05-25  8:24       ` Loic Poulain
2021-05-25 12:55         ` Johannes Berg
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=90f93c17164a4d8299d17a02b1f15bfa@intel.com \
    --to=m.chetan.kumar@intel.com \
    --cc=bjorn@mork.no \
    --cc=dcbw@redhat.com \
    --cc=johannes@sipsolutions.net \
    --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=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).