net: avoid one atomic operation in skb_clone()
[firefly-linux-kernel-4.4.55.git] / net / core / netpoll.c
index 907fb5e36c02e54794734abe4dc1225bf9af9c7d..e6645b4f330af1d16607ca0d6d9c9c95fd163dc6 100644 (file)
@@ -72,7 +72,6 @@ module_param(carrier_timeout, uint, 0644);
 static int netpoll_start_xmit(struct sk_buff *skb, struct net_device *dev,
                              struct netdev_queue *txq)
 {
-       const struct net_device_ops *ops = dev->netdev_ops;
        int status = NETDEV_TX_OK;
        netdev_features_t features;
 
@@ -92,9 +91,7 @@ static int netpoll_start_xmit(struct sk_buff *skb, struct net_device *dev,
                skb->vlan_tci = 0;
        }
 
-       status = ops->ndo_start_xmit(skb, dev);
-       if (status == NETDEV_TX_OK)
-               txq_trans_update(txq);
+       status = netdev_start_xmit(skb, dev, txq, false);
 
 out:
        return status;
@@ -116,7 +113,7 @@ static void queue_process(struct work_struct *work)
                        continue;
                }
 
-               txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
+               txq = skb_get_tx_queue(dev, skb);
 
                local_irq_save(flags);
                HARD_TX_LOCK(dev, txq, smp_processor_id());