Adding OpenWrt support for QNAP QHora-301W

Have you looked at the repo by bitthief that @rmandrad linked?
I assume those don't just work with your branch (if merged properly), right?
Or are there other problems like often breaking code changes to the main kernel, or incomplete offloading implementation, or is it just bad code?

Like what would need to happen for 10G?
A full fresh rewrite, or just a bit more kicking the code to work?

1 Like

I am perfectly aware of those, we had basic offloading working a while ago but it was dropped.

Its just too much of a hack, constantly breaks, requires legacy stuff that was dropped like 10 years ago etc

1 Like

Anyone doing VLANs over B.A.T.M.A.N on 802.11s mesh? I can't see to get some traffic (e.g. DHCP) to flow. In a basic setup with a gateway and a dumb AP and a DHCP example, I see the full DHCP sequence (discover, offer, request, ack) on the gateway. On the dumb AP, I see the whole sequence up to the bat0 interface, but once that traffic hits the WLAN interface I never see that ACK.

I tested this with the 301w as the gateway and a Redmi AX6000 as a dumb AP, then made an identical config with just two Redmi AX6000s and it worked fine there. Assigning a static IP works. Can't for the life of me get DHCP to function.

More details:
301W: Gateway
AX6000: Dumb AP

802.11s on both, peer forwarding disabled. batctl shows neighbors are reachable, putting an IP works fine and I can ICMP fine.

Both devices have one bridge br with 5 VLAN tags. bat0 is added as a member to br and all 5 VLANs are tagged. Here's some TCP dumps.

Gateway (301w) on br.2 (IOT VLAN)

