Skip to content

Commit

Permalink
vlan: enable multiqueue xmits
Browse files Browse the repository at this point in the history
vlan_dev_hard_start_xmit() & vlan_dev_hwaccel_hard_start_xmit()
select txqueue number 0, instead of using index provided by
skb_get_queue_mapping().

This is not correct after commit 2e59af3
[vlan: multiqueue vlan device] because
txq->tx_packets  & txq->tx_bytes changes are performed on
a single location, and not the right locking.

Fix is to take the appropriate struct netdev_queue pointer

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 3, 2009
1 parent d1b19df commit 2f8bc32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ static int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
int i = skb_get_queue_mapping(skb);
struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
struct vlan_ethhdr *veth = (struct vlan_ethhdr *)(skb->data);

/* Handle non-VLAN frames if they are sent to us, for example by DHCP.
Expand Down Expand Up @@ -329,7 +330,8 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
int i = skb_get_queue_mapping(skb);
struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
u16 vlan_tci;

vlan_tci = vlan_dev_info(dev)->vlan_id;
Expand Down

0 comments on commit 2f8bc32

Please sign in to comment.