From: Jakub Kicinski <kuba@kernel.org>
To: <xiayu.zhang@mediatek.com>
Cc: <loic.poulain@linaro.org>, <ryazanov.s.a@gmail.com>,
<davem@davemloft.net>, <johannes@sipsolutions.net>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<haijun.liu@mediatek.com>, <zhaoping.shu@mediatek.com>,
<hw.he@mediatek.com>, <srv_heupstream@mediatek.com>
Subject: Re: [PATCH] Add Multiple TX/RX Queues Support for WWAN Network Device
Date: Wed, 8 Dec 2021 17:53:31 -0800 [thread overview]
Message-ID: <20211208175331.35661ccd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <20211208040414.151960-1-xiayu.zhang@mediatek.com>
On Wed, 8 Dec 2021 12:04:14 +0800 xiayu.zhang@mediatek.com wrote:
> From: Xiayu Zhang <Xiayu.Zhang@mediatek.com>
>
> This patch adds 2 callback functions get_num_tx_queues() and
> get_num_rx_queues() to let WWAN network device driver customize its own
> TX and RX queue numbers. It gives WWAN driver a chance to implement its
> own software strategies, such as TX Qos.
>
> Currently, if WWAN device driver creates default bearer interface when
> calling wwan_register_ops(), there will be only 1 TX queue and 1 RX queue
> for the WWAN network device. In this case, driver is not able to enlarge
> the queue numbers by calling netif_set_real_num_tx_queues() or
> netif_set_real_num_rx_queues() to take advantage of the network device's
> capability of supporting multiple TX/RX queues.
>
> As for additional interfaces of secondary bearers, if userspace service
> doesn't specify the num_tx_queues or num_rx_queues in netlink message or
> iproute2 command, there also will be only 1 TX queue and 1 RX queue for
> each additional interface. If userspace service specifies the num_tx_queues
> and num_rx_queues, however, these numbers could be not able to match the
> capabilities of network device.
>
> Besides, userspace service is hard to learn every WWAN network device's
> TX/RX queue numbers.
>
> In order to let WWAN driver determine the queue numbers, this patch adds
> below callback functions in wwan_ops:
> struct wwan_ops {
> unsigned int priv_size;
> ...
> unsigned int (*get_num_tx_queues)(unsigned int hint_num);
> unsigned int (*get_num_rx_queues)(unsigned int hint_num);
> };
>
> WWAN subsystem uses the input parameters num_tx_queues and num_rx_queues of
> wwan_rtnl_alloc() as hint values, and passes the 2 values to the two
> callback functions. WWAN device driver should determine the actual numbers
> of network device's TX and RX queues according to the hint value and
> device's capabilities.
I'll mark it as an RFC in patchwork, there needs to be an in-tree user
for this code to be merged.
next prev parent reply other threads:[~2021-12-09 1:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 4:04 [PATCH] Add Multiple TX/RX Queues Support for WWAN Network Device xiayu.zhang
2021-12-09 1:53 ` Jakub Kicinski [this message]
2021-12-09 23:11 ` Sergey Ryazanov
2021-12-13 6:06 ` Xiayu Zhang
2021-12-15 0:23 ` Sergey Ryazanov
2021-12-15 8:44 ` Xiayu Zhang
2021-12-15 9:29 ` Loic Poulain
2021-12-15 14:16 ` Sergey Ryazanov
2021-12-16 12:13 ` Xiayu Zhang
2021-12-16 12:39 ` Sergey Ryazanov
2021-12-17 8:05 ` Xiayu Zhang
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=20211208175331.35661ccd@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=haijun.liu@mediatek.com \
--cc=hw.he@mediatek.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=ryazanov.s.a@gmail.com \
--cc=srv_heupstream@mediatek.com \
--cc=xiayu.zhang@mediatek.com \
--cc=zhaoping.shu@mediatek.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;
as well as URLs for NNTP newsgroup(s).