]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/mlx4_en: Don't use vlan tag value as an indication for vlan presence
authorMoni Shoua <monis@mellanox.co.il>
Thu, 25 Oct 2012 01:12:48 +0000 (01:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Oct 2012 07:34:15 +0000 (03:34 -0400)
The vlan tag can be zero. This is why it can't serve as an indication
that packet requires VLAN header in the TX flow.

Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c

index 0a51095fd8d6db76fed09d138e05d12ff1c68ddc..b35094c590ba94206be751643a7ad3a17cab9b7f 100644 (file)
@@ -711,7 +711,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
        if (bounce)
                tx_desc = mlx4_en_bounce_to_desc(priv, ring, index, desc_size);
 
-       if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tag) {
+       if (ring->bf_enabled && desc_size <= MAX_BF && !bounce && !vlan_tx_tag_present(skb)) {
                *(__be32 *) (&tx_desc->ctrl.vlan_tag) |= cpu_to_be32(ring->doorbell_qpn);
                op_own |= htonl((bf_index & 0xffff) << 8);
                /* Ensure new descirptor hits memory