lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 Sep 2010 04:48:25 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Ben Hutchings <bhutchings@...arflare.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	linux-net-drivers@...arflare.com, Tom Herbert <therbert@...gle.com>
Subject: Re: [PATCH net-next-2.6 1/2] net: Allow changing number of RX
 queues after device allocation

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@...arflare.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() ?



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