openwrt/target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch
Christian Marangi 9309cfe37a
kernel/ipq40xx: Create kernel files for v6.6 (from v6.1)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-04-02 23:45:18 +02:00

50 lines
1.6 KiB
Diff

From 9fa4a57a65e270e4d579cace4de5c438f46c7d12 Mon Sep 17 00:00:00 2001
From: Robert Marko <robimarko@gmail.com>
Date: Tue, 15 Aug 2023 14:38:44 +0200
Subject: [PATCH] net: qualcomm: ipqess: enable threaded NAPI by default
Threaded NAPI provides a nice performance boost, so lets enable it by
default.
We do however need to move the __napi_schedule() after HW IRQ has been
cleared in order to avoid concurency issues.
Signed-off-by: Robert Marko <robimarko@gmail.com>
---
drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
+++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
@@ -530,9 +530,9 @@ static irqreturn_t ipqess_interrupt_tx(i
struct ipqess_tx_ring *tx_ring = (struct ipqess_tx_ring *)priv;
if (likely(napi_schedule_prep(&tx_ring->napi_tx))) {
- __napi_schedule(&tx_ring->napi_tx);
ipqess_w32(tx_ring->ess, IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx),
0x0);
+ __napi_schedule(&tx_ring->napi_tx);
}
return IRQ_HANDLED;
@@ -543,9 +543,9 @@ static irqreturn_t ipqess_interrupt_rx(i
struct ipqess_rx_ring *rx_ring = (struct ipqess_rx_ring *)priv;
if (likely(napi_schedule_prep(&rx_ring->napi_rx))) {
- __napi_schedule(&rx_ring->napi_rx);
ipqess_w32(rx_ring->ess, IPQESS_REG_RX_INT_MASK_Q(rx_ring->idx),
0x0);
+ __napi_schedule(&rx_ring->napi_rx);
}
return IRQ_HANDLED;
@@ -1261,6 +1261,8 @@ static int ipqess_axi_probe(struct platf
if (err)
goto err_notifier_unregister;
+ dev_set_threaded(netdev, true);
+
return 0;
err_notifier_unregister: