Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp480276iob; Tue, 3 May 2022 02:57:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw023gQ3gVG7QKxS2x7YN88VFqV/0G7splNsdgpon6JgGU8UrIZ2K/i1gBnjBHc1rvU+UD1 X-Received: by 2002:a2e:7c16:0:b0:246:377b:f802 with SMTP id x22-20020a2e7c16000000b00246377bf802mr9296339ljc.155.1651571850610; Tue, 03 May 2022 02:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651571850; cv=none; d=google.com; s=arc-20160816; b=hEcjdiKVYDzhhbFwG+ZYnDtuQgQxozhVKLdPPM8u1WEsWArANgI9clEC9u7fV6ePbn ZA/HzPuBmeRxe5tiC5A2OEFGZknukP9QaNyn9ZSywE9h0e1Ynk1/wa0B53zS3I3kBPeA hnwJiZjd12MH0iz8XyP9B50R4zV8+8K+znIPpdctqyyr5nkmNkZt7lqNGsvNujPPH4OH CACGoqM6n6abp2tgCzYe4/uc3tjVcPYkzM8BewXaSHT9AYRvgzL+hroPt2UYOMYZmYp3 UbcnYNwWryjxCZA2RmxN3rXgaJjbYrxz4XUfDrxXts3PX+kUjbtpufavAQMSZpzLWkFy AtOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=gEluyxkW2MUDbysFAA+6jSnbVX8WXwsPKDRYtEByhUs=; b=F8m07HcY6NusY6ns/tO0Vh3kYruhbGvphp8JWBKz4uoRWPW73JcC/GOXGRJtEGyaL2 CMuiTpIWQ05FpomBX+wfVSCMjmJ1bfze+6HDTF1ySDtSZ+y4mbPnauy6psHSaIUrWqWU eD1w5x6DqzxAZoq+1kIZ5hrdRWmhOJwf0IgO58QYNxFXT0xvTMkZk7Lk7WkfWspntz4e ZtcBbzArQjGMiFGZ0v7W+mAkTKivWIh3TCAB1Ws4Z8y7Gi6EcP++haE0BJRdddmuDBq2 8/koysr97Q3rZ78zV0svDHJRcHJBiVlpSXJ/XR4xGA+Hwr3HaEa/sI1UierI8s5G2xa+ 6erQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N7SFhG9A; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a05651c051000b0024f3109dff2si5556436ljp.457.2022.05.03.02.56.47; Tue, 03 May 2022 02:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N7SFhG9A; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231882AbiECHgE (ORCPT + 99 others); Tue, 3 May 2022 03:36:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231834AbiECHgE (ORCPT ); Tue, 3 May 2022 03:36:04 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B548F369FB; Tue, 3 May 2022 00:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651563152; x=1683099152; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=Qy3FsmlPD/Mh6fJQiRMAQSJuVZfG66VesbUc4p6C3Qw=; b=N7SFhG9AdbB+yOKRHTC5/nDi7V8OTC4ODa25xXKBYuWrffvLf4uEbXVc B7sTfH2jLqlPwl+qr+nSxMAyeN5ihSvg7Hk/XcIB5O70RxgTG7xPM71u5 uYYIxzzJi//ZrRTgggoWhyRGbX/X/3kgqXPEGYNex3DHAuDQ0recMxCK/ IDIIe43uHqT8Nbar0kPFQ+4U4tIxesHu36neHldu6E3fUlYtPWFReyz7J 59QfezVYzedZ3EOG4PXYo/oxyZT9bhea2z2MHdFJB6ULmE0Kb5t2fKkLB 2BN6mHrvNVY3h9uxLyDfjLBwbegRArLYVTtdX0YnmDJ7/j4h1tj5bnQkS g==; X-IronPort-AV: E=McAfee;i="6400,9594,10335"; a="247965852" X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="247965852" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2022 00:32:20 -0700 X-IronPort-AV: E=Sophos;i="5.91,194,1647327600"; d="scan'208";a="653162441" Received: from ghoyler-mobl.ger.corp.intel.com (HELO [10.252.33.128]) ([10.252.33.128]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 May 2022 00:32:19 -0700 Message-ID: Subject: Re: [PATCH bluetooth-next 2/3] net: 6lowpan: use array for find nhc id From: Jukka Rissanen To: Alexander Aring Cc: linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org, stefan@datenfreihafen.org, torvalds@linuxfoundation.org Date: Tue, 03 May 2022 10:32:16 +0300 In-Reply-To: <20220428030534.3220410-3-aahringo@redhat.com> References: <20220428030534.3220410-1-aahringo@redhat.com> <20220428030534.3220410-3-aahringo@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Wed, 2022-04-27 at 23:05 -0400, Alexander Aring wrote: > 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 > --- >  net/6lowpan/nhc.c               | 91 +++++-------------------------- > -- >  net/6lowpan/nhc.h               | 28 ++++------ >  net/6lowpan/nhc_dest.c          |  9 +--- >  net/6lowpan/nhc_fragment.c      |  9 +--- >  net/6lowpan/nhc_ghc_ext_dest.c  |  9 +--- >  net/6lowpan/nhc_ghc_ext_frag.c  | 11 +--- >  net/6lowpan/nhc_ghc_ext_hop.c   |  9 +--- >  net/6lowpan/nhc_ghc_ext_route.c |  9 +--- >  net/6lowpan/nhc_ghc_icmpv6.c    |  9 +--- >  net/6lowpan/nhc_ghc_udp.c       |  9 +--- >  net/6lowpan/nhc_hop.c           |  9 +--- >  net/6lowpan/nhc_ipv6.c          | 11 +--- >  net/6lowpan/nhc_mobility.c      |  9 +--- >  net/6lowpan/nhc_routing.c       |  9 +--- >  net/6lowpan/nhc_udp.c           |  9 +--- >  15 files changed, 37 insertions(+), 203 deletions(-) > > diff --git a/net/6lowpan/nhc.c b/net/6lowpan/nhc.c > index d6bbbd4ab38b..019f121b2449 100644 > --- a/net/6lowpan/nhc.c > +++ b/net/6lowpan/nhc.c > @@ -12,77 +12,26 @@ >   Acked-by: Jukka Rissanen Cheers, Jukka