00:33:02.167779 xx:xx:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: (tos 0x0, ttl 255, id 35097, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx, length 300, xid 0x61f4edfd, Flags [none] (0x0000)
Client-Ethernet-Address xx:xx:xx:xx:xx:xx
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Discover
Parameter-Request (55), length 9:
Subnet-Mask (1), Classless-Static-Route (121), Default-Gateway (3), Domain-Name-Server (6)
Domain-Name (15), Unknown (108), URL (114), Unknown (119)
Unknown (252)
MSZ (57), length 2: 1500
Client-ID (61), length 7: ether xx:xx:xx:xx:xx:xx
Lease-Time (51), length 4: 7776000
00:33:02.168865 yy:yy:yy:yy:yy:yy > xx:xx:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 343: (tos 0xc0, ttl 64, id 42425, offset 0, flags [none], proto UDP (17), length 329)
10.0.2.1.67 > 10.0.2.16.68: [bad udp cksum 0x1957 -> 0xae74!] BOOTP/DHCP, Reply, length 301, xid 0x61f4edfd, Flags [none] (0x0000)
Your-IP 10.0.2.16
Server-IP 10.0.2.1
Client-Ethernet-Address xx:xx:xx:xx:xx:xx
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Offer
Server-ID (54), length 4: 10.0.2.1
Lease-Time (51), length 4: 43200
RN (58), length 4: 21600
RB (59), length 4: 37800
Subnet-Mask (1), length 4: 255.255.255.0
BR (28), length 4: 10.0.2.255
Default-Gateway (3), length 4: 10.0.2.1
Domain-Name (15), length 3: "lan"
Domain-Name-Server (6), length 8: 10.0.0.102,10.0.0.163
00:33:03.180637 xx:xx:xx:xx:xx:xx > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 342: (tos 0x0, ttl 255, id 35098, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from xx:xx:xx:xx:xx:xx, length 300, xid 0x61f4edfd, secs 1, Flags [none] (0x0000)
Client-Ethernet-Address xx:xx:xx:xx:xx:xx
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Request
Parameter-Request (55), length 9:
Subnet-Mask (1), Classless-Static-Route (121), Default-Gateway (3), Domain-Name-Server (6)
Domain-Name (15), Unknown (108), URL (114), Unknown (119)
Unknown (252)
MSZ (57), length 2: 1500
Client-ID (61), length 7: ether xx:xx:xx:xx:xx:xx
Requested-IP (50), length 4: 10.0.2.16
Server-ID (54), length 4: 10.0.2.1
00:33:03.182329 yy:yy:yy:yy:yy:yy > xx:xx:xx:xx:xx:xx, ethertype IPv4 (0x0800), length 343: (tos 0xc0, ttl 64, id 42429, offset 0, flags [none], proto UDP (17), length 329)
10.0.2.1.67 > 10.0.2.16.68: [bad udp cksum 0x1957 -> 0xab73!] BOOTP/DHCP, Reply, length 301, xid 0x61f4edfd, secs 1, Flags [none] (0x0000)
Your-IP 10.0.2.16
Server-IP 10.0.2.1
Client-Ethernet-Address xx:xx:xx:xx:xx:xx
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: ACK
Server-ID (54), length 4: 10.0.2.1
Lease-Time (51), length 4: 43200
RN (58), length 4: 21600
RB (59), length 4: 37800
Subnet-Mask (1), length 4: 255.255.255.0
BR (28), length 4: 10.0.2.255
Default-Gateway (3), length 4: 10.0.2.1
Domain-Name (15), length 3: "lan"
Domain-Name-Server (6), length 8: 10.0.0.102,10.0.0.163

DHCP ACK never makes it to br.2 on the AX6000/dumb AP. bad udp cksum 0x1957 -> 0xab73! looks like it might be the culprit. Related? [solved] DHCP on VLAN interfaces - #5 by oofnik iptables aren't used any more, might have to dig in.

Anyone have ideas/suggestions?

Anyone having issues with their WAN speeds on this device? If I run a speediest direction on it, I see full ~1400mbit down, but once it NATs I can't seem to break 400. Checked on a 10g NIC, 1G NIC and over wireless as well. Can't get any faster than ~400.

Can you explain your test case more precise?
But only 400mbit sounds way to low, even with NAT + PPPOE the QNAP can do more.

It's just NAT to a cable modem (raw IP). Setup is S33 cable modem (2.5Gbe) to the 10-2 10Gbe port on the 301W. ethtool shows negotiation at 2.5Gbe and running a Speedtest directly on the router shows full 1400mbit from my ISP.

10-1 10Gbe port goes to a TL-SX1008 10Gbe switch (also checked directly to my ASUS 10g NIC in my server. Max WAN speed is 4-500mbit/s. iperf from router to client PC shows >1gbit so there's no bottleneck there. Checked wifi too, same 4-500mbit/s. No SQM, no QOS, just raw NAT. There's 5 VLANs on it but the whole network is completely inactive.

That does top/htop shows on the router ?

Shows ~70% or less on one single core.

Hi guys, can I ask you to test something? I need some user with 2.7.0 firmware (or even not with that firmware) and the output of

/etc/init.d/wpad restart

Do you have an error of failed to free pending packet in the log?

Mon Oct 10 21:20:03 2022 daemon.warn netifd: Wireless device 'radio0' setup failed, retry=3
Mon Oct 10 21:20:03 2022 daemon.warn netifd: Wireless device 'radio1' setup failed, retry=3
Mon Oct 10 21:20:03 2022 daemon.notice netifd: radio0 (6831): Command failed: ubus call hostapd config_remove {"iface":"wlan0"} (Invalid argument)

there is also the same error for radio1

other than that no errors or fails.

I'm running 10-10-2022 build from https://github.com/robimarko/openwrt

Robi's build 10-10-2022. One client connected.

Tue Oct 11 21:31:08 2022 kern.warn kernel: [41480.394322] ath11k c000000.wifi: failed to flush transmit queue, data pkts pending 10```

latest Robi's build + the 2.7 firmware/regdb patch
I get instead with one client connected

[74761.515467] ath11k c000000.wifi: No VIF found for vdev 0
[74761.515512] ath11k c000000.wifi: invalid vdev id 0 in bcn_tx_status

Again, that branch is not meant to be used as there is no external regdb

1 Like

i will revert back thx for the heads up

I am looking at the right AQR not working at 1G speed, its a really weird issue.
Basically, I dont see any packets going out on a client device when wiresharking nor do I see incoming packets, so it's really broke-broke.

Its really, really smells like a clock issue.

which port are you using ?the eth4 or eth5?

I am using the eth4 as wan on 1G and I do see traffic


eth4      Link encap:Ethernet  HWaddr  
          inet6 addr:  Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11906819 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14931507 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8087144028 (7.5 GiB)  TX bytes:20582952797 (19.1 GiB)
          Base address:0x1800

eth5      Link encap:Ethernet  HWaddr  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Base address:0x7000

eth5 doesnt work, you will see the counters increase but no packets are going in and out at 1G

never got eth5 to work ... a few people got it to work on lan but I don't think wan

there were these ssdk_shell settings ...

And what did I say other than that I was investigating why it does not work as it's a known issue?

WAN or LAN wouldn't stop packets going out.

Its a clock issue, something is broke with NSS port 6/UNIPHY2 as it goes to 104 point something which is invalid frequency, it should go to 125MHz

1 Like

Found the issue, it was an RCG configuration issue for the clock.
I managed to solve it by using floor ops for now, not really sure if that's the final fix but it works.

It has been pushed out along with a rebase so the right AQR(10G-2) finally works in 1G mode as well.

9 Likes