]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
bnxt_en: Implement xmit_more.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 29 May 2017 23:06:09 +0000 (19:06 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 May 2017 22:14:07 +0000 (18:14 -0400)
Do not write the TX doorbell if skb->xmit_more is set unless the TX
queue is full.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index d7c1295c16cfc3273515fb7e01d1587c46ae1e45..2c6af316d2de06261894a9a46707cba70af5a76b 100644 (file)
@@ -463,13 +463,17 @@ normal_tx:
        prod = NEXT_TX(prod);
        txr->tx_prod = prod;
 
-       bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod);
+       if (!skb->xmit_more)
+               bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod);
 
 tx_done:
 
        mmiowb();
 
        if (unlikely(bnxt_tx_avail(bp, txr) <= MAX_SKB_FRAGS + 1)) {
+               if (skb->xmit_more && !tx_buf->is_push)
+                       bnxt_db_write(bp, txr->tx_doorbell, DB_KEY_TX | prod);
+
                netif_tx_stop_queue(txq);
 
                /* netif_tx_stop_queue() must be done before checking