* [PATCH net] net: mvpp2: fix pkt coalescing int-threshold configuration
@ 2020-12-23 18:35 stefanc
2020-12-28 22:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: stefanc @ 2020-12-23 18:35 UTC (permalink / raw)
To: netdev
Cc: thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel, stefanc,
kuba, linux, mw, andrew, rmk+kernel, atenart
From: Stefan Chulski <stefanc@marvell.com>
The packet coalescing interrupt threshold has separated registers
for different aggregated/cpu (sw-thread). The required value should
be loaded for every thread but not only for 1 current cpu.
Fixes: 213f428f5056 ("net: mvpp2: add support for TX interrupts and RX queue distribution modes")
Signed-off-by: Stefan Chulski <stefanc@marvell.com>
---
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 87068eb..3982956 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -2370,17 +2370,18 @@ static void mvpp2_rx_pkts_coal_set(struct mvpp2_port *port,
static void mvpp2_tx_pkts_coal_set(struct mvpp2_port *port,
struct mvpp2_tx_queue *txq)
{
- unsigned int thread = mvpp2_cpu_to_thread(port->priv, get_cpu());
+ unsigned int thread;
u32 val;
if (txq->done_pkts_coal > MVPP2_TXQ_THRESH_MASK)
txq->done_pkts_coal = MVPP2_TXQ_THRESH_MASK;
val = (txq->done_pkts_coal << MVPP2_TXQ_THRESH_OFFSET);
- mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id);
- mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_THRESH_REG, val);
-
- put_cpu();
+ /* PKT-coalescing registers are per-queue + per-thread */
+ for (thread = 0; thread < MVPP2_MAX_THREADS; thread++) {
+ mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_NUM_REG, txq->id);
+ mvpp2_thread_write(port->priv, thread, MVPP2_TXQ_THRESH_REG, val);
+ }
}
static u32 mvpp2_usec_to_cycles(u32 usec, unsigned long clk_hz)
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: mvpp2: fix pkt coalescing int-threshold configuration
2020-12-23 18:35 [PATCH net] net: mvpp2: fix pkt coalescing int-threshold configuration stefanc
@ 2020-12-28 22:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2020-12-28 22:40 UTC (permalink / raw)
To: Stefan Chulski
Cc: netdev, thomas.petazzoni, davem, nadavh, ymarkman, linux-kernel,
kuba, linux, mw, andrew, rmk+kernel, atenart
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Wed, 23 Dec 2020 20:35:21 +0200 you wrote:
> From: Stefan Chulski <stefanc@marvell.com>
>
> The packet coalescing interrupt threshold has separated registers
> for different aggregated/cpu (sw-thread). The required value should
> be loaded for every thread but not only for 1 current cpu.
>
> Fixes: 213f428f5056 ("net: mvpp2: add support for TX interrupts and RX queue distribution modes")
> Signed-off-by: Stefan Chulski <stefanc@marvell.com>
>
> [...]
Here is the summary with links:
- [net] net: mvpp2: fix pkt coalescing int-threshold configuration
https://git.kernel.org/netdev/net/c/4f374d2c43a9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-28 23:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-23 18:35 [PATCH net] net: mvpp2: fix pkt coalescing int-threshold configuration stefanc
2020-12-28 22:40 ` patchwork-bot+netdevbpf
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).