* [PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets
@ 2021-02-26 13:20 Rafał Miłecki
2021-02-27 16:38 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Rafał Miłecki @ 2021-02-26 13:20 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski
Cc: netdev, Florian Fainelli, bcm-kernel-feedback-list,
Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
When receiving a lot of packets hardware may run out of free
descriptiors and stop RX ring. Enable it every time after handling
received packets.
Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
drivers/net/ethernet/broadcom/bcm4908_enet.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/bcm4908_enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
index 0b70e9e0ddad..98cf82dea3e4 100644
--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
@@ -592,6 +592,9 @@ static int bcm4908_enet_poll(struct napi_struct *napi, int weight)
bcm4908_enet_intrs_on(enet);
}
+ /* Hardware could disable ring if it run out of descriptors */
+ bcm4908_enet_dma_rx_ring_enable(enet, &enet->rx_ring);
+
return handled;
}
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets
2021-02-26 13:20 [PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets Rafał Miłecki
@ 2021-02-27 16:38 ` Florian Fainelli
2021-02-28 19:54 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2021-02-27 16:38 UTC (permalink / raw)
To: Rafał Miłecki, David S . Miller, Jakub Kicinski
Cc: netdev, Florian Fainelli, bcm-kernel-feedback-list,
Rafał Miłecki
On 2/26/2021 5:20 AM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> When receiving a lot of packets hardware may run out of free
> descriptiors and stop RX ring. Enable it every time after handling
> received packets.
>
> Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets
2021-02-27 16:38 ` Florian Fainelli
@ 2021-02-28 19:54 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-02-28 19:54 UTC (permalink / raw)
To: Florian Fainelli, Rafał Miłecki
Cc: David S . Miller, netdev, bcm-kernel-feedback-list,
Rafał Miłecki
On Sat, 27 Feb 2021 08:38:24 -0800 Florian Fainelli wrote:
> On 2/26/2021 5:20 AM, Rafał Miłecki wrote:
> > From: Rafał Miłecki <rafal@milecki.pl>
> >
> > When receiving a lot of packets hardware may run out of free
> > descriptiors and stop RX ring. Enable it every time after handling
> > received packets.
> >
> > Fixes: 4feffeadbcb2 ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
> > Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Applied, thanks!
Out of curiosity - is the performance not impacted by this change?
bcm4908_enet_dma_rx_ring_enable() does an RMW, the read could possibly
removed by caching the expected value.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-28 19:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 13:20 [PATCH net] net: broadcom: bcm4908_enet: enable RX after processing packets Rafał Miłecki
2021-02-27 16:38 ` Florian Fainelli
2021-02-28 19:54 ` Jakub Kicinski
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).