net: dynamic ingress_queue allocation

ingress being not used very much, and net_device->ingress_queue being
quite a big object (128 or 256 bytes), use a dynamic allocation if
needed (tc qdisc add dev eth0 ingress ...)

dev_ingress_queue(dev) helper should be used only with RTNL taken.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2010-10-02 06:11:55 +00:00 committed by David S. Miller
parent 0bd9e6a964
commit 24824a09e3
5 changed files with 71 additions and 27 deletions

View file

@ -986,7 +986,7 @@ struct net_device {
rx_handler_func_t *rx_handler;
void *rx_handler_data;
struct netdev_queue ingress_queue; /* use two cache lines */
struct netdev_queue __rcu *ingress_queue;
/*
* Cache lines mostly used on transmit path