Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ramips: disable hardware NAT offload for MT7621 #1916

Closed
wants to merge 1 commit into from
Closed

ramips: disable hardware NAT offload for MT7621 #1916

wants to merge 1 commit into from

Conversation

jchulce
Copy link

@jchulce jchulce commented Mar 12, 2019

Turn off the problematic hardware flow offloading on MT7621

The hardware NAT offload driver was introduced in
424a9ae
Unfortunately it has issues, including broken IPv6 and kernel panics.
Disable it for now.
Consider enabling this again after the kernel 4.19 drivers land.

Fixes: FS#1763 FS#2157 FS#2158 FS#2115 FS#1956 FS#1917

Signed-off-by: JC Hulce git@jchulce.com

This is my first commit to openwrt, please let me know if I'm doing something wrong.

Turn off the problematic hardware flow offloading on MT7621

The hardware NAT offload driver was introduced in 
424a9ae
Unfortunately it has issues, including broken IPv6 and kernel panics. 
Disable it for now. 
Consider enabling this again after the kernel 4.19 drivers land.  

Fixes: FS#1763 FS#2157 FS#2158 FS#2115 FS#1956 FS#1917

Signed-off-by: JC Hulce <git@jchulce.com>
@nbd168
Copy link
Member

nbd168 commented Mar 12, 2019

Does the driver actually break things if it's not enabled in /etc/config/firewall?

@jchulce
Copy link
Author

jchulce commented Mar 12, 2019

Does the driver actually break things if it's not enabled in /etc/config/firewall?

Yes, IPv6 is broken unless openwrt is recompiled without this driver, see FS#1763

@nbd168
Copy link
Member

nbd168 commented Mar 13, 2019

I posted a patch for testing in that ticket (to resolve the broken IPv6 case). Could you please try it?

@ptpt52
Copy link
Contributor

ptpt52 commented Mar 13, 2019

my test on device GHL without any patch, ipv6 works
GHL the same hw like R6220

@ptpt52
Copy link
Contributor

ptpt52 commented Mar 13, 2019

root@X-WRT:~# ifstatus wan6
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 252,
	"l3_device": "eth0.2",
	"proto": "dhcpv6",
	"device": "eth0.2",
	"updated": [
		"addresses",
		"routes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		
	],
	"ipv6-address": [
		{
			"address": "2222:777:8888:999:56a3:1bff:fe28:97f9",
			"mask": 64
		},
		{
			"address": "2222:777:8888:999::de4",
			"mask": 128
		}
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "2222:777:8888:999::",
			"mask": 64,
			"nexthop": "::",
			"metric": 256,
			"source": "::/0"
		}
	],
	"dns-server": [
		"2222:777:8888:999::1"
	],
	"dns-search": [
		
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		]
	},
	"data": {
		"passthru": "0017001022220777888809990000000000000001"
	}
}

@chunkeey chunkeey added the target/ramips pull request/issue for ramips target label Mar 13, 2019
@haswelliris
Copy link

My router is newifi-d2 which cpu is MT7621. I did not meet the broken IPv6 problem,but still got some kernel panics.
In my device, if I turn off hardware flow offloading, kernel panic may happen almost everyday. As a contrast, kernel panic may happen once a month with harware flow offloading on. Maybe the system crash caused by mt76 driver or other things. But it seems that the hardware flow offloading can alleviate it.

@dchard
Copy link
Contributor

dchard commented Apr 1, 2019

My router is newifi-d2 which cpu is MT7621. I did not meet the broken IPv6 problem,but still got some kernel panics.
In my device, if I turn off hardware flow offloading, kernel panic may happen almost everyday. As a contrast, kernel panic may happen once a month with harware flow offloading on. Maybe the system crash caused by mt76 driver or other things. But it seems that the hardware flow offloading can alleviate it.

Exactly the same thing here on a 860L router (mt7621 as well). It looks like the reason for the crash is resource utilization dependent, and obviously the HW acceleration removes quite some load from the CPU. None the less, it is indeed seems like there is a relation. These types of crashes were present before HW accel was introduced, but it definitely helped on the frequency of it.

@ammarahm1
Copy link

Any update on this issue?

@MeIsReallyBa
Copy link

My router is newifi-d2 which cpu is MT7621. I did not meet the broken IPv6 problem,but still got some kernel panics.
In my device, if I turn off hardware flow offloading, kernel panic may happen almost everyday. As a contrast, kernel panic may happen once a month with harware flow offloading on. Maybe the system crash caused by mt76 driver or other things. But it seems that the hardware flow offloading can alleviate it.

