1
1
openwrt/target/linux/airoha/patches-6.12/920-15-net-airoha-fix-wrong-airoha_get_fe_port.patch
Lorenzo Bianconi d22ceb8d24
airoha: Improve LRO performances
Add hardware TCP Large Receive Offload (LRO) support to the airoha_eth
driver, leveraging the EN7581/AN7583 SoC's 8 dedicated LRO hardware queues
mapped to RX queues 24–31. LRO hw offloading does not support
Scatter-Gather (SG) so it is required to increase the page_pool allocation
order to 2 for RX queues 24–31 (LRO queues).

Performance comparison between GRO and hw LRO has been carried out using
a 10Gbps NIC:

GRO: ~2.7 Gbps
LRO: ~8.1 Gbps

Tested-by: Madhur Agrawal <madhur.agrawal@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://github.com/openwrt/openwrt/pull/23530
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2026-05-27 09:17:12 +02:00

41 lines
1.4 KiB
Diff

From 1e596dac503da44a9fcd3e2654a4963db3e2ee6a Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Wed, 28 Jan 2026 02:38:24 +0100
Subject: [PATCH] net: airoha: fix wrong airoha_get_fe_port()
It seems the SDK where the airoha_get_fe_port() logic was taken was
actually wrong and the AN7583 SoC doesn't have such difference. Instead
it does follow the same port order of AN7581 SoC.
Drop the switch case and apply the same condition on both AN7581 and
AN7583 SoC.
Fixes: e4e5ce823bdd ("net: airoha: Add AN7583 SoC support")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/net/ethernet/airoha/airoha_eth.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
--- a/drivers/net/ethernet/airoha/airoha_eth.c
+++ b/drivers/net/ethernet/airoha/airoha_eth.c
@@ -2362,17 +2362,9 @@ static u32 airoha_get_dsa_tag(struct sk_
int airoha_get_fe_port(struct airoha_gdm_dev *dev)
{
struct airoha_gdm_port *port = dev->port;
- struct airoha_eth *eth = dev->eth;
- switch (eth->soc->version) {
- case 0x7583:
- return port->id == AIROHA_GDM3_IDX ? FE_PSE_PORT_GDM3
- : port->id;
- case 0x7581:
- default:
- return port->id == AIROHA_GDM4_IDX ? FE_PSE_PORT_GDM4
- : port->id;
- }
+ return port->id == AIROHA_GDM4_IDX ? FE_PSE_PORT_GDM4
+ : port->id;
}
static int airoha_dev_set_features(struct net_device *netdev,