OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by MOZGIII - 16.07.2019
Last edited by Petr Štetiar - 04.10.2019

FS#2389 - Flow offload regression with 4.19 kernel

Device: Archer C7 v2
OpenWrt SNAPSHOT, r10451-653e05d27f no extra packages

When I set flow_offloading 1 at /etc/config/firewall, I expect the offload to work and connection speed to go up from 300 Mbps to about 700-800 Mbps at least. However, it drops to 100 Mbps instead. I tried with flow_offloading_hw 0 and 1 and it seems to irrelevant - which is ok since Archer C7 v2 isn’t supposed to have HW offload support at this point.

I did a custom build with 4.14 kernel and it works as expected, so the problem must be with the new 4.19 kernel.

Either the patches weren’t ported properly, or something’s wrong with the kernel itself. I expected there to be already some kind of evidence suggesting the issue was with updated kernel itself, and not the patches, but I couldn’t find any reports so far, so I’d bet something’s wrong with how the patches were ported.

Some additional info from the 4.19 kernel system:

root@router:~# lsmod | grep -i flow
nf_conntrack 71817 12 xt_NETMAP,ipt_MASQUERADE,xt_state,xt_nat,xt_conntrack,xt_REDIRECT,xt_CT,nf_nat_ipv4,nf_nat,nf_flow_table,nf_conntrack_rtcache,nf_conntrack_netlink
nf_flow_table 14399 2 xt_FLOWOFFLOAD,nf_flow_table_hw
nf_flow_table_hw 2192 1
x_tables 15391 26 xt_NETMAP,ipt_MASQUERADE,xt_state,xt_nat,xt_conntrack,xt_REDIRECT,xt_FLOWOFFLOAD,xt_CT,ipt_REJECT,xt_time,xt_tcpudp,xt_multiport,xt_mark,xt_mac,xt_limit,xt_comment,xt_TCPMSS,xt_LOG,iptable_mangle,iptable_filter,ip_tables,xt_set,ip6table_mangle,ip6table_filter,ip6_tables,ip6t_REJECT

root@router:~# iptables -L | grep -i off
FLOWOFFLOAD all – anywhere anywhere /* !fw3: Traffic offloading */ ctstate RELATED,ESTABLISHED FLOWOFFLOAD

Closed by  Petr ┼átetiar
04.10.2019 09:35
Reason for closing:  Fixed
Additional comments about closing:  

Please try with latest snapshot image where it should be fixed and request re-open of this bug if the problem still persists.

blubbblubb commented on 16.07.2019 16:14

I noticed the same behavior. A custom build with 4.14 works for me as well.
(The old ar71 snapshots work as well)

Anton van Bohemen commented on 18.07.2019 13:32

If I run the above commands on my system (also Archer C7v2, kernel 4.14, build r9136-f4d6e8f98f) I get a lot more output:

root@router ~# lsmod|grep -i flow
cls_flow 5680 0
nf_conntrack 63649 45 nf_nat_pptp,nf_conntrack_pptp,nf_conntrack_ipv6,ipt_MASQUERADE,xt_state,xt_nat,xt_helper,xt_conntrack,xt_connmark,xt_connlimit,xt_connbytes,xt_REDIRECT,xt_CT,nft_redir_ipv4,nft_redir,nft_nat,nft_masq_ipv4,nft_masq,nft_flow_offload,nft_ct,nf_nat_tftp,nf_nat_snmp_basic,nf_nat_sip,nf_nat_masquerade_ipv4,nf_nat_irc,nf_conntrack_ipv4,nf_nat_ipv4,nf_nat_h323,nf_nat_ftp,nf_nat_amanda,nf_nat,nf_flow_table,nf_conntrack_tftp,nf_conntrack_snmp,nf_conntrack_sip,nf_conntrack_rtcache,nf_conntrack_proto_gre,nf_conntrack_netlink,nf_conntrack_irc,nf_conntrack_h323,nf_conntrack_ftp,nf_conntrack_broadcast,nf_conntrack_amanda,sch_cake,act_connmark
nf_flow_table 14015 6 nf_flow_table_ipv6,nf_flow_table_ipv4,nf_flow_table_inet,xt_FLOWOFFLOAD,nft_flow_offload,nf_flow_table_hw
nf_flow_table_hw 2160 1
nf_flow_table_inet 528 0
nf_flow_table_ipv4 464 0
nf_flow_table_ipv6 464 0
nf_tables 68745 29 nf_flow_table_ipv6,nf_flow_table_ipv4,nf_flow_table_inet,nft_set_rbtree,nft_set_hash,nft_reject_ipv6,nft_reject_ipv4,nft_reject_inet,nft_reject,nft_redir_ipv4,nft_redir,nft_quota,nft_numgen,nft_nat,nft_meta,nft_masq_ipv4,nft_masq,nft_log,nft_limit,nft_flow_offload,nft_exthdr,nft_ct,nft_counter,nft_chain_route_ipv6,nft_chain_route_ipv4,nft_chain_nat_ipv4,nf_tables_ipv6,nf_tables_ipv4,nf_tables_inet
nft_flow_offload 1584 0
x_tables 13807 45 ipt_REJECT,ipt_MASQUERADE,xt_time,xt_tcpudp,xt_tcpmss,xt_statistic,xt_state,xt_recent,xt_policy,xt_nat,xt_multiport,xt_mark,xt_mac,xt_limit,xt_length,xt_hl,xt_helper,xt_esp,xt_ecn,xt_dscp,xt_conntrack,xt_connmark,xt_connlimit,xt_connbytes,xt_comment,xt_TCPMSS,xt_REDIRECT,xt_LOG,xt_HL,xt_FLOWOFFLOAD,xt_DSCP,xt_CT,xt_CLASSIFY,iptable_raw,iptable_mangle,iptable_filter,ipt_ah,ipt_ECN,ip_tables,act_ipt,xt_set,ip6t_REJECT,ip6table_mangle,ip6table_filter,ip6_tables
root@router ~# iptables -L| grep -i off
FLOWOFFLOAD all – anywhere anywhere /* !fw3: Traffic offloading */ ctstate RELATED,ESTABLISHED FLOWOFFLOAD

psyborg commented on 22.07.2019 03:47

the problem starts with kernel 4.19.26, upstream change that broke flow offload: Upstream commit 10f4e765879e514e1ce7f52ed26603047af196e2

netfilter: nft_flow_offload: fix interaction with vrf slave device

MOZGIII commented on 08.08.2019 13:17

I created a kernel bug some time ago for the related issue: Would be great if people with more OpenWRT development experience participated there, as my knowledge might not be enough to properly assist.


Available keyboard shortcuts


Task Details

Task Editing