Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3DBDFC43461 for ; Fri, 4 Sep 2020 05:51:06 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id D9E3F206C9 for ; Fri, 4 Sep 2020 05:51:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9E3F206C9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6217A1BC25; Fri, 4 Sep 2020 07:51:04 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 06379DE0 for ; Fri, 4 Sep 2020 07:51:02 +0200 (CEST) IronPort-SDR: eHlSiBoVmMn85IP602sEv8xQKTSCblDPXgwSlUqhXhXwe4v/1BGe8oMJF2O6FfX8cLIMt9NwuB Sz5LQg/C+Sag== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="137749404" X-IronPort-AV: E=Sophos;i="5.76,388,1592895600"; d="scan'208";a="137749404" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2020 22:51:02 -0700 IronPort-SDR: QSQy9sIBuMGVjHlV738vNuiZ8f5rNfuTtTAZGQLUIn62qIF+e2AUZO1Bic9WFK2iszi/TMEO6q t7GZOy4Vp8Dg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,388,1592895600"; d="scan'208";a="326498649" Received: from npg-dpdk-haiyue-3.sh.intel.com ([10.67.118.150]) by fmsmga004.fm.intel.com with ESMTP; 03 Sep 2020 22:51:00 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: Haiyue Wang , Olivier Matz Date: Fri, 4 Sep 2020 13:40:20 +0800 Message-Id: <20200904054020.77648-1-haiyue.wang@intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v1] net: expand the data size of L3 length to 16 bits X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The IPv6 can have large extension header, like the "Segment Routing" may have (32 + 1) * 8 = 264 bytes, the 8 bits size of L3 length can't handle this case correctly. Signed-off-by: Haiyue Wang --- lib/librte_net/rte_net.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h index 94b06d9ee..992fb088a 100644 --- a/lib/librte_net/rte_net.h +++ b/lib/librte_net/rte_net.h @@ -20,11 +20,11 @@ extern "C" { */ struct rte_net_hdr_lens { uint8_t l2_len; - uint8_t l3_len; + uint16_t l3_len; uint8_t l4_len; uint8_t tunnel_len; uint8_t inner_l2_len; - uint8_t inner_l3_len; + uint16_t inner_l3_len; uint8_t inner_l4_len; }; -- 2.28.0