6lowpan: introduce nhc framework
Alexander Aring
maintainerv3 cover 6lowpan: introduce nhc framework
This patch series introduce the next header compression framework. Currently we support udp compression/uncompression only. This framework allow to add new next header compression formats easily.
If somebody wants to add a new header compression format and some information are missing while calling compression and uncompression callbacks. Please feel free to make framework changes according these callbacks.
changes since v2:
- make udp nhc as module as suggested by Marcel Holtmann
- fix comment header in nhc_udp.c
I didn't make the lowpan_nhc declaration "const" because this will occur issues with rb_node, id and idmask array. Which will manipulated during runtime.
changes since v3:
- add patch 3/3 for other known rfc6282 ipv6 extension headers compression formats
- add request_modules for loading nhc default compression format modules. Which was suggested by Jukka Rissanen. Thanks, this is really working.
- Add rtnl_lock for lowpan_nhc_add and del since we have no synced request_modules call this could make trouble.
- Move some handling out of nhc_do_compression and uncompression function. The complete handling is now inside of iphc.c and nhc_do_compression and uncompression functions is only a wrapper call for the callback.
- rework some menuentries for Kconfig and compression format, they are grouped by rfc now.
- move some generic handling like "skb_pull(skb, nhc->nexthdrlen);" into iphc.c. It would be great if we have something also for uncompression for the skb_cow. But this isn't possible right now.
- change warning if nhc was not found to "was not found" instead isn't implemented. It isn't implemented if callbacks are NULL now.
- small cleanups.
Alexander Aring (3):
6lowpan: add generic nhc layer interface 6lowpan: add udp compression via nhc layer 6lowpan: nhc: add other known rfc6282 compressions
net/6lowpan/Kconfig | 60 ++++++++++- net/6lowpan/Makefile | 13 ++- net/6lowpan/iphc.c | 223 +++++++++++----------------------------- net/6lowpan/nhc.c | 140 +++++++++++++++++++++++++ net/6lowpan/nhc.h | 142 +++++++++++++++++++++++++ net/6lowpan/nhc_rfc6282_dest.c | 27 +++++ net/6lowpan/nhc_rfc6282_frag.c | 26 +++++ net/6lowpan/nhc_rfc6282_hop.c | 26 +++++ net/6lowpan/nhc_rfc6282_ipv6.c | 26 +++++ net/6lowpan/nhc_rfc6282_mobil.c | 26 +++++ net/6lowpan/nhc_rfc6282_route.c | 26 +++++ net/6lowpan/nhc_rfc6282_udp.c | 156 ++++++++++++++++++++++++++++ 12 files changed, 724 insertions(+), 167 deletions(-) create mode 100644 net/6lowpan/nhc.c create mode 100644 net/6lowpan/nhc.h create mode 100644 net/6lowpan/nhc_rfc6282_dest.c create mode 100644 net/6lowpan/nhc_rfc6282_frag.c create mode 100644 net/6lowpan/nhc_rfc6282_hop.c create mode 100644 net/6lowpan/nhc_rfc6282_ipv6.c create mode 100644 net/6lowpan/nhc_rfc6282_mobil.c create mode 100644 net/6lowpan/nhc_rfc6282_route.c create mode 100644 net/6lowpan/nhc_rfc6282_udp.c
Signature · 1 line
2.1.3
Alexander Aring
maintainerPATCH v3 1/3 6lowpan: add generic nhc layer interface
This patch adds a generic next header compression layer interface. There exists various methods to do a header compression after 6LoWPAN header to save payload. This introduce a generic nhc header which allow a simple adding of a new header compression format instead of a static implementation inside the 6LoWPAN header compression and uncompression function.
--- net/6lowpan/Makefile | 2 +- net/6lowpan/nhc.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++ net/6lowpan/nhc.h | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 net/6lowpan/nhc.c create mode 100644 net/6lowpan/nhc.h
net/6lowpan/Makefile +1 -1
@@ -1,3 +1,3 @@ obj-$(CONFIG_6LOWPAN) := 6lowpan.o -6lowpan-y := iphc.o +6lowpan-y := iphc.o nhc.o
net/6lowpan/nhc.c new file +140 -0
140 lines not on this page · raw message
net/6lowpan/nhc.h new file +142 -0
142 lines not on this page · raw message
Signature · 1 line
2.1.3
Alexander Aring
maintainerPATCH v3 2/3 6lowpan: add udp compression via nhc layer
In reply to Alexander AringThis patch move UDP header compression and uncompression into the generic 6LoWPAN nhc header compression layer. Moreover this patch activates the nhc layer compression in iphc compression and uncompression functions.
--- net/6lowpan/Kconfig | 16 +++- net/6lowpan/Makefile | 5 +- net/6lowpan/iphc.c | 217 +++++++++++------------------------------- net/6lowpan/nhc_rfc6282_udp.c | 156 ++++++++++++++++++++++++++++++ 4 files changed, 228 insertions(+), 166 deletions(-) create mode 100644 net/6lowpan/nhc_rfc6282_udp.c
net/6lowpan/Kconfig +15 -1
@@ -1,6 +1,20 @@ -config 6LOWPAN +menuconfig 6LOWPAN tristate "6LoWPAN Support" depends on IPV6 ---help--- This enables IPv6 over Low power Wireless Personal Area Network - "6LoWPAN" which is supported by IEEE 802.15.4 or Bluetooth stacks. + +menuconfig 6LOWPAN_NHC_RFC6282 + tristate "NHC RFC6282" + depends on 6LOWPAN + default y + ---help--- + Support for next header compression accroding to RFC6282. + +config 6LOWPAN_NHC_RFC6282_UDP + tristate "UDP Header Support" + depends on 6LOWPAN_NHC_RFC6282 + default y + ---help--- + 6LoWPAN IPv6 UDP Header compression according to RFC6282
net/6lowpan/Makefile +4 -1
@@ -1,3 +1,6 @@ -obj-$(CONFIG_6LOWPAN) := 6lowpan.o +obj-$(CONFIG_6LOWPAN) += 6lowpan.o 6lowpan-y := iphc.o nhc.o + +#rfc6282 nhc +obj-$(CONFIG_6LOWPAN_NHC_RFC6282_UDP) += nhc_rfc6282_udp.o
net/6lowpan/iphc.c +53 -164
268 lines not on this page · raw message
net/6lowpan/nhc_rfc6282_udp.c new file +156 -0
156 lines not on this page · raw message
Signature · 1 line
2.1.3
Alexander Aring
maintainerPATCH v3 3/3 6lowpan: nhc: add other known rfc6282 compressions
In reply to Alexander AringThis patch adds other known rfc6282 compression formats to the nhc framework. These compression formats are known but not implemented yet. For now this is useful to printout a warning which compression format isn't supported.
--- net/6lowpan/Kconfig | 44 +++++++++++++++++++++++++++++++++++++++++ net/6lowpan/Makefile | 6 ++++++ net/6lowpan/iphc.c | 6 ++++++ net/6lowpan/nhc_rfc6282_dest.c | 27 +++++++++++++++++++++++++ net/6lowpan/nhc_rfc6282_frag.c | 26 ++++++++++++++++++++++++ net/6lowpan/nhc_rfc6282_hop.c | 26 ++++++++++++++++++++++++ net/6lowpan/nhc_rfc6282_ipv6.c | 26 ++++++++++++++++++++++++ net/6lowpan/nhc_rfc6282_mobil.c | 26 ++++++++++++++++++++++++ net/6lowpan/nhc_rfc6282_route.c | 26 ++++++++++++++++++++++++ 9 files changed, 213 insertions(+) create mode 100644 net/6lowpan/nhc_rfc6282_dest.c create mode 100644 net/6lowpan/nhc_rfc6282_frag.c create mode 100644 net/6lowpan/nhc_rfc6282_hop.c create mode 100644 net/6lowpan/nhc_rfc6282_ipv6.c create mode 100644 net/6lowpan/nhc_rfc6282_mobil.c create mode 100644 net/6lowpan/nhc_rfc6282_route.c
net/6lowpan/Kconfig +44 -0
@@ -18,3 +18,47 @@ config 6LOWPAN_NHC_RFC6282_UDP default y ---help--- 6LoWPAN IPv6 UDP Header compression according to RFC6282 + +config 6LOWPAN_NHC_RFC6282_DEST + tristate "Destination Options Header Support" + depends on 6LOWPAN_NHC_RFC6282 + default y + ---help--- + 6LoWPAN IPv6 Destination Options Header compression according to + RFC6282. + +config 6LOWPAN_NHC_RFC6282_FRAG + tristate "Fragment Header Support" + depends on 6LOWPAN_NHC_RFC6282 + default y + ---help--- + 6LoWPAN IPv6 Fragment Header compression according to RFC6282. + +config 6LOWPAN_NHC_RFC6282_HOP + tristate "Hop-by-Hop Options Header Support" + depends on 6LOWPAN_NHC_RFC6282 + default y + ---help--- + 6LoWPAN IPv6 Hop-by-Hop Options Header compression according to + RFC6282. + +config 6LOWPAN_NHC_RFC6282_IPV6 + tristate "IPv6 Header Support" + depends on 6LOWPAN_NHC_RFC6282 + default y + ---help--- + 6LoWPAN IPv6 Header compression according to RFC6282. + +config 6LOWPAN_NHC_RFC6282_MOBIL + tristate "Mobility Header Support" + depends on 6LOWPAN_NHC_RFC6282 + default y + ---help--- + 6LoWPAN IPv6 Mobility Header compression according to RFC6282. + +config 6LOWPAN_NHC_RFC6282_ROUTE + tristate "Routing Header Support" + depends on 6LOWPAN_NHC_RFC6282 + default y + ---help--- + 6LoWPAN IPv6 Routing Header compression according to RFC6282.
net/6lowpan/Makefile +6 -0
@@ -4,3 +4,9 @@ obj-$(CONFIG_6LOWPAN) += 6lowpan.o #rfc6282 nhc obj-$(CONFIG_6LOWPAN_NHC_RFC6282_UDP) += nhc_rfc6282_udp.o +obj-$(CONFIG_6LOWPAN_NHC_RFC6282_DEST) += nhc_rfc6282_dest.o +obj-$(CONFIG_6LOWPAN_NHC_RFC6282_FRAG) += nhc_rfc6282_frag.o +obj-$(CONFIG_6LOWPAN_NHC_RFC6282_HOP) += nhc_rfc6282_hop.o +obj-$(CONFIG_6LOWPAN_NHC_RFC6282_IPV6) += nhc_rfc6282_ipv6.o +obj-$(CONFIG_6LOWPAN_NHC_RFC6282_MOBIL) += nhc_rfc6282_mobil.o +obj-$(CONFIG_6LOWPAN_NHC_RFC6282_ROUTE) += nhc_rfc6282_route.o
net/6lowpan/iphc.c +6 -0
@@ -644,6 +644,12 @@ EXPORT_SYMBOL_GPL(lowpan_header_compress);static int __init lowpan_module_init (void ) { +request_module_nowait ("nhc_rfc6282_dest" ); +request_module_nowait ("nhc_rfc6282_frag" ); +request_module_nowait ("nhc_rfc6282_hop" ); +request_module_nowait ("nhc_rfc6282_ipv6" ); +request_module_nowait ("nhc_rfc6282_mobil" ); +request_module_nowait ("nhc_rfc6282_route" );request_module_nowait ("nhc_rfc6282_udp" );return 0 ;
net/6lowpan/nhc_rfc6282_dest.c new file +27 -0
@@ -0,0 +1,27 @@ +/* +* 6LoWPAN IPv6 Destination Options Header compression according to +* RFC6282 +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#include "nhc.h" + +#define LOWPAN_NHC_DEST_IDLEN 1 +#define LOWPAN_NHC_DEST_ID_0 0xe6 +#define LOWPAN_NHC_DEST_MASK_0 0xfe + +static void dest_nhid_setup (struct lowpan_nhc *nhc) +{ + nhc->id[0 ] =LOWPAN_NHC_DEST_ID_0 ; + nhc->idmask[0 ] =LOWPAN_NHC_DEST_MASK_0 ; +} + +LOWPAN_NHC (nhc_dest,"RFC6282 Destination Options" ,NEXTHDR_DEST ,0 , + dest_nhid_setup,LOWPAN_NHC_DEST_IDLEN ,NULL ,NULL ); + +module_lowpan_nhc (nhc_dest); +MODULE_LICENSE ("GPL" );
net/6lowpan/nhc_rfc6282_frag.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* 6LoWPAN IPv6 Fragment Header compression according to RFC6282 +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#include "nhc.h" + +#define LOWPAN_NHC_FRAG_IDLEN 1 +#define LOWPAN_NHC_FRAG_ID_0 0xe4 +#define LOWPAN_NHC_FRAG_MASK_0 0xfe + +static void frag_nhid_setup (struct lowpan_nhc *nhc) +{ + nhc->id[0 ] =LOWPAN_NHC_FRAG_ID_0 ; + nhc->idmask[0 ] =LOWPAN_NHC_FRAG_MASK_0 ; +} + +LOWPAN_NHC (nhc_frag,"RFC6282 Fragment" ,NEXTHDR_FRAGMENT ,0 , + frag_nhid_setup,LOWPAN_NHC_FRAG_IDLEN ,NULL ,NULL ); + +module_lowpan_nhc (nhc_frag); +MODULE_LICENSE ("GPL" );
net/6lowpan/nhc_rfc6282_hop.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* 6LoWPAN IPv6 Hop-by-Hop Options Header compression according to RFC6282 +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#include "nhc.h" + +#define LOWPAN_NHC_HOP_IDLEN 1 +#define LOWPAN_NHC_HOP_ID_0 0xe0 +#define LOWPAN_NHC_HOP_MASK_0 0xfe + +static void hop_nhid_setup (struct lowpan_nhc *nhc) +{ + nhc->id[0 ] =LOWPAN_NHC_HOP_ID_0 ; + nhc->idmask[0 ] =LOWPAN_NHC_HOP_MASK_0 ; +} + +LOWPAN_NHC (nhc_hop,"RFC6282 Hop-by-Hop Options" ,NEXTHDR_HOP ,0 , + hop_nhid_setup,LOWPAN_NHC_HOP_IDLEN ,NULL ,NULL ); + +module_lowpan_nhc (nhc_hop); +MODULE_LICENSE ("GPL" );
net/6lowpan/nhc_rfc6282_ipv6.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* 6LoWPAN IPv6 Header compression according to RFC6282 +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#include "nhc.h" + +#define LOWPAN_NHC_IPV6_IDLEN 1 +#define LOWPAN_NHC_IPV6_ID_0 0xee +#define LOWPAN_NHC_IPV6_MASK_0 0xfe + +static void ipv6_nhid_setup (struct lowpan_nhc *nhc) +{ + nhc->id[0 ] =LOWPAN_NHC_IPV6_ID_0 ; + nhc->idmask[0 ] =LOWPAN_NHC_IPV6_MASK_0 ; +} + +LOWPAN_NHC (nhc_ipv6,"RFC6282 IPv6" ,NEXTHDR_IPV6 ,0 , ipv6_nhid_setup, +LOWPAN_NHC_IPV6_IDLEN ,NULL ,NULL ); + +module_lowpan_nhc (nhc_ipv6); +MODULE_LICENSE ("GPL" );
net/6lowpan/nhc_rfc6282_mobil.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* 6LoWPAN IPv6 Mobility Header compression according to RFC6282 +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#include "nhc.h" + +#define LOWPAN_NHC_MOBIL_IDLEN 1 +#define LOWPAN_NHC_MOBIL_ID_0 0xe8 +#define LOWPAN_NHC_MOBIL_MASK_0 0xfe + +static void mobil_nhid_setup (struct lowpan_nhc *nhc) +{ + nhc->id[0 ] =LOWPAN_NHC_MOBIL_ID_0 ; + nhc->idmask[0 ] =LOWPAN_NHC_MOBIL_MASK_0 ; +} + +LOWPAN_NHC (nhc_mobil,"RFC6282 Mobility" ,NEXTHDR_MOBILITY ,0 , + mobil_nhid_setup,LOWPAN_NHC_MOBIL_IDLEN ,NULL ,NULL ); + +module_lowpan_nhc (nhc_mobil); +MODULE_LICENSE ("GPL" );
net/6lowpan/nhc_rfc6282_route.c new file +26 -0
@@ -0,0 +1,26 @@ +/* +* 6LoWPAN IPv6 Routing Header compression according to RFC6282 +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version +* 2 of the License, or (at your option) any later version. +*/ + +#include "nhc.h" + +#define LOWPAN_NHC_ROUTE_IDLEN 1 +#define LOWPAN_NHC_ROUTE_ID_0 0xe2 +#define LOWPAN_NHC_ROUTE_MASK_0 0xfe + +static void route_nhid_setup (struct lowpan_nhc *nhc) +{ + nhc->id[0 ] =LOWPAN_NHC_ROUTE_ID_0 ; + nhc->idmask[0 ] =LOWPAN_NHC_ROUTE_MASK_0 ; +} + +LOWPAN_NHC (nhc_route,"RFC6282 Routing" ,NEXTHDR_ROUTING ,0 , route_nhid_setup, +LOWPAN_NHC_ROUTE_IDLEN ,NULL ,NULL ); + +module_lowpan_nhc (nhc_route); +MODULE_LICENSE ("GPL" );
Signature · 1 line
2.1.3
Re: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Hi Alex,
the module unloading caused some issues in the receiving end.
I tried this:
* setup bluetooth 6lowpan connection
* transfer some UDP data
* unload the nhc_rfc6282_udp module (in one peer only, the other still had udp nhc module loaded)
* try to send more data
This caused kernel crash in peer that had udp module unloaded:
[ 154.430480] (NULL net_device): received unknown nhc id which was not found. [ 154.846307] kmemleak: Cannot insert 0xcc4e2c00 into the object search tree (overlaps existing) [ 154.847036] CPU: 0 PID: 291 Comm: systemd-journal Not tainted 3.17.0-bt6lowpan #2 [ 154.847036] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 154.847036] cc4e2c00 00000000 ce06fd34 c1898b02 cd096320 ce06fd68 c11716ac c1afdb94 [ 154.847036] cc4e2c00 00000286 cd09634c 0000000e 00000010 cd09638c 00000000 000000d0 [ 154.847036] cf001c00 cf001c00 ce06fd9c c1895ac8 000000d0 ce06fd80 c10729cb 00000001 [ 154.847036] Call Trace: [ 154.847036] [<c1898b02>] dump_stack+0x4b/0x75 [ 154.847036] [<c11716ac>] create_object+0x22c/0x280 [ 154.847036] [<c1895ac8>] kmemleak_alloc+0x38/0xb0 [ 154.847036] [<c10729cb>] ? get_parent_ip+0xb/0x40 [ 154.847036] [<c1072a4b>] ? preempt_count_add+0x4b/0xa0 [ 154.847036] [<c1165123>] kmem_cache_alloc_trace+0x1c3/0x2a0 [ 154.847036] [<c1196674>] ? seq_open+0xa4/0xc0 [ 154.847036] [<c1196674>] seq_open+0xa4/0xc0 [ 154.847036] [<c11c7750>] ? proc_setattr+0x50/0x50 [ 154.847036] [<c1196f1f>] single_open+0x4f/0x90 [ 154.847036] [<c11c8749>] proc_single_open+0x19/0x20 [ 154.847036] [<c1172ecc>] do_dentry_open+0x19c/0x2d0 [ 154.847036] [<c11c8730>] ? sched_open+0x20/0x20 [ 154.847036] [<c117354b>] finish_open+0x2b/0x50 [ 154.847036] [<c118249a>] do_last.isra.40+0x5fa/0xcc0 [ 154.847036] [<c117fa1e>] ? link_path_walk+0x5e/0x790 [ 154.847036] [<c1182c06>] path_openat+0xa6/0x5c0 [ 154.847036] [<c13e0112>] ? debug_smp_processor_id+0x12/0x20 [ 154.847036] [<c11842b1>] do_filp_open+0x31/0x90 [ 154.847036] [<c1174727>] do_sys_open+0x117/0x210 [ 154.847036] [<c18a192f>] ? restore_all+0xf/0xf [ 154.847036] [<c13e012f>] ? __this_cpu_preempt_check+0xf/0x20 [ 154.847036] [<c1080000>] ? pick_next_task_fair+0x340/0x550 [ 154.847036] [<c1174842>] SyS_open+0x22/0x30 [ 154.847036] [<c18a18f6>] syscall_call+0x7/0x7 [ 154.847036] [<c18a0000>] ? __account_scheduler_latency+0x60/0x2a0 [ 154.847036] kmemleak: Kernel memory leak detector disabled [ 154.847036] kmemleak: Object 0xcc4e2c00 (size 192): [ 154.847036] kmemleak: comm "systemd-journal", pid 291, jiffies 4294822142 [ 154.847036] kmemleak: min_count = 1 [ 154.847036] kmemleak: count = 0 [ 154.847036] kmemleak: flags = 0x1 [ 154.847036] kmemleak: checksum = 0 [ 154.847036] kmemleak: backtrace: [ 154.847036] [<c1895ac8>] kmemleak_alloc+0x38/0xb0 [ 154.847036] [<c1164e83>] kmem_cache_alloc+0x1c3/0x2a0 [ 154.847036] [<c177a5d1>] __alloc_skb+0x41/0x1b0 [ 154.847036] [<c177a84b>] alloc_skb_with_frags+0x4b/0x1c0 [ 154.847036] [<c177394a>] sock_alloc_send_pskb+0x1aa/0x210 [ 154.847036] [<c1826d28>] unix_dgram_sendmsg+0x138/0x560 [ 154.847036] [<c17702b9>] sock_sendmsg+0x59/0x80 [ 154.847036] [<c177179f>] ___sys_sendmsg.part.30+0x2df/0x2f0 [ 154.847036] [<c1772724>] __sys_sendmsg+0x44/0x80 [ 154.847036] [<c1772d80>] SyS_socketcall+0xd0/0x2b0 [ 154.847036] [<c18a18f6>] syscall_after_call+0x0/0x4 [ 154.847036] [<ffffffff>] 0xffffffff [ 172.825327] Clocksource tsc unstable (delta = 14060914275 ns) [ 173.175027] INFO: trying to register non-static key. [ 173.175694] the code is fine but needs lockdep annotation. [ 173.175694] turning off the locking correctness validator. [ 173.175694] CPU: 0 PID: 378 Comm: syslogd Not tainted 3.17.0-bt6lowpan #2 [ 173.175694] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 173.175694] 00000000 00000000 cd669cf4 c1898b02 c22f0890 cd669d70 c109412a c1ae4b78 [ 173.175694] cf794500 c1ead500 00000000 cd669d44 c107770f 00000000 007b23e7 00000000 [ 173.175694] c1ead500 00004a25 00004a25 c1d67cc0 00000000 cc4e58e8 c13e0112 cd669d4c [ 173.175694] Call Trace: [ 173.175694] [<c1898b02>] dump_stack+0x4b/0x75 [ 173.175694] [<c109412a>] __lock_acquire+0x189a/0x1d20 [ 173.175694] [<c107770f>] ? sched_clock_cpu+0x10f/0x160 [ 173.175694] [<c13e0112>] ? debug_smp_processor_id+0x12/0x20 [ 173.175694] [<c108e584>] ? get_lock_stats+0x24/0x40 [ 173.175694] [<c189fa95>] ? schedule_timeout+0x145/0x200 [ 173.175694] [<c1090a34>] ? mark_held_locks+0x64/0x90 [ 173.175694] [<c1094c56>] lock_acquire+0xb6/0x170 [ 173.175694] [<c177e385>] ? __skb_recv_datagram+0x65/0x480 [ 173.175694] [<c18a0899>] _raw_spin_lock_irqsave+0x59/0x90 [ 173.175694] [<c177e385>] ? __skb_recv_datagram+0x65/0x480 [ 173.175694] [<c177e385>] __skb_recv_datagram+0x65/0x480 [ 173.175694] [<c1090cab>] ? trace_hardirqs_on+0xb/0x10 [ 173.175694] [<c177e7e0>] ? skb_recv_datagram+0x40/0x40 [ 173.175694] [<c182747f>] unix_dgram_recvmsg+0x7f/0x3e0 [ 173.175694] [<c1770f06>] sock_aio_read+0xc6/0x100 [ 173.175694] [<c10bde45>] ? clockevents_program_event+0xa5/0x150 [ 173.175694] [<c1174ce7>] do_sync_read+0x57/0x90 [ 173.175694] [<c1175878>] vfs_read+0x108/0x140 [ 173.175694] [<c1175e22>] SyS_read+0x52/0xb0 [ 173.175694] [<c18a18f6>] syscall_call+0x7/0x7 [ 173.175694] BUG: unable to handle kernel NULL pointer dereference at 0000006a [ 173.175694] IP: [<c177e397>] __skb_recv_datagram+0x77/0x480 [ 173.175694] *pde = 00000000 [ 173.175694] Oops: 0000 [#1] PREEMPT SMP [ 173.175694] Modules linked in: nhc_rfc6282_route nhc_rfc6282_dest
bluetooth_6lowpan nhc_rfc6282_mobil nhc_rfc6282_frag nhc_rfc6282_hop nhc_rfc6282_ipv6 6lowpan ecb btusb bluetooth nfc rfkill snd_intel8x0 snd_ac97_codec ohci_pci ac97_bus parport_pc parport uvesafb [last
unloaded: nhc_rfc6282_udp]
Cheers,
Jukka
Re: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Quoted 3 lines · Jukka Rissanen
Hi Alex,
the module unloading caused some issues in the receiving end.
After more debugging, it was not necessary to unload the module. Just removing the module file so that it is not loaded at all caused this crash when UDP data was received.
Unloading the UDP nhc module in both peers works as expected. It is just this unbalanced case that does not work.
Quoted 115 lines
I tried this:
* setup bluetooth 6lowpan connection
* transfer some UDP data
* unload thenhc_rfc6282_udpmodule (in one peer only, the other still had udp nhc module loaded)
* try to send more dataThis caused kernel crash in peer that had udp module unloaded:
[ 154.430480] (NULL net_device): received unknown nhc id which was not found. [ 154.846307] kmemleak: Cannot insert 0xcc4e2c00 into the object search tree (overlaps existing) [ 154.847036] CPU: 0 PID: 291 Comm: systemd-journal Not tainted 3.17.0-bt6lowpan #2 [ 154.847036] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 154.847036] cc4e2c00 00000000 ce06fd34 c1898b02 cd096320 ce06fd68 c11716ac c1afdb94 [ 154.847036] cc4e2c00 00000286 cd09634c 0000000e 00000010 cd09638c 00000000 000000d0 [ 154.847036] cf001c00 cf001c00 ce06fd9c c1895ac8 000000d0 ce06fd80 c10729cb 00000001 [ 154.847036] Call Trace: [ 154.847036] [<c1898b02>] dump_stack+0x4b/0x75 [ 154.847036] [<c11716ac>] create_object+0x22c/0x280 [ 154.847036] [<c1895ac8>] kmemleak_alloc+0x38/0xb0 [ 154.847036] [<c10729cb>] ? get_parent_ip+0xb/0x40 [ 154.847036] [<c1072a4b>] ? preempt_count_add+0x4b/0xa0 [ 154.847036] [<c1165123>] kmem_cache_alloc_trace+0x1c3/0x2a0 [ 154.847036] [<c1196674>] ? seq_open+0xa4/0xc0 [ 154.847036] [<c1196674>] seq_open+0xa4/0xc0 [ 154.847036] [<c11c7750>] ? proc_setattr+0x50/0x50 [ 154.847036] [<c1196f1f>] single_open+0x4f/0x90 [ 154.847036] [<c11c8749>] proc_single_open+0x19/0x20 [ 154.847036] [<c1172ecc>] do_dentry_open+0x19c/0x2d0 [ 154.847036] [<c11c8730>] ? sched_open+0x20/0x20 [ 154.847036] [<c117354b>] finish_open+0x2b/0x50 [ 154.847036] [<c118249a>] do_last.isra.40+0x5fa/0xcc0 [ 154.847036] [<c117fa1e>] ? link_path_walk+0x5e/0x790 [ 154.847036] [<c1182c06>] path_openat+0xa6/0x5c0 [ 154.847036] [<c13e0112>] ? debug_smp_processor_id+0x12/0x20 [ 154.847036] [<c11842b1>] do_filp_open+0x31/0x90 [ 154.847036] [<c1174727>] do_sys_open+0x117/0x210 [ 154.847036] [<c18a192f>] ? restore_all+0xf/0xf [ 154.847036] [<c13e012f>] ? __this_cpu_preempt_check+0xf/0x20 [ 154.847036] [<c1080000>] ? pick_next_task_fair+0x340/0x550 [ 154.847036] [<c1174842>] SyS_open+0x22/0x30 [ 154.847036] [<c18a18f6>] syscall_call+0x7/0x7 [ 154.847036] [<c18a0000>] ? __account_scheduler_latency+0x60/0x2a0 [ 154.847036] kmemleak: Kernel memory leak detector disabled [ 154.847036] kmemleak: Object 0xcc4e2c00 (size 192): [ 154.847036] kmemleak: comm "systemd-journal", pid 291, jiffies 4294822142 [ 154.847036] kmemleak: min_count = 1 [ 154.847036] kmemleak: count = 0 [ 154.847036] kmemleak: flags = 0x1 [ 154.847036] kmemleak: checksum = 0 [ 154.847036] kmemleak: backtrace: [ 154.847036] [<c1895ac8>] kmemleak_alloc+0x38/0xb0 [ 154.847036] [<c1164e83>] kmem_cache_alloc+0x1c3/0x2a0 [ 154.847036] [<c177a5d1>] __alloc_skb+0x41/0x1b0 [ 154.847036] [<c177a84b>] alloc_skb_with_frags+0x4b/0x1c0 [ 154.847036] [<c177394a>] sock_alloc_send_pskb+0x1aa/0x210 [ 154.847036] [<c1826d28>] unix_dgram_sendmsg+0x138/0x560 [ 154.847036] [<c17702b9>] sock_sendmsg+0x59/0x80 [ 154.847036] [<c177179f>] ___sys_sendmsg.part.30+0x2df/0x2f0 [ 154.847036] [<c1772724>] __sys_sendmsg+0x44/0x80 [ 154.847036] [<c1772d80>] SyS_socketcall+0xd0/0x2b0 [ 154.847036] [<c18a18f6>] syscall_after_call+0x0/0x4 [ 154.847036] [<ffffffff>] 0xffffffff [ 172.825327] Clocksource tsc unstable (delta = 14060914275 ns) [ 173.175027] INFO: trying to register non-static key. [ 173.175694] the code is fine but needs lockdep annotation. [ 173.175694] turning off the locking correctness validator. [ 173.175694] CPU: 0 PID: 378 Comm: syslogd Not tainted 3.17.0-bt6lowpan #2 [ 173.175694] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 173.175694] 00000000 00000000 cd669cf4 c1898b02 c22f0890 cd669d70 c109412a c1ae4b78 [ 173.175694] cf794500 c1ead500 00000000 cd669d44 c107770f 00000000 007b23e7 00000000 [ 173.175694] c1ead500 00004a25 00004a25 c1d67cc0 00000000 cc4e58e8 c13e0112 cd669d4c [ 173.175694] Call Trace: [ 173.175694] [<c1898b02>] dump_stack+0x4b/0x75 [ 173.175694] [<c109412a>] __lock_acquire+0x189a/0x1d20 [ 173.175694] [<c107770f>] ? sched_clock_cpu+0x10f/0x160 [ 173.175694] [<c13e0112>] ? debug_smp_processor_id+0x12/0x20 [ 173.175694] [<c108e584>] ? get_lock_stats+0x24/0x40 [ 173.175694] [<c189fa95>] ? schedule_timeout+0x145/0x200 [ 173.175694] [<c1090a34>] ? mark_held_locks+0x64/0x90 [ 173.175694] [<c1094c56>] lock_acquire+0xb6/0x170 [ 173.175694] [<c177e385>] ? __skb_recv_datagram+0x65/0x480 [ 173.175694] [<c18a0899>] _raw_spin_lock_irqsave+0x59/0x90 [ 173.175694] [<c177e385>] ? __skb_recv_datagram+0x65/0x480 [ 173.175694] [<c177e385>] __skb_recv_datagram+0x65/0x480 [ 173.175694] [<c1090cab>] ? trace_hardirqs_on+0xb/0x10 [ 173.175694] [<c177e7e0>] ? skb_recv_datagram+0x40/0x40 [ 173.175694] [<c182747f>] unix_dgram_recvmsg+0x7f/0x3e0 [ 173.175694] [<c1770f06>] sock_aio_read+0xc6/0x100 [ 173.175694] [<c10bde45>] ? clockevents_program_event+0xa5/0x150 [ 173.175694] [<c1174ce7>] do_sync_read+0x57/0x90 [ 173.175694] [<c1175878>] vfs_read+0x108/0x140 [ 173.175694] [<c1175e22>] SyS_read+0x52/0xb0 [ 173.175694] [<c18a18f6>] syscall_call+0x7/0x7 [ 173.175694] BUG: unable to handle kernel NULL pointer dereference at 0000006a [ 173.175694] IP: [<c177e397>] __skb_recv_datagram+0x77/0x480 [ 173.175694] *pde = 00000000 [ 173.175694] Oops: 0000 [#1] PREEMPT SMP [ 173.175694] Modules linked in: nhc_rfc6282_route nhc_rfc6282_dest
Quoted 5 lines
bluetooth_6lowpannhc_rfc6282_mobilnhc_rfc6282_fragnhc_rfc6282_hopnhc_rfc6282_ipv66lowpan ecb btusb bluetooth nfc rfkillsnd_intel8x0snd_ac97_codecohci_pciac97_busparport_pcparport uvesafb [last
unloaded:nhc_rfc6282_udp]
Cheers,
Jukka
Alexander Aring
maintainerRe: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
In reply to Jukka RissanenHi Jukka,
Quoted 4 lines · Jukka Rissanen
Hi Alex,
the module unloading caused some issues in the receiving end.
Quoted 10 lines
I tried this:
* setup bluetooth 6lowpan connection
* transfer some UDP data
* unload thenhc_rfc6282_udpmodule (in one peer only, the other still had udp nhc module loaded)
* try to send more dataThis caused kernel crash in peer that had udp module unloaded:
mhh, okay. I don't know why this happens also the log gave me not much information, but thanks anyway.
Maybe this is a global issue with bluetooth 6LoWPAN error handling.
Can you simple do something like this:
net/6lowpan/iphc.c +2 -0
@@ -425,6 +425,8 @@ lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,return -EINVAL ; } +return -EINVAL ; +/* UDP data uncompression */ if (iphc0 &LOWPAN_IPHC_NH_C ) {struct udphdr uh;
based on current bluetooth-next/master without the NHC framework.
This should be working, maybe you never hit any error while calling lowpan_header_decompress function. It's simple testing the error handling not more.
Do this please on one node, the other node should send some 6LoWPAN IPHC packets to check if the error handling working there.
Another issue is that I see that skb->dev isn't set before calling lowpan_header_decompress. Because inside your log is a "NULL":
(NULL net_device): received unknown nhc id which was not found.
Can you change that? That skb->dev is set to before calling lowpan_header_decompress.
btw: 802154 has also issues with that the dev is a wpan interface but should be a lowpan interface. It's a complicated issue because we support more than one lowpan interface at the same time for _one_ wpan interface. I will change that later because this has not any useful usecase at the moment. The new behaviour is then _one_ wpan interface -> _one_ lowpan interface.
First we need to know if global error handling is working there. Another solution for the NULL string would be "don't using netdev_foo printouts, but then nobody knows which interface has this issue.
- Alex
Re: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Hi Alex,
Quoted 40 lines · Alexander Aring
Hi Jukka,
Quoted 4 lines · Jukka Rissanen
Hi Alex,
the module unloading caused some issues in the receiving end.
Quoted 10 lines
I tried this:
* setup bluetooth 6lowpan connection
* transfer some UDP data
* unload thenhc_rfc6282_udpmodule (in one peer only, the other still had udp nhc module loaded)
* try to send more dataThis caused kernel crash in peer that had udp module unloaded:
mhh, okay. I don't know why this happens also the log gave me not much information, but thanks anyway.
Maybe this is a global issue with bluetooth 6LoWPAN error handling.
Can you simple do something like this:
net/6lowpan/iphc.c +2
-0@@ -425,6 +425,8 @@ lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,return -EINVAL ; } +return -EINVAL ; +/* UDP data uncompression */ if (iphc0 &LOWPAN_IPHC_NH_C ) {struct udphdr uh;
Quoted 5 lines
based on current bluetooth-next/master without the NHC framework.
This should be working, maybe you never hit any error while calling
lowpan_header_decompressfunction. It's simple testing the error handling not more.
Hmm, I get the same crash here also without this patchset. So something goes wrong if <0 code is returned.
Quoted 8 lines
Do this please on one node, the other node should send some 6LoWPAN IPHC packets to check if the error handling working there.
Quoted 7 lines
Another issue is that I see that
skb->devisn't set before callinglowpan_header_decompress. Because inside your log is a "NULL":(NULL
net_device): received unknown nhc id which was not found.Can you change that? That
skb->devis set to before callinglowpan_header_decompress.
I am setting the skb->dev after the call to lowpan_header_decompress(). And anyway the skb->dev is only used when printing the err. Actually should we replace the skb->dev in lowpan_header_decompress() with plain dev as that is given to the function as a parameter.
Quoted 9 lines
btw: 802154 has also issues with that the dev is a wpan interface but should be a lowpan interface. It's a complicated issue because we support more than one lowpan interface at the same time for _one_ wpan interface. I will change that later because this has not any useful usecase at the moment. The new behaviour is then _one_ wpan interface -> _one_ lowpan interface.
Quoted 5 lines
First we need to know if global error handling is working there. Another solution for the NULL string would be "don't using
netdev_fooprintouts, but then nobody knows which interface has this issue.- Alex
Cheers,
Jukka
Alexander Aring
maintainerRe: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Hi Jukka,
Quoted 43 lines · Jukka Rissanen
Hi Alex,
Quoted 40 lines · Alexander Aring
Hi Jukka,
Quoted 4 lines · Jukka Rissanen
Hi Alex,
the module unloading caused some issues in the receiving end.
Quoted 10 lines
I tried this:
* setup bluetooth 6lowpan connection
* transfer some UDP data
* unload thenhc_rfc6282_udpmodule (in one peer only, the other still had udp nhc module loaded)
* try to send more dataThis caused kernel crash in peer that had udp module unloaded:
mhh, okay. I don't know why this happens also the log gave me not much information, but thanks anyway.
Maybe this is a global issue with bluetooth 6LoWPAN error handling.
Can you simple do something like this:
net/6lowpan/iphc.c +2
-0@@ -425,6 +425,8 @@ lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,return -EINVAL ; } +return -EINVAL ; +/* UDP data uncompression */ if (iphc0 &LOWPAN_IPHC_NH_C ) {struct udphdr uh;
Quoted 9 lines
Quoted 5 lines
based on current bluetooth-next/master without the NHC framework.
This should be working, maybe you never hit any error while calling
lowpan_header_decompressfunction. It's simple testing the error handling not more.Hmm, I get the same crash here also without this patchset. So something goes wrong if <0 code is returned.
Okay, do you already working on it?
Quoted 13 lines
Quoted 13 lines
Do this please on one node, the other node should send some 6LoWPAN IPHC packets to check if the error handling working there.
Another issue is that I see that
skb->devisn't set before callinglowpan_header_decompress. Because inside your log is a "NULL":(NULL
net_device): received unknown nhc id which was not found.
Quoted 8 lines
Quoted 2 lines
Can you change that? That
skb->devis set to before callinglowpan_header_decompress.I am setting the
skb->devafter the call tolowpan_header_decompress(). And anyway theskb->devis only used when printing the err. Actually should we replace theskb->devinlowpan_header_decompress()with plain dev as that is given to the function as a parameter.
Ok, how we introduce this now? You wanna add this do the patch series for fixing the above issue, or should I add it to my patch series for introduce nhc framework?
- Alex
Re: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Hi Alex,
Quoted 56 lines · Alexander Aring
Hi Jukka,
Quoted 43 lines · Jukka Rissanen
Hi Alex,
Quoted 40 lines · Alexander Aring
Hi Jukka,
Quoted 4 lines · Jukka Rissanen
Hi Alex,
the module unloading caused some issues in the receiving end.
Quoted 10 lines
I tried this:
* setup bluetooth 6lowpan connection
* transfer some UDP data
* unload thenhc_rfc6282_udpmodule (in one peer only, the other still had udp nhc module loaded)
* try to send more dataThis caused kernel crash in peer that had udp module unloaded:
mhh, okay. I don't know why this happens also the log gave me not much information, but thanks anyway.
Maybe this is a global issue with bluetooth 6LoWPAN error handling.
Can you simple do something like this:
net/6lowpan/iphc.c +2
-0@@ -425,6 +425,8 @@ lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,return -EINVAL ; } +return -EINVAL ; +/* UDP data uncompression */ if (iphc0 &LOWPAN_IPHC_NH_C ) {struct udphdr uh;Quoted 9 lines
Quoted 5 lines
based on current bluetooth-next/master without the NHC framework.
This should be working, maybe you never hit any error while calling
lowpan_header_decompressfunction. It's simple testing the error handling not more.Hmm, I get the same crash here also without this patchset. So something goes wrong if <0 code is returned.
Quoted 1 line
Okay, do you already working on it?
Yes, I will investigate this.
Quoted 23 lines
Quoted 14 lines
Quoted 14 lines
Do this please on one node, the other node should send some 6LoWPAN IPHC packets to check if the error handling working there.
Another issue is that I see that
skb->devisn't set before callinglowpan_header_decompress. Because inside your log is a "NULL":(NULL
net_device): received unknown nhc id which was not found.Quoted 8 lines
Quoted 2 lines
Can you change that? That
skb->devis set to before callinglowpan_header_decompress.I am setting the
skb->devafter the call tolowpan_header_decompress(). And anyway theskb->devis only used when printing the err. Actually should we replace theskb->devinlowpan_header_decompress()with plain dev as that is given to the function as a parameter.
Quoted 3 lines
Ok, how we introduce this now? You wanna add this do the patch series for fixing the above issue, or should I add it to my patch series for introduce nhc framework?
I am fine with either. If you have time, please go ahead and send a patch or I can do it also after figuring what is causing the crash.
Cheers,
Jukka
Re: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Quoted 59 lines · Jukka Rissanen
Hi Alex,
Quoted 56 lines · Alexander Aring
Hi Jukka,
Quoted 52 lines · Jukka Rissanen
Hi Alex,
Quoted 40 lines · Alexander Aring
Hi Jukka,
Quoted 4 lines · Jukka Rissanen
Hi Alex,
the module unloading caused some issues in the receiving end.
Quoted 10 lines
I tried this:
* setup bluetooth 6lowpan connection
* transfer some UDP data
* unload thenhc_rfc6282_udpmodule (in one peer only, the other still had udp nhc module loaded)
* try to send more dataThis caused kernel crash in peer that had udp module unloaded:
mhh, okay. I don't know why this happens also the log gave me not much information, but thanks anyway.
Maybe this is a global issue with bluetooth 6LoWPAN error handling.
Can you simple do something like this:
net/6lowpan/iphc.c +2
-0@@ -425,6 +425,8 @@ lowpan_header_decompress(struct sk_buff *skb, struct net_device *dev,return -EINVAL ; } +return -EINVAL ; +/* UDP data uncompression */ if (iphc0 &LOWPAN_IPHC_NH_C ) {struct udphdr uh;Quoted 5 lines
based on current bluetooth-next/master without the NHC framework.
This should be working, maybe you never hit any error while calling
lowpan_header_decompressfunction. It's simple testing the error handling not more.Hmm, I get the same crash here also without this patchset. So something goes wrong if <0 code is returned.
Quoted 3 lines
Quoted 1 line
Okay, do you already working on it?
Yes, I will investigate this.
Found the problem, in bt 6lowpan the skb that was freed was still used by network stack. I will send a patch for this soon.
Quoted 24 lines
Quoted 24 lines
Quoted 23 lines
Quoted 10 lines
Do this please on one node, the other node should send some 6LoWPAN IPHC packets to check if the error handling working there.
Quoted 7 lines
Another issue is that I see that
skb->devisn't set before callinglowpan_header_decompress. Because inside your log is a "NULL":(NULL
net_device): received unknown nhc id which was not found.Can you change that? That
skb->devis set to before callinglowpan_header_decompress.I am setting the
skb->devafter the call tolowpan_header_decompress(). And anyway theskb->devis only used when printing the err. Actually should we replace theskb->devinlowpan_header_decompress()with plain dev as that is given to the function as a parameter.
Quoted 6 lines
Quoted 3 lines
Ok, how we introduce this now? You wanna add this do the patch series for fixing the above issue, or should I add it to my patch series for introduce nhc framework?
I am fine with either. If you have time, please go ahead and send a patch or I can do it also after figuring what is causing the crash.
After second though, can you do the change as actually what I had in mind was to change the
netdev_warn(skb->dev, ...)
to
netdev_warn(dev, ...)and that code is part of patch 2 of your patchset.
Another thing I noticed is that we need to rate limit the output as now it might be that the warning is printed for every udp packet which is way too much.
Cheers,
Jukka
Alexander Aring
maintainerRe: [PATCHv3 bluetooth-next 3/3] 6lowpan: nhc: add other known rfc6282 compressions
Hi Jukka,
Quoted 4 lines · Jukka Rissanen
Found the problem, in bt 6lowpan the skb that was freed was still used by network stack. I will send a patch for this soon.
ok.
Quoted 38 lines
Quoted 24 lines
Quoted 24 lines
Quoted 23 lines
Quoted 10 lines
Do this please on one node, the other node should send some 6LoWPAN IPHC packets to check if the error handling working there.
Quoted 7 lines
Another issue is that I see that
skb->devisn't set before callinglowpan_header_decompress. Because inside your log is a "NULL":(NULL
net_device): received unknown nhc id which was not found.Can you change that? That
skb->devis set to before callinglowpan_header_decompress.I am setting the
skb->devafter the call tolowpan_header_decompress(). And anyway theskb->devis only used when printing the err. Actually should we replace theskb->devinlowpan_header_decompress()with plain dev as that is given to the function as a parameter.Quoted 6 lines
Quoted 3 lines
Ok, how we introduce this now? You wanna add this do the patch series for fixing the above issue, or should I add it to my patch series for introduce nhc framework?
I am fine with either. If you have time, please go ahead and send a patch or I can do it also after figuring what is causing the crash.
After second though, can you do the change as actually what I had in mind was to change the
netdev_warn(skb->dev, ...) to netdev_warn(dev, ...)
Quoted 6 lines
and that code is part of patch 2 of your patchset.
Another thing I noticed is that we need to rate limit the output as now it might be that the warning is printed for every udp packet which is way too much.
ok. Or maybe simple remove the output, or make it only visable on debugging. I don't really know what's the best notice for use that the packet was dropping because invalid/unsupported packets.
I will do it to ratelimit and add patches for the netdev_warn(dev, ...) thing. Currently I am working a little bit on the 802154 branch again.
I will start this work when you are done with the above fix.
- Alex