i dont know, can i test that? i did not activate it, afaik.
do not know all ways openwrt do this stuff…maybe you can look on “nft list ruleset” and look if there is a flowtable with offload-flag
root@OpenWrt:~# nft list ruleset| grep offload
prints nothing
does it print anything when leaving the grep? you use the vendors openwrt based on sdk, right?
i created my own image from the dangowrt branch. i deleted my old .config and let make menuconfig create everything.
when i leave the grep there is a lot printed, yes.
table inet fw4 {
chain input {
type filter hook input priority filter; policy drop;
iif "lo" accept comment "!fw4: Accept traffic from loopback"
ct state vmap { established : accept, related : accept } comment "!fw4: Handle inbound flows"
tcp flags syn / fin,syn,rst,ack jump syn_flood comment "!fw4: Rate limit TCP syn packets"
iifname "br-lan" jump input_lan comment "!fw4: Handle lan IPv4/IPv6 input traffic"
iifname "eth2" jump input_wan comment "!fw4: Handle wan IPv4/IPv6 input traffic"
jump handle_reject
}
chain forward {
type filter hook forward priority filter; policy drop;
ct state vmap { established : accept, related : accept } comment "!fw4: Handle forwarded flows"
iifname "br-lan" jump forward_lan comment "!fw4: Handle lan IPv4/IPv6 forward traffic"
iifname "eth2" jump forward_wan comment "!fw4: Handle wan IPv4/IPv6 forward traffic"
jump handle_reject
}
chain output {
type filter hook output priority filter; policy accept;
oif "lo" accept comment "!fw4: Accept traffic towards loopback"
ct state vmap { established : accept, related : accept } comment "!fw4: Handle outbound flows"
oifname "br-lan" jump output_lan comment "!fw4: Handle lan IPv4/IPv6 output traffic"
oifname "eth2" jump output_wan comment "!fw4: Handle wan IPv4/IPv6 output traffic"
}
chain prerouting {
type filter hook prerouting priority filter; policy accept;
iifname "br-lan" jump helper_lan comment "!fw4: Handle lan IPv4/IPv6 helper assignment"
}
chain handle_reject {
meta l4proto tcp reject with tcp reset comment "!fw4: Reject TCP traffic"
reject comment "!fw4: Reject any other traffic"
}
chain syn_flood {
limit rate 25/second burst 50 packets return comment "!fw4: Accept SYN packets below rate-limit"
drop comment "!fw4: Drop excess packets"
}
chain input_lan {
jump accept_from_lan
}
chain output_lan {
jump accept_to_lan
}
chain forward_lan {
jump accept_to_wan comment "!fw4: Accept lan to wan forwarding"
jump accept_to_lan
}
chain helper_lan {
}
chain accept_from_lan {
iifname "br-lan" counter packets 172 bytes 20257 accept comment "!fw4: accept lan IPv4/IPv6 traffic"
}
chain accept_to_lan {
oifname "br-lan" counter packets 55 bytes 9666 accept comment "!fw4: accept lan IPv4/IPv6 traffic"
}
chain input_wan {
meta nfproto ipv4 udp dport 68 counter packets 0 bytes 0 accept comment "!fw4: Allow-DHCP-Renew"
icmp type echo-request counter packets 2 bytes 168 accept comment "!fw4: Allow-Ping"
meta nfproto ipv4 meta l4proto igmp counter packets 51 bytes 1632 accept comment "!fw4: Allow-IGMP"
meta l4proto udp ip daddr 224.0.0.0/4 counter packets 0 bytes 0 accept comment "!fw4: Allow-IGMP-Broadcast"
meta nfproto ipv6 udp dport 546 counter packets 0 bytes 0 accept comment "!fw4: Allow-DHCPv6"
ip6 saddr fe80::/10 icmpv6 type . icmpv6 code { mld-listener-query . no-route, mld-listener-report . no-route, mld-listener-done . no-route, mld2-listener-report . no-route } counter packets 24 bytes 1824 accept comment "!fw4: Allow-MLD"
icmpv6 type { destination-unreachable, time-exceeded, echo-request, echo-reply, nd-router-solicit, nd-router-advert } limit rate 1000/second burst 5 packets counter packets 344 bytes 49536 accept comment "!fw4: Allow-ICMPv6-Input"
icmpv6 type . icmpv6 code { packet-too-big . no-route, parameter-problem . no-route, nd-neighbor-solicit . no-route, nd-neighbor-advert . no-route, parameter-problem . admin-prohibited } limit rate 1000/second burst 5 packets counter packets 4 bytes 256 accept comment "!fw4: Allow-ICMPv6-Input"
jump reject_from_wan
}
chain output_wan {
jump accept_to_wan
}
chain forward_wan {
icmpv6 type { destination-unreachable, time-exceeded, echo-request, echo-reply } limit rate 1000/second burst 5 packets counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Forward"
icmpv6 type . icmpv6 code { packet-too-big . no-route, parameter-problem . no-route, parameter-problem . admin-prohibited } limit rate 1000/second burst 5 packets counter packets 0 bytes 0 accept comment "!fw4: Allow-ICMPv6-Forward"
meta l4proto esp counter packets 0 bytes 0 jump accept_to_lan comment "!fw4: Allow-IPSec-ESP"
udp dport 500 counter packets 0 bytes 0 jump accept_to_lan comment "!fw4: Allow-ISAKMP"
jump reject_to_wan
}
chain accept_to_wan {
meta nfproto ipv4 oifname "eth2" ct state invalid counter packets 34355 bytes 1427155 drop comment "!fw4: Prevent NAT leakage"
oifname "eth2" counter packets 940 bytes 285783 accept comment "!fw4: accept wan IPv4/IPv6 traffic"
}
chain reject_from_wan {
iifname "eth2" counter packets 41141 bytes 2274747 jump handle_reject comment "!fw4: reject wan IPv4/IPv6 traffic"
}
chain reject_to_wan {
oifname "eth2" counter packets 0 bytes 0 jump handle_reject comment "!fw4: reject wan IPv4/IPv6 traffic"
}
chain dstnat {
type nat hook prerouting priority dstnat; policy accept;
}
chain srcnat {
type nat hook postrouting priority srcnat; policy accept;
oifname "eth2" jump srcnat_wan comment "!fw4: Handle wan IPv4/IPv6 srcnat traffic"
}
chain srcnat_wan {
meta nfproto ipv4 masquerade comment "!fw4: Masquerade IPv4 wan traffic"
}
chain raw_prerouting {
type filter hook prerouting priority raw; policy accept;
}
chain raw_output {
type filter hook output priority raw; policy accept;
}
chain mangle_prerouting {
type filter hook prerouting priority mangle; policy accept;
}
chain mangle_postrouting {
type filter hook postrouting priority mangle; policy accept;
oifname "eth2" tcp flags syn / fin,syn,rst tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 egress MTU fixing"
}
chain mangle_input {
type filter hook input priority mangle; policy accept;
}
chain mangle_output {
type route hook output priority mangle; policy accept;
}
chain mangle_forward {
type filter hook forward priority mangle; policy accept;
iifname "eth2" tcp flags syn / fin,syn,rst tcp option maxseg size set rt mtu comment "!fw4: Zone wan IPv4/IPv6 ingress MTU fixing"
}
}
ok, daniels version does not support flow offloading yet as we are working on more basic tasks
then it looks that software thinks it sends packets out of lan2, but not really sending (right)
Yeah, PPE needs more work to support 4 GiB of RAM. If you want to test PPE you can limit RAM to 2 GiB in the meantime (ie. fw_setenv bootargs "$(fw_printenv -n bootargs) mem=2048M"
).
Regarding 100M: I can confirm 100M and 10M modes indeed don’t work with OpenWrt Linux 6.1 build. For starters, can you @frank-w test if 100M or 10M links on the switch ports work with your build?
I’m not sure i find 10/100 Equipment anywhere as i dropped such parts from my network over time…imho all is GBE
doesnt need to be 100/10mbit devices, just set it with ethtool to 100mbit and see if dhcp works. i am able to reproduce the bug with my laptop, connected via usb-c->rj45 to the banana pi
yes i know that i can manipulate the speed with ethtool, but this works
made a connection on wan in 1G-Mode to have working start, then change speed to 100M, still works
#get a working state first
root@bpi-r4-v11:~# ip a a 192.168.0.10/24 dev wan
root@bpi-r4-v11:~# ip link set wan up
[ 48.826375] DEBUG: Passed mtk_dma_init 3522 maybe call hwlro_rx_init
[ 48.834447] DEBUG: Passed mtk_hwlro_rx_init 2948 hwlro_rx_init
[ 48.840285] DEBUG: Passed mtk_hwlro_rx_init 2992 >=netsys_v2
[ 48.845931] DEBUG: Passed mtk_hwlro_rx_init 3016 set perLRO GRP INT
[ 48.852195] mtk_soc_eth 15100000.ethernet: mtk_rx_alloc 1 MTK_RX_FLAGS_NORMAL
[ 48.859769] mtk_soc_eth 15100000.ethernet: mtk_rx_alloc 2 MTK_RX_FLAGS_NORMAL
[ 48.867440] mtk_soc_eth 15100000.ethernet: mtk_rx_alloc 3 MTK_RX_FLAGS_NORMAL
[ 48.875010] DEBUG: Passed mtk_rss_init 3335
[ 48.879184] DEBUG: Passed mtk_rss_init 3401 netsysv2:1
[ 48.884612] DEBUG: Passed mtk_open 3874 enable napi and irq for lro
[ 48.890879] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/internal link mode
[ 48.899002] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 10Gbps/Full - flow control rx/tx
[ 48.899453] mt7530-mmio 15020000.switch wan: configuring for phy/internal link mode
[ 48.916276] mt7530-mmio 15020000.switch wan: Link is Up - 1Gbps/Full - flow control rx/tx
root@bpi-r4-v11:~# ping 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.086 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.017 ms
^C
--- 192.168.0.10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1068ms
rtt min/avg/max/mdev = 0.017/0.051/0.086/0.034 ms
root@bpi-r4-v11:~# ethtool wan set speed 100
Settings for wan:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: master
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Link detected: yes
#lets change the speed to 100Mbit
root@bpi-r4-v11:~# ethtool -s wan speed 100
[ 104.903290] mt7530-mmio 15020000.switch wan: Link is Down
root@bpi-r4-v11:~# [ 106.899487] mt7530-mmio 15020000.switch wan: Link is Up - 100Mbps/Full - flow control rx/tx
root@bpi-r4-v11:~#
root@bpi-r4-v11:~# ping 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.056 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.017 ms
64 bytes from 192.168.0.10: icmp_seq=3 ttl=64 time=0.015 ms
64 bytes from 192.168.0.10: icmp_seq=4 ttl=64 time=0.015 ms
64 bytes from 192.168.0.10: icmp_seq=5 ttl=64 time=0.016 ms
^C
--- 192.168.0.10 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4136ms
rtt min/avg/max/mdev = 0.015/0.023/0.056/0.016 ms
root@bpi-r4-v11:~# ethtool wan
Settings for wan:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 100baseT/Half 100baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: master
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Link detected: yes
root@bpi-r4-v11:~# ping 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.016 ms
^C
--- 192.168.0.10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1006ms
rtt min/avg/max/mdev = 0.016/0.037/0.058/0.021 ms
#just to complete 10M too
root@bpi-r4-v11:~# ethtool -s wan speed 10
[ 185.393294] mt7530-mmio 15020000.switch wan: Link is Down
root@bpi-r4-v11:~# [ 187.168545] mt7530-mmio 15020000.switch wan: Link is Up - 10Mbps/Full - flow control rx/tx
root@bpi-r4-v11:~# ping 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.058 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.022 ms
^C
--- 192.168.0.10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1016ms
rtt min/avg/max/mdev = 0.022/0.040/0.058/0.018 ms
root@bpi-r4-v11:~# ethtool wan
Settings for wan:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 10Mb/s
Duplex: Full
Auto-negotiation: on
master-slave cfg: preferred slave
master-slave status: master
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Link detected: yes
root@bpi-r4-v11:~#
hmm, so that means, with your image it works. can you turn off auto negotiation? i dont think it has any influence but i had autoneg off, just to have the exact same settings.
same:
root@bpi-r4-v11:~# ethtool -s wan speed 100 autoneg off
[ 9029.483214] mt7530-mmio 15020000.switch wan: Link is Down
root@bpi-r4-v11:~# [ 9031.961636] mt7530-mmio 15020000.switch wan: Link is Up - 100Mbps/Full - flow control off
root@bpi-r4-v11:~# ping 192.168.0.10
PING 192.168.0.10 (192.168.0.10) 56(84) bytes of data.
64 bytes from 192.168.0.10: icmp_seq=1 ttl=64 time=0.057 ms
64 bytes from 192.168.0.10: icmp_seq=2 ttl=64 time=0.018 ms
^C
--- 192.168.0.10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1026ms
rtt min/avg/max/mdev = 0.018/0.037/0.057/0.019 ms
root@bpi-r4-v11:~# ethtool wan
Settings for wan:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 100Mb/s
Duplex: Full
Auto-negotiation: off
master-slave cfg: preferred slave
master-slave status: master
Port: Twisted Pair
PHYAD: 0
Transceiver: external
MDI-X: Unknown
Supports Wake-on: d
Wake-on: d
Link detected: yes
Thank you for testing. I’m relieved because that means the mt7530 driver support and phy driver which is already upstream is fine and working well so far.