ibmvnic: fix accelerated VLAN handling
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Wed, 7 Nov 2018 16:50:52 +0000 (17:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Nov 2018 06:36:21 +0000 (22:36 -0800)
Don't request tag insertion when it isn't present in outgoing skb.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index 7893bef..c9d5d0a 100644 (file)
@@ -1545,7 +1545,7 @@ static netdev_tx_t ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
        tx_crq.v1.sge_len = cpu_to_be32(skb->len);
        tx_crq.v1.ioba = cpu_to_be64(data_dma_addr);
 
-       if (adapter->vlan_header_insertion) {
+       if (adapter->vlan_header_insertion && skb_vlan_tag_present(skb)) {
                tx_crq.v1.flags2 |= IBMVNIC_TX_VLAN_INSERT;
                tx_crq.v1.vlan_id = cpu_to_be16(skb->vlan_tci);
        }