HQoS for BPI-R4 / MT7988A

To MediaTek & folks:

Your hardware QoS looks good and works great (with my limited tests) until LXC (Linux containers) kicks in. There is a little nagging compatibility issue with LXC in your HQoS supporting codes in PPE.

Whenever lxc-start or lxc-stop is invoked from the command line, your codes spit out this horrible warning (but seems harmless to system stability from my check):

[   13.722547] ------------[ cut here ]------------
[   13.727178] sysctl net/netfilter/nf_conntrack_qos: data points to kernel global data: 0xffffffc080dfa6cc
[   13.736736] WARNING: CPU: 2 PID: 3539 at register_net_sysctl_sz+0xe0/0x140
[   13.831491] CPU: 2 UID: 0 PID: 3539 Comm: lxc-start Tainted: G           O       6.12.55 #0
[   13.839835] Tainted: [O]=OOT_MODULE
[   13.843315] Hardware name: Banana Pi BPI-R4 (2x SFP+) (DT)
[   13.848790] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   13.939903] Call trace:
[   13.942341]  register_net_sysctl_sz+0xe0/0x140
[   13.946777]  nf_conntrack_pernet_init+0x150/0x2c0
[   13.951477]  ops_init+0x70/0x128
[   13.954701]  setup_net+0xc0/0x2f0
[   13.958009]  copy_net_ns+0x13c/0x2bc
[   13.961579]  create_new_namespaces+0x110/0x2c0
[   13.966016]  unshare_nsproxy_namespaces+0x5c/0xa0
[   13.970710]  ksys_unshare+0x11c/0x3b4
[   13.974368]  __arm64_sys_unshare+0x10/0x20
[   13.978458]  invoke_syscall.constprop.0+0x4c/0xd0
[   13.983155]  do_el0_svc+0x3c/0xd0
[   13.986461]  el0_svc+0x18/0x60
[   13.989509]  el0t_64_sync_handler+0x118/0x124
[   13.993858]  el0t_64_sync+0x150/0x154
[   13.997513] ---[ end trace 0000000000000000 ]---

The issue looks like your addition of sysctl variable “nf_conntrack_qos” isn’t namespace compatible. Would be good if you look into this and get it addressed.

My tests done in OpenWrt master branch + your PPE patches.

Cheers