]> git.baikalelectronics.ru Git - kernel.git/commit
net: 6lowpan: use array for find nhc id
authorAlexander Aring <aahringo@redhat.com>
Thu, 28 Apr 2022 03:05:33 +0000 (23:05 -0400)
committerStefan Schmidt <stefan@datenfreihafen.org>
Thu, 9 Jun 2022 19:53:28 +0000 (21:53 +0200)
commitf049492562ec53d89871b3292625e2660600100b
tree8b70f8a6e007a07edb36666812342415e9aa6935
parentc17ecd186b969a380fd34acdefabc614939bda74
net: 6lowpan: use array for find nhc id

This patch will remove the complete overengineered and overthinking rb data
structure for looking up the nhc by nhcid. Instead we using the existing
nhc next header array and iterate over it. It works now for 1 byte values
only. However there are only 1 byte nhc id values currently
supported and IANA also does not specify large than 1 byte values yet.
If there are 2 byte values for nhc ids specified we can revisit this
data structure and add support for it.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220428030534.3220410-3-aahringo@redhat.com
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
15 files changed:
net/6lowpan/nhc.c
net/6lowpan/nhc.h
net/6lowpan/nhc_dest.c
net/6lowpan/nhc_fragment.c
net/6lowpan/nhc_ghc_ext_dest.c
net/6lowpan/nhc_ghc_ext_frag.c
net/6lowpan/nhc_ghc_ext_hop.c
net/6lowpan/nhc_ghc_ext_route.c
net/6lowpan/nhc_ghc_icmpv6.c
net/6lowpan/nhc_ghc_udp.c
net/6lowpan/nhc_hop.c
net/6lowpan/nhc_ipv6.c
net/6lowpan/nhc_mobility.c
net/6lowpan/nhc_routing.c
net/6lowpan/nhc_udp.c