From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [RFC PATCH 2/3] veth: make queues nr configurable via kernel module params
Date: Fri, 09 Jul 2021 12:24:48 +0200 [thread overview]
Message-ID: <875yxjvl73.fsf@toke.dk> (raw)
In-Reply-To: <480e7a960c26c9ab84efe59ed706f1a1a459d38c.1625823139.git.pabeni@redhat.com>
Paolo Abeni <pabeni@redhat.com> writes:
> This allows configuring the number of tx and rx queues at
> module load time. A single module parameter controls
> both the default number of RX and TX queues created
> at device registration time.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> drivers/net/veth.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index 10360228a06a..787b4ad2cc87 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -27,6 +27,11 @@
> #include <linux/bpf_trace.h>
> #include <linux/net_tstamp.h>
>
> +static int queues_nr = 1;
> +
> +module_param(queues_nr, int, 0644);
> +MODULE_PARM_DESC(queues_nr, "Max number of RX and TX queues (default = 1)");
Adding new module parameters is generally discouraged. Also, it's sort
of a cumbersome API that you'll have to set this first, then re-create
the device, and then use channels to get the number you want.
So why not just default to allocating num_possible_cpus() number of
queues? Arguably that is the value that makes the most sense from a
scalability point of view anyway, but if we're concerned about behaviour
change (are we?), we could just default real_num_*_queues to 1, so that
the extra queues have to be explicitly enabled by ethtool?
-Toke
next prev parent reply other threads:[~2021-07-09 10:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-09 9:39 [RFC PATCH 0/3] veth: more flexible channels number configuration Paolo Abeni
2021-07-09 9:39 ` [RFC PATCH 1/3] veth: implement support for set_channel ethtool op Paolo Abeni
2021-07-09 10:15 ` Toke Høiland-Jørgensen
2021-07-09 10:49 ` Paolo Abeni
2021-07-09 11:36 ` Toke Høiland-Jørgensen
2021-07-09 14:38 ` Paolo Abeni
2021-07-09 15:23 ` Toke Høiland-Jørgensen
2021-07-09 16:35 ` Paolo Abeni
2021-07-09 19:56 ` Jakub Kicinski
2021-07-09 19:54 ` Jakub Kicinski
2021-07-12 1:44 ` David Ahern
2021-07-12 10:45 ` Paolo Abeni
2021-07-12 15:23 ` Jakub Kicinski
2021-07-10 8:43 ` kernel test robot
2021-07-09 9:39 ` [RFC PATCH 2/3] veth: make queues nr configurable via kernel module params Paolo Abeni
2021-07-09 10:24 ` Toke Høiland-Jørgensen [this message]
2021-07-09 15:33 ` Paolo Abeni
2021-07-09 16:12 ` Toke Høiland-Jørgensen
2021-07-09 14:25 ` kernel test robot
2021-07-09 16:59 ` kernel test robot
2021-07-10 17:52 ` kernel test robot
2021-07-10 17:52 ` [RFC PATCH] veth: veth_get_num_tx_queues() can be static kernel test robot
2021-07-09 9:39 ` [RFC PATCH 3/3] selftests: net: veth: add tests for set_channel Paolo Abeni
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=875yxjvl73.fsf@toke.dk \
--to=toke@redhat.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.