Info for mt7622 built-in Hardware QoS (NAPT+HQoS) feature in OpenWrt

The mt7622 SoC seems to mention a built-in feature called Network Accelerator NAPT+HQoS in the official datasheet:
https://www.mediatek.com/products/home-networking/mt7622

There doesn't seem to be a lot of info on this topic (or at least I couldn't find it), except for these technical specifications:

The HNAT in this table seems to refer to Hardware Flow Offloading and the WiFi Warp Drive is the Wireless Ethernet Dispatch (WED) offload. Both of these features are already available and working in OpenWrt 23.05.2 for mt7622 and mt7915.

This is their official description regarding HQoS part:

Besides the connectivity features, the hardware-based NAT engine with QoS embedded in MT7622 transporting the audio/video streams in higher priority than other non-timely services also enriches the home entertainment application.
The SFQ separating P2P sessions from audio/video ones so that MT7622 guarantees the streaming service.

Does anyone has additional info regarding the HQoS feature?

Does enabling Hardware Flow Offload in OpenWrt means that it also uses the built-in HQoS or is that a separate function that is not implemented?

Thank you for any info regarding this

well it does that,my xiaomi ax 3200 run all that, it is on 22.03.2. i did alot work on that device. but switch and wifi driver are not the same as common WRT

1 Like

Thank you so much for the reply!

Yes, I use OpenWrt on Xiaomi AX3200 as well.

So enabling the Hardware Flow Offload in OpenWrt also enables the HQoS that's built in the mt7622 SoC?

i do not think so

1 Like

Update: It seems that OpenWrt Hardware Flow Offload is not exactly the same as the MediaTek HWNAT feature, at least according to this post and reply: Add OpenWrt support for Xiaomi "Redmi AX6000" - #597 by nick008a

This very likely suggests that the HQoS is not activated either when enabling the standard Hardware Flow Offload in OpenWrt.

1 Like

Did you find any more information about HQoS and possibly how to enable it?

1 Like

Nothing additional, just that it's not enabled with the OpenWrt standard hardware offload feature.

As somewhat of an alternative for the QoS, I've checked Qosify and it works good with the proper limits set. Although that's a software solution and doesn't have any hardware offload support

Only hardware qdisc is mqprio that offloads absolute priority classes to hardware queues

1 Like

Currently we don’t have hardware qos supported in mainline Linux, and I’m not sure if a suitable api for it ever exists…

1 Like

Seems we can use tc flower to implement speed limit part of HW QoS, just need someone to implement it..

1 Like

That's an interesting concept, thank you for the suggestion.

I didn't know about tc flower before. Is it used actively in any implementations?

Openvswitch

1 Like

Seems it is supported in mlx5 driver(For connectx4 and later cards) too.

https://patchwork.kernel.org/project/netdevbpf/cover/20211217181629.28081-1-simon.horman@corigine.com/

1 Like

bumping for visablity

this this would be extremely useful to get running
currently soft solutions like cake and fq_codel are extremely cpu intensive and mqprio is usually enough to control bufferbloat to a acceptable degree (especially if we can set thoughput limits and maintain hardware offloading) I can not stress enough how big of a deal this would be

3 Likes

I saw that MT7986 has hardware QoS and I saw the OpenWRT mediatek source mention it very recently.

Reference only:

Recent upstream change:

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/fb32b5121a18b2f4fbe5cbe8cb267f388a985538

Does this mean it is implemented in the snapshot?

Scribd site is not ran by OpenWRT.

https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/fb32b5121a18b2f4fbe5cbe8cb267f388a985538

Meant to post this link too.

It says allows to enable HQoS.

Still not OpenWRT.org ?

1 Like

Got it. I'm starting to understand the structure now. Still new to OpenWRT development.