54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
From cc6820376ccbacfcf7a495b3d6817c1c7e916f3e Mon Sep 17 00:00:00 2001
|
|
From: Frank Wunderlich <[email protected]>
|
|
Date: Fri, 7 Mar 2025 13:14:20 +0100
|
|
Subject: [PATCH 82/84] net: mediatek: mtk_eth_soc: enable lro stats from
|
|
debugfs
|
|
|
|
echo 4 1 > /proc/mtketh/hw_lro_auto_tlb #enable rings
|
|
echo 5 1 > /proc/mtketh/hw_lro_auto_tlb #enable statistics
|
|
cat /proc/mtketh/hw_lro_stats
|
|
|
|
had to disable CONFIG_STRICT_DEVMEM for register values
|
|
|
|
root@bpi-r4-v11:~
|
|
busybox devmem 0x15106C54 #LRO2_RING1_DIP_DW0 Destination IP address
|
|
0xC0A80101 #192.168.1.1
|
|
root@bpi-r4-v11:~
|
|
busybox devmem 0x15106C58 #LRO2_RING1_DIP_DW1 Destination IP address
|
|
0x00000000
|
|
root@bpi-r4-v11:~
|
|
busybox devmem 0x15106C5C #LRO2_RING1_DIP_DW2 Destination IP address
|
|
0x00000000
|
|
root@bpi-r4-v11:~
|
|
busybox devmem 0x15106C60 LRO2_RING1_DIP_DW3 Destination IP address
|
|
0x00000000
|
|
root@bpi-r4-v11:~
|
|
busybox devmem 0x15106c7c
|
|
0x00002BC0
|
|
=LRO2_RING1_CTRL_DW2 LRO2_MAX_AGGREGATED_CNT_L = 0x00002BC0 (bit8 = 1 and bit9 = 1)
|
|
means that both DIP and flow information have been enabled.
|
|
---
|
|
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
index 84ab560a1b80..a500ac80e715 100644
|
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
@@ -2393,6 +2393,12 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
|
|
if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
|
|
mtk_ppe_check_skb(eth->ppe[ppe_idx], skb, hash);
|
|
|
|
+ if (eth->hwlro && mtk_hwlro_stats_ebl &&
|
|
+ IS_HW_LRO_RING(ring->ring_no)) {
|
|
+ hw_lro_stats_update(ring->ring_no, &trxd);
|
|
+ hw_lro_flush_stats_update(ring->ring_no, &trxd);
|
|
+ }
|
|
+
|
|
skb_record_rx_queue(skb, 0);
|
|
napi_gro_receive(napi, skb);
|
|
|
|
--
|
|
2.30.2
|
|
|