From 4d172f21cefe896df8477940269b8d52129f8c87 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Mon, 29 May 2017 19:06:09 -0400 Subject: [PATCH] bnxt_en: Implement xmit_more. Do not write the TX doorbell if skb->xmit_more is set unless the TX queue is full. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index d7c1295c16cf..2c6af316d2de 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -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