diff options
author | Michael Chan <michael.chan@broadcom.com> | 2017-05-30 01:06:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-31 00:14:07 +0200 |
commit | 4d172f21cefe896df8477940269b8d52129f8c87 (patch) | |
tree | 58eee5d89ddd189ad88fbaee4202d3a7b08e4465 /drivers/net/ethernet/broadcom | |
parent | bnxt_en: Optimize doorbell write operations for newer chips. (diff) | |
download | linux-4d172f21cefe896df8477940269b8d52129f8c87.tar.xz linux-4d172f21cefe896df8477940269b8d52129f8c87.zip |
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 <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 |