From: David Wu <david.wu@rock-chips.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, joabreu@synopsys.com,
alexandre.torgue@st.com, peppe.cavallaro@st.com,
linux-kernel@vger.kernel.org, David Wu <david.wu@rock-chips.com>
Subject: [RFC,PATCH 2/2] net: stmmac: Change the tx clean lock
Date: Tue, 24 Mar 2020 17:38:28 +0800 [thread overview]
Message-ID: <20200324093828.30019-2-david.wu@rock-chips.com> (raw)
In-Reply-To: <20200324093828.30019-1-david.wu@rock-chips.com>
At tx clean, use a frozen queue instead of blocking
the current queue, could still queue skb, which improve
performance.
Signed-off-by: David Wu <david.wu@rock-chips.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index cb7a5bad4cfe..946058bcc9ed 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1897,7 +1897,7 @@ static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue)
unsigned int bytes_compl = 0, pkts_compl = 0;
unsigned int entry, count = 0;
- __netif_tx_lock_bh(netdev_get_tx_queue(priv->dev, queue));
+ netif_tx_lock_q(netdev_get_tx_queue(priv->dev, queue));
priv->xstats.tx_clean++;
@@ -1994,7 +1994,7 @@ static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue)
if (tx_q->dirty_tx != tx_q->cur_tx)
mod_timer(&tx_q->txtimer, STMMAC_COAL_TIMER(priv->tx_coal_timer));
- __netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue));
+ netif_tx_unlock_q(netdev_get_tx_queue(priv->dev, queue));
return count;
}
--
2.19.1
next prev parent reply other threads:[~2020-03-24 9:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 9:38 [RFC,PATCH 1/2] netdevice: Add netif_tx_lock_q David Wu
2020-03-24 9:38 ` David Wu [this message]
2020-04-13 14:31 ` [RFC,PATCH 2/2] net: stmmac: Change the tx clean lock Jose Abreu
2020-04-16 10:46 ` David Wu
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=20200324093828.30019-2-david.wu@rock-chips.com \
--to=david.wu@rock-chips.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
/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®