My router is phicomm k2p with with MTK 4.4.2.1 driver.When I enable Hardware NAT,the router may reboot when load average is high.Atfer turning off it,it becomes stable.Now I just enable Flow Offloading

@sotux
Copy link
Contributor

sotux commented Jun 26, 2019

Does this d344591 commit resolve this issue?

@ynezz
Copy link
Member

ynezz commented Jun 26, 2019

@jchulce can you please try to reproduce your issues with latest snapshot images?

@ynezz
Copy link
Member

ynezz commented Jun 26, 2019

Disable it for now.

@jchulce It's disabled by default, isn't it? You need to explicitly enable it.

@sotux
Copy link
Contributor

sotux commented Jun 28, 2019

Still kernel panic if I enabled the hardware flow offload, tested with the latest snapshot

2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.697180] [<8046095c>] __schedule+0x7ac/0x860
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.694579] Call Trace:
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.691986]         ...
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.683289]         805633e0 8050723c 8e19e480 8e254100 8e04fde4 8e798c00 8004a298 80500000
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.674592]         80560000 8004a5e8 8f669a40 8006a250 8e19e480 8e254100 8e04fde4 80560000
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.665870]         80560000 fffffffe 8e798c00 814c0a00 8e798c18 814c0a18 80560000 814c0ba0
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.657175]         80560000 8e86fae0 8e86fae0 8004a0f0 814c0ba0 814c0a18 80560000 814c0ba0
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.648491] Stack : 00000000 00000000 80560000 fffffffe 80560000 8f2257d8 00000000 00000000
2019-06-28,08:46:22,Information,NEWIFI3,kern,kernel,[155053.641034] Workqueue: events_power_efficient nf_flow_dnat_port [nf_flow_table]
2019-06-28,08:46:22,Information,NEWIFI3,kern,kernel,[155053.633735] kworker/3:0     R  running task        0 17615      2 0x00100004
2019-06-28,08:46:22,Information,NEWIFI3,kern,kernel,[155053.630318] Task dump for CPU 3:
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.625211] [<8006b368>] cpu_startup_entry+0x24/0x2c
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.620373] [<80460e04>] schedule_idle+0x40/0x58
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.615679] [<8046095c>] __schedule+0x7ac/0x860
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.613050] Call Trace:
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.610385]         ...
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.601772]         00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.593082]         00000001 8006b368 00000001 00000001 bfbf8000 00000001 00000000 9fc00420
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.584399]         bfbf8000 00000001 00000000 80460e04 00000085 00000001 00000001 00000001
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.575705]         00000000 8006b0ec 11007c03 0000000d 9999999d 8055c0cc 50800400 8000cf90
2019-06-28,08:46:22,Warning,NEWIFI3,kern,kernel,[155053.567004] Stack : bfbf8000 00000001 000010d9 8000cf74 000158df 00000000 8fc5c000 8fc5dee8
2019-06-28,08:46:22,Information,NEWIFI3,kern,kernel,[155053.559696] swapper/1       R  running task        0     0      1 0x00100004
2019-06-28,08:46:22,Information,NEWIFI3,kern,kernel,[155053.556345] Task dump for CPU 1:
2019-06-28,08:46:22,Error,NEWIFI3,kern,kernel,[155053.552200] blocking rcu_node structures:
2019-06-28,08:46:22,Error,NEWIFI3,kern,kernel,[155053.541213] INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 1-... 3-... } 6153 jiffies s: 15721 root: 0xa/.
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.402903] [<8e86f584>] 0x8e86f584
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.396386] [<8f224b04>] flow_offload_add+0x230/0x45c [nf_flow_table]
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.390462] [<8006e670>] queued_spin_lock_slowpath+0x140/0x2e0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.385423] [<8000b5c8>] except_vec_vi_end+0xb8/0xc4
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.380298] [<8024acac>] plat_irq_dispatch+0xfc/0x138
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.376213] [<80464b5c>] do_IRQ+0x1c/0x2c
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.371079] [<80075d10>] generic_handle_irq+0x40/0x58
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.365524] [<8024bc70>] gic_handle_shared_int+0x108/0x164
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.360393] [<80075d10>] generic_handle_irq+0x40/0x58
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.355356] [<8007add0>] handle_edge_irq+0x210/0x268
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.350401] [<80076ae4>] handle_irq_event+0x60/0xac
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.344846] [<80076a40>] handle_irq_event_percpu+0x20/0x64
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.339027] [<8007690c>] __handle_irq_event_percpu+0x78/0x18c
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.333895] [<80015c50>] ipi_call_interrupt+0x10/0x20
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.327637] [<800a35f4>] flush_smp_call_function_queue+0x18c/0x1d8
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.322680] [<8000d2bc>] handle_backtrace+0x10/0x50
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.317555] [<8044e8d4>] nmi_cpu_backtrace+0xc4/0x108
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.313116] [<804479fc>] dump_stack+0x9c/0xe0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.308584] [<80010750>] show_stack+0x58/0x100
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.306048] Call Trace:
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.303519]         ...
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.295080]         8050adc4 8054f420 805089d8 80560000 00000008 80294cb0 00000004 805c0004
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.286644]         00000000 80560000 0003e4d0 70617773 00000000 00000000 80580000 00000001
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.278210]         00000000 00000000 805c0000 00006e88 00000000 00000175 00000008 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.269773]         805087dc 8fc0b83c 8fc3c1fc 8055e8a7 80503658 00000001 8fc0b7e0 ac07f59b
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.261335] Stack : 00000000 80560000 00000001 8007422c 80580000 8053c728 00000000 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.255184] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.130 #0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.251013] PrId  : 0001992f (MIPS 1004Kc)
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.246936] Cause : 50800400 (ExcCode 00)
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.242668] Status: 11007c03	KERNEL EXL IE
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.236430] ra    : 8006e670 queued_spin_lock_slowpath+0x140/0x2e0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.230182] epc   : 8006e70c queued_spin_lock_slowpath+0x1dc/0x2e0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.227216] Lo    : 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.224264] Hi    : 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.218954] $28   : 8fc5c000 8fc0bb60 8eb30000 8006e670
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.213645] $24   : 9fcb029a 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.208337] $20   : 805b9300 8fd3773c 8e86fa80 8fc0bc40
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.203029] $16   : 8e7e147c 814a5300 8055c1e0 00080000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.197723] $12   : 8e6f1500 8e6f1544 80490020 00000001
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.192415] $ 8   : 0000ffff ffff0000 d73b7c60 00000002
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.187107] $ 4   : 00000000 00080000 00ec1456 00ec1456
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.181797] $ 0   : 00000000 00000001 00000000 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.177199] task: 8fc3be80 task.stack: 8fc5c000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.171043] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.130 #0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.167468] NMI backtrace for cpu 1
2019-06-28,08:46:15,Information,NEWIFI3,kern,kernel,[155046.162990] Sending NMI from CPU 2 to CPUs 1:
2019-06-28,08:46:15,Error,NEWIFI3,kern,kernel,"[155046.155987] 	(detected by 2, t=6019 jiffies, g=2649066, c=2649065, q=203)"
2019-06-28,08:46:15,Error,NEWIFI3,kern,kernel,[155046.148404] 	1-...: (1 GPs behind) idle=f82/1/0 softirq=7345883/7345884 fqs=2998
2019-06-28,08:46:15,Error,NEWIFI3,kern,kernel,[155046.142758] INFO: rcu_sched detected stalls on CPUs/tasks:
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.139109] [<8e86f584>] 0x8e86f584
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.132505] [<8f224b04>] flow_offload_add+0x230/0x45c [nf_flow_table]
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.126448] [<8006e670>] queued_spin_lock_slowpath+0x140/0x2e0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.121323] [<8000b5c8>] except_vec_vi_end+0xb8/0xc4
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.116120] [<8024acac>] plat_irq_dispatch+0xfc/0x138
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.111958] [<80464b5c>] do_IRQ+0x1c/0x2c
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.106716] [<80075d10>] generic_handle_irq+0x40/0x58
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.101680] [<8024bcdc>] gic_irq_dispatch+0x10/0x20
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.096304] [<8024bb1c>] gic_handle_local_int+0x9c/0xe8
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.091079] [<80075d10>] generic_handle_irq+0x40/0x58
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.085321] [<8007ba58>] handle_percpu_devid_irq+0xbc/0x1a8
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.079849] [<803131b0>] gic_compare_interrupt+0x70/0x80
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.074436] [<8009bf8c>] tick_handle_periodic+0x34/0xd0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.069023] [<8008b698>] update_process_times+0x34/0x7c
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.063546] [<80088120>] rcu_check_callbacks+0x3b4/0x8b8
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.058169] [<80088cc8>] rcu_dump_cpu_stacks+0xc4/0x13c
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.051915] [<8044e9e0>] nmi_trigger_cpumask_backtrace+0xc8/0x168
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.046711] [<8044e8f4>] nmi_cpu_backtrace+0xe4/0x108
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.042185] [<804479fc>] dump_stack+0x9c/0xe0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.037552] [<80010750>] show_stack+0x58/0x100
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.034908] Call Trace:
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.032311]         ...
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.023690]         805643a0 8055c0d0 000000e0 80560000 00000008 80294cb0 00000004 805c0004
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.015071]         00000000 80560000 000effe6 70617773 00000000 00000000 80580000 00000001
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155046.006456]         00000000 00000000 805c0000 00006220 00000000 00000143 00000008 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155045.997832]         805087dc 8fc0b7fc 8fc3c1fc 8055e8a7 80503658 00000001 8fc0b7a0 ac07f59b
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155045.989209] Stack : 00000000 80560000 00000000 8007422c 80580000 8053c728 00000000 00000000
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155045.983014] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.14.130 #0
2019-06-28,08:46:15,Warning,NEWIFI3,kern,kernel,[155045.979404] NMI backtrace for cpu 1
2019-06-28,08:46:15,Error,NEWIFI3,kern,kernel,[155045.974021] 	 (t=6001 jiffies g=2649066 c=2649065 q=203)
2019-06-28,08:46:15,Error,NEWIFI3,kern,kernel,[155045.966492] 	1-...: (1 GPs behind) idle=f82/2/0 softirq=7345883/7345884 fqs=2998
2019-06-28,08:46:15,Error,NEWIFI3,kern,kernel,[155045.961231] INFO: rcu_sched self-detected stall on CPU

