mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sieng Piaw Liew <liew.s.piaw@gmail.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com,
	Sieng Piaw Liew <liew.s.piaw@gmail.com>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net-next v2 3/6] bcm63xx_enet: add xmit_more support
Date: Thu, 24 Dec 2020 22:24:18 +0800	[thread overview]
Message-ID: <20201224142421.32350-4-liew.s.piaw@gmail.com> (raw)
In-Reply-To: <20201224142421.32350-1-liew.s.piaw@gmail.com>

Support bulking hardware TX queue by using netdev_xmit_more().

Signed-off-by: Sieng Piaw Liew <liew.s.piaw@gmail.com>
---
 drivers/net/ethernet/broadcom/bcm63xx_enet.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 90f8214b4d22..452968f168ed 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -633,14 +633,17 @@ bcm_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	netdev_sent_queue(dev, skb->len);
 
-	/* kick tx dma */
-	enet_dmac_writel(priv, priv->dma_chan_en_mask,
-				 ENETDMAC_CHANCFG, priv->tx_chan);
-
 	/* stop queue if no more desc available */
 	if (!priv->tx_desc_count)
 		netif_stop_queue(dev);
 
+	/* kick tx dma */
+        if (!netdev_xmit_more() || !priv->tx_desc_count)
+                enet_dmac_writel(priv, priv->dma_chan_en_mask,
+                                 ENETDMAC_CHANCFG, priv->tx_chan);
+
+
+
 	dev->stats.tx_bytes += skb->len;
 	dev->stats.tx_packets++;
 	ret = NETDEV_TX_OK;
-- 
2.17.1


  parent reply	other threads:[~2020-12-24 14:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-24 14:24 [PATCH net-next v2 0/6] bcm63xx_enet: major makeover of driver Sieng Piaw Liew
2020-12-24 14:24 ` [PATCH net-next v2 1/6] bcm63xx_enet: batch process rx path Sieng Piaw Liew
2020-12-29  3:11   ` Florian Fainelli
2020-12-24 14:24 ` [PATCH net-next v2 2/6] bcm63xx_enet: add BQL support Sieng Piaw Liew
2020-12-29  3:12   ` Florian Fainelli
2020-12-24 14:24 ` Sieng Piaw Liew [this message]
2020-12-28 20:40   ` [PATCH net-next v2 3/6] bcm63xx_enet: add xmit_more support Jakub Kicinski
2020-12-29  3:13   ` Florian Fainelli
2020-12-24 14:24 ` [PATCH net-next v2 4/6] bcm63xx_enet: alloc rx skb with NET_IP_ALIGN Sieng Piaw Liew
2020-12-29  3:14   ` Florian Fainelli
2020-12-24 14:24 ` [PATCH net-next v2 5/6] bcm63xx_enet: convert to build_skb Sieng Piaw Liew
2020-12-29  3:24   ` Florian Fainelli
2020-12-24 14:24 ` [PATCH net-next v2 6/6] bcm63xx_enet: improve rx loop Sieng Piaw Liew
2020-12-29  3:17   ` Florian Fainelli
2020-12-28 20:39 ` [PATCH net-next v2 0/6] bcm63xx_enet: major makeover of driver Jakub Kicinski

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=20201224142421.32350-4-liew.s.piaw@gmail.com \
    --to=liew.s.piaw@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®