Current state of wireless hardware NAT in mt76 driver?

Hardware NAT for LAN ports works fine on my XDR6088. However, when doing the same speed test on my iPhone using AX wifi, top reports 10% utilization in sys by the napi/mtk_eth-6 . So, I guess mt76 does not support wireless hardware NAT currently?

NFTable Rules:

table ip main {
	flowtable ft {
		hook ingress priority filter
		devices = { eth0, eth1, lan1, lan2, lan3, lan4, lan5, phy0-ap0, phy1-ap0, phy1-ap0.sta1 }
		flags offload
	}

	chain postrouting {
		type nat hook postrouting priority srcnat; policy accept;
		oif "eth1" masquerade
	}

	chain forward {
		type filter hook forward priority mangle; policy accept;
		meta l4proto { tcp, udp } flow add @ft
	}
}
1 Like

I cannot find any info about 820, but 830 does have "an integrated Wi-Fi Offload engine" according to the product page. So, the only missing piece should be the driver support.

Search the forum for Wireless Ethernet Dispatch.
It needs to be enabled manually but can be flaky sometimes with snapshot build.

Also asked here:

Thanks for pointing the right direction. So, 23.05 does not enable the wed feature by default. For anyone want to use this feature, you need add options mt7915e wed_enable=Y to /etc/modules.conf and reboot. Once rebooted, you should have the following in your demsg output:

[   11.763059] mt798x-wmac 18000000.wifi: attaching wed device 0 version 2
[   11.854924] platform 15010000.wed: MTK WED WO Firmware Version: DEV_000000, Build Time: 20221012175005
[   11.864275] platform 15010000.wed: MTK WED WO Chip ID 00 Region 3

You can confirm whether it's working by cat /sys/kernel/debug/ppe0/bind. Currently, the wireless offloading seems to be only working in TX direction, which reduces CPU usage from 10% to 3% when doing wireless speed tests compare 0% in wired speed tests.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.