@ptpt52
Copy link
Contributor

ptpt52 commented Jul 25, 2019

report bug log here on my friend MIR3G device:
latest HEAD code

<6>[   44.185606] br-lan: port 2(wlan1) entered listening state
<6>[   44.429943] br-lan: port 3(wlan0) entered learning state
<6>[   46.266867] br-lan: port 2(wlan1) entered learning state
<6>[   46.506462] br-lan: port 3(wlan0) entered forwarding state
<6>[   46.511952] br-lan: topology change detected, propagating
<6>[   48.343503] br-lan: port 2(wlan1) entered forwarding state
<6>[   48.348996] br-lan: topology change detected, propagating
<1>[  128.143783] CPU 2 Unable to handle kernel paging request at virtual address 008730fc, epc == 8007318c, ra == 80073100
<4>[  128.154379] Oops[#1]:
<4>[  128.156646] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.14.132 #0
<4>[  128.162714] task: 8fc3c780 task.stack: 8fc5e000
<4>[  128.167227] $ 0   : 00000000 00000001 00000024 80242e58
<4>[  128.172445] $ 4   : 00000006 000c0000 ffffc83a ffffc83a
<4>[  128.177662] $ 8   : 0000ffff ffff0000 00000002 8f77d280
<4>[  128.182878] $12   : 8e157800 8e157844 804e225c 00000001
<4>[  128.188089] $16   : 8e4f8c7c 81273280 805d01fc 008730fc
<4>[  128.193305] $20   : 000c0000 0000005f 8ef40000 8fd5e000
<4>[  128.198519] $24   : c0a80f96 00000000                  
<4>[  128.203732] $28   : 8fc5e000 8fc0dc78 8c0e0000 80073100
<4>[  128.208943] Hi    : 00000002
<4>[  128.211807] Lo    : aaaaaaac
<4>[  128.214701] epc   : 8007318c queued_spin_lock_slowpath+0x1cc/0x2e0
<4>[  128.220854] ra    : 80073100 queued_spin_lock_slowpath+0x140/0x2e0
<4>[  128.227005] Status: 11007c03	KERNEL EXL IE 
<4>[  128.231181] Cause : c080000c (ExcCode 03)
<4>[  128.235166] BadVA : 008730fc
<4>[  128.238029] PrId  : 0001992f (MIPS 1004Kc)
<4>[  128.242102] Modules linked in: qcserial pppoe ppp_async option l2tp_ppp cdc_mbim usb_wwan sierra_net sierra rndis_host qmi_wwan pptp pppox ppp_mppe ppp_generic nf_nat_pptp nf_conntrack_pptp mt76x2e mt76x2_common mt76x02_lib mt7603e mt76 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE huawei_cdc_ncm cfg80211 cdc_ncm cdc_ether xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_socket xt_recent xt_quota xt_pkttype xt_physdev xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_ipp2p xt_iface xt_hl xt_helper xt_hashlimit xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_addrtype xt_TPROXY xt_TCPMSS xt_REDIRECT xt_NETMAP xt_LOG xt_IPMARK xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY wireguard usbserial usbnet usblp ts_fsm ts_bm slhc r8152
<4>[  128.312466]  nft_set_rbtree nft_set_hash nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject_bridge nft_reject nft_redir nft_quota nft_numgen nft_meta_bridge nft_meta nft_log nft_limit nft_fwd_netdev nft_exthdr nft_dup_netdev nft_ct nft_counter nft_chain_route_ipv6 nft_chain_route_ipv4 nf_tables_netdev nf_tables_ipv6 nf_tables_ipv4 nf_tables_inet nf_tables_bridge nf_tables nf_socket_ipv6 nf_socket_ipv4 nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_rtsp nf_nat_redirect nf_nat_proto_gre nf_nat_masquerade_ipv4 nf_nat_irc nf_conntrack_ipv4 nf_nat_ipv4 nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_dup_netdev nf_defrag_ipv4 nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_rtsp nf_conntrack_rtcache nf_conntrack_proto_gre nf_conntrack_netlink
<4>[  128.384132]  nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast ts_kmp nf_conntrack_amanda macvlan iptable_raw iptable_mangle iptable_filter ipt_ah ipt_ECN ipheth ip_tables crc_itu_t crc_ccitt compat_xtables compat cdc_wdm br_netfilter natflow natcap fuse tcp_bbr sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6t_NPT
<4>[  128.455039]  ip6t_MASQUERADE nf_nat_masquerade_ipv6 nf_nat nf_conntrack ip6t_rt ip6t_mh ip6t_ipv6header ip6t_hbh ip6t_frag ip6t_eui64 ip6t_ah nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 msdos ip6_gre ip_gre gre ifb sit l2tp_netlink l2tp_core udp_tunnel ip6_udp_tunnel ip6_tunnel tunnel6 tunnel4 ip_tunnel tun vfat fat autofs4 nls_utf8 nls_iso8859_1 nls_cp437 sha256_generic sha1_generic seqiv jitterentropy_rng drbg hmac ghash_generic gf128mul gcm ecb ctr cmac uas usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_mtk xhci_hcd ohci_platform ohci_hcd softdog ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug ext4 mbcache jbd2 exfat usbcore nls_base usb_common mii crc32c_generic
<4>[  128.520468] Process swapper/2 (pid: 0, threadinfo=8fc5e000, task=8fc3c780, tls=00000000)
<4>[  128.528518] Stack : 00000000 8dde8b60 8e68b500 8fc0dce8 8e68b500 8c0e14b8 8ef3da78 8e68b500
<4>[  128.536853]         8ef3da80 8dee1800 8e4f8c7c 8e4018e8 00000000 00000000 00000000 00000003
<4>[  128.545190]         8dde8b60 00000000 8fc0dd48 8dde8bd0 8c0e14b8 8e68b500 8ef40000 8ef3d74c
<4>[  128.553527]         8d21c764 00000000 00000000 805d0000 8e201680 00000012 8e201580 00000014
<4>[  128.561867]         8c0e1210 8c0e1498 8d3a4c00 8d21c750 8fe64800 00000000 805d01fc 8ef2d610
<4>[  128.570202]         ...
<4>[  128.572641] Call Trace:
<4>[  128.575094] [<8007318c>] queued_spin_lock_slowpath+0x1cc/0x2e0
<4>[  128.580980] [<8e4018e8>] flow_offload_add+0xb8/0xaf4 [nf_flow_table]
<4>[  128.587326] [<8ef3d74c>] 0x8ef3d74c
<4>[  128.590803] Code: 02629821  02639821  0000000f <10000001> ae710000  8e220004  0000000f  1040fffd  00000000 
<4>[  128.600531] 
<4>[  128.602272] ---[ end trace c2afd633c63087a3 ]---


@adschm
Copy link
Member

adschm commented Aug 15, 2019

(Sorry, off-topic:)

@haswelliris
Hi, I'm currently reviewing the MAC address assignment on ramips target.
For your device (newifi-d2), OpenWrt is currently using MAC address from <&factory 0xe000> and then just calculating WAN address by adding +1 to that.
However, there might be another MAC address stored on flash for your device in <&factory 0xe006>.

Can you check that? If yes, I would also be interested in which of the two addresses should be "lan" and which "wan" then ...

@jchulce
Copy link
Author

jchulce commented Aug 19, 2019

@nbd168 @ynezz I have finally had a chance to try latest snapshot SNAPSHOT r10827-c262daf308 on my UBNT-ERX. I can confirm that IPv6 works properly with no offload, software offload, and on hardware offload. I have not tested snapshot enough to determine stability/kernel panics. Going to close this PR, hopefully the stability gets further investigated elsewhere.

@jchulce jchulce closed this Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target/ramips pull request/issue for ramips target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet