lkml.org 
[lkml]   [2020]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC,PATCH 2/2] net: stmmac: Change the tx clean lock
Date
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


\
 
 \ /
  Last update: 2020-03-24 10:40    [W:0.109 / U:1.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site