Skip to content

Commit f004f2e

Browse files
Danielmachondavem330
authored andcommitted
net: sparx5: fix FDMA performance issue
The FDMA handler is responsible for scheduling a NAPI poll, which will eventually fetch RX packets from the FDMA queue. Currently, the FDMA handler is run in a threaded context. For some reason, this kills performance. Admittedly, I did not do a thorough investigation to see exactly what causes the issue, however, I noticed that in the other driver utilizing the same FDMA engine, we run the FDMA handler in hard IRQ context. Fix this performance issue, by running the FDMA handler in hard IRQ context, not deferring any work to a thread. Prior to this change, the RX UDP performance was: Interval Transfer Bitrate Jitter 0.00-10.20 sec 44.6 MBytes 36.7 Mbits/sec 0.027 ms After this change, the rx UDP performance is: Interval Transfer Bitrate Jitter 0.00-9.12 sec 1.01 GBytes 953 Mbits/sec 0.020 ms Fixes: 1061590 ("net: sparx5: switchdev: adding frame DMA functionality") Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent aa5fc88 commit f004f2e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/net/ethernet/microchip/sparx5/sparx5_main.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -780,12 +780,11 @@ static int sparx5_start(struct sparx5 *sparx5)
780780
err = -ENXIO;
781781
if (sparx5->fdma_irq >= 0 && is_sparx5(sparx5)) {
782782
if (GCB_CHIP_ID_REV_ID_GET(sparx5->chip_id) > 0)
783-
err = devm_request_threaded_irq(sparx5->dev,
784-
sparx5->fdma_irq,
785-
NULL,
786-
sparx5_fdma_handler,
787-
IRQF_ONESHOT,
788-
"sparx5-fdma", sparx5);
783+
err = devm_request_irq(sparx5->dev,
784+
sparx5->fdma_irq,
785+
sparx5_fdma_handler,
786+
0,
787+
"sparx5-fdma", sparx5);
789788
if (!err)
790789
err = sparx5_fdma_start(sparx5);
791790
if (err)

0 commit comments

Comments
 (0)