From: Eric Dumazet <eric.dumazet@gmail.com>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-net-drivers@solarflare.com,
Tom Herbert <therbert@google.com>
Subject: Re: [PATCH net-next-2.6 1/2] net: Allow changing number of RX queues after device allocation
Date: Fri, 24 Sep 2010 04:48:25 +0200 [thread overview]
Message-ID: <1285296505.2380.43.camel@edumazet-laptop> (raw)
In-Reply-To: <1285273194.7794.24.camel@achroite.uk.solarflarecom.com>
Le jeudi 23 septembre 2010 à 21:19 +0100, Ben Hutchings a écrit :
> For RPS, we create a kobject for each RX queue based on the number of
> queues passed to alloc_netdev_mq(). However, drivers generally do not
> determine the numbers of hardware queues to use until much later, so
> this usually represents the maximum number the driver may use and not
> the actual number in use.
>
> For TX queues, drivers can update the actual number using
> netif_set_real_num_tx_queues(). Add a corresponding function for RX
> queues, netif_set_real_num_rx_queues().
>
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
> ---
Seems very good to me, except a minor style issue here :
All functions in this file use a single line.
> -static int rx_queue_register_kobjects(struct net_device *net)
> +int
> +net_rx_queue_update_kobjects(struct net_device *net, int old_num, int new_num)
->
int net_rx_queue_update_kobjects(struct net_device *net, int old, int new)
Also, I dont understand why we need to restrict
netif_set_real_num_rx_queues() to lower the count.
This wastes memory.
Why dont we allocate dev->_rx once we know the real count, not in
alloc_netdev_mq() but in register_netdevice() ?
next prev parent reply other threads:[~2010-09-24 2:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-23 20:18 [PATCH net-next-2.6 0/2] net, sfc: Fix number of RX queues Ben Hutchings
2010-09-23 20:19 ` [PATCH net-next-2.6 1/2] net: Allow changing number of RX queues after device allocation Ben Hutchings
2010-09-24 2:48 ` Eric Dumazet [this message]
2010-09-24 3:26 ` [PATCH net-next-2.6] rps: allocate rx queues in register_netdevice only Eric Dumazet
2010-09-24 7:07 ` Eric Dumazet
2010-09-24 15:58 ` Tom Herbert
2010-09-24 8:15 ` John Fastabend
2010-09-24 9:21 ` Eric Dumazet
2010-09-24 16:54 ` John Fastabend
2010-09-27 2:05 ` David Miller
2010-09-24 12:24 ` [PATCH net-next-2.6 1/2] net: Allow changing number of RX queues after device allocation Ben Hutchings
2010-09-24 15:34 ` Tom Herbert
2010-09-23 20:20 ` [PATCH net-next-2.6 2/2] sfc: Use proper functions to set core RX and TX queue counts Ben Hutchings
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=1285296505.2380.43.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=linux-net-drivers@solarflare.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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