From: Michael Chan <michael.chan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 6/7] bnxt_en: Implement xmit_more.
Date: Mon, 29 May 2017 19:06:09 -0400 [thread overview]
Message-ID: <1496099170-701-7-git-send-email-michael.chan@broadcom.com> (raw)
In-Reply-To: <1496099170-701-1-git-send-email-michael.chan@broadcom.com>
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>
---
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 d7c1295..2c6af31 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -463,13 +463,17 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
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
--
1.8.3.1
next prev parent reply other threads:[~2017-05-29 23:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 23:06 [PATCH net-next 0/7] bnxt_en: Misc. updates for net-next Michael Chan
2017-05-29 23:06 ` [PATCH net-next 1/7] bnxt_en: Support for Short Firmware Message Michael Chan
2017-05-29 23:06 ` [PATCH net-next 2/7] bnxt_en: Add PCI IDs for BCM57454 VF devices Michael Chan
2017-05-29 23:06 ` [PATCH net-next 3/7] bnxt_en: Add a callback to inform RDMA driver during PCI shutdown Michael Chan
2017-05-29 23:06 ` [PATCH net-next 4/7] bnxt_en: Add additional chip ID definitions Michael Chan
2017-05-29 23:06 ` [PATCH net-next 5/7] bnxt_en: Optimize doorbell write operations for newer chips Michael Chan
2017-05-29 23:06 ` Michael Chan [this message]
2017-05-30 3:28 ` [PATCH net-next 6/7] bnxt_en: Implement xmit_more Mintz, Yuval
2017-05-30 3:49 ` Michael Chan
2017-05-29 23:06 ` [PATCH net-next 7/7] bnxt_en: Pass in sh parameter to bnxt_set_dflt_rings() Michael Chan
2017-05-30 3:24 ` [PATCH net-next 0/7] bnxt_en: Misc. updates for net-next David Miller
2017-05-30 3:45 ` Michael Chan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1496099170-701-7-git-send-email-michael.chan@broadcom.com \
--to=michael.chan@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).