From patchwork Fri Sep 4 05:40:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wang, Haiyue" X-Patchwork-Id: 76484 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F31A4A04C5; Fri, 4 Sep 2020 07:51:04 +0200 (CEST) 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 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; };