summaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-09-02 18:03:00 -0700
committerDavid S. Miller <davem@davemloft.net>2009-09-02 18:03:00 -0700
commit2e59af3dcbdf11635c03f22bfc9706744465d589 (patch)
treec01e87c0ef6568bae987f4628a8656ba0d05aa23 /net/8021q/vlan.c
parent5848cc096a23b80b3d15c27d72299f79caf7c517 (diff)
downloadlinux-2e59af3dcbdf11635c03f22bfc9706744465d589.tar.gz
linux-2e59af3dcbdf11635c03f22bfc9706744465d589.tar.bz2
linux-2e59af3dcbdf11635c03f22bfc9706744465d589.zip
vlan: multiqueue vlan device
vlan devices are currently not multi-queue capable. We can do that with a new rtnl_link_ops method, get_tx_queues(), called from rtnl_create_link() This new method gets num_tx_queues/real_num_tx_queues from real device. register_vlan_device() is also handled. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan.c')
-rw-r--r--net/8021q/vlan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index e814794b0a1a..8836575f9d79 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -330,12 +330,13 @@ static int register_vlan_device(struct net_device *real_dev, u16 vlan_id)
snprintf(name, IFNAMSIZ, "vlan%.4i", vlan_id);
}
- new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name,
- vlan_setup);
+ new_dev = alloc_netdev_mq(sizeof(struct vlan_dev_info), name,
+ vlan_setup, real_dev->num_tx_queues);
if (new_dev == NULL)
return -ENOBUFS;
+ new_dev->real_num_tx_queues = real_dev->real_num_tx_queues;
dev_net_set(new_dev, net);
/* need 4 bytes for extra VLAN header info,
* hope the underlying device can handle it.