From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C6306A04BE; Mon, 7 Sep 2020 04:07:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D12C2BAB; Mon, 7 Sep 2020 04:07:48 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 7C7AC29AC for ; Mon, 7 Sep 2020 04:07:46 +0200 (CEST) IronPort-SDR: ud9BF1LnxdCRod9vdiY/I+LOE4IBZsu/QwmuUmt9PsfMcnpjO1Tp68WqMT5y9AD2F/Pke16HgR KiX+AFx6/39Q== X-IronPort-AV: E=McAfee;i="6000,8403,9736"; a="145651372" X-IronPort-AV: E=Sophos;i="5.76,400,1592895600"; d="scan'208";a="145651372" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2020 19:07:45 -0700 IronPort-SDR: /Q7Eu9bqsYmbbNM+MN1+S268R9B3J7ksBsyQ42oNUS5M6cAFMhSmpEskExT4Iu84/4Rhox317z IZMV/uRvz5yA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,400,1592895600"; d="scan'208";a="284005307" Received: from npg-dpdk-haiyue-3.sh.intel.com ([10.67.118.172]) by fmsmga007.fm.intel.com with ESMTP; 06 Sep 2020 19:07:43 -0700 From: Haiyue Wang To: dev@dpdk.org Cc: stephen@networkplumber.org, ferruh.yigit@intel.com, Haiyue Wang , Olivier Matz Date: Mon, 7 Sep 2020 09:56:50 +0800 Message-Id: <20200907015651.956011-1-haiyue.wang@intel.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200904054020.77648-1-haiyue.wang@intel.com> References: <20200904054020.77648-1-haiyue.wang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3] net: adjust the header length parse size 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" Enlarge the L3 and tunnel header length from 8-bit to 16-bit to handle the bigger headers. And reorder the fields to avoid creating a structure hole. Signed-off-by: Haiyue Wang --- v2: use bit field to avoid creating a structure hole. v3: use basic type and reorder to avoid structure hole. --- lib/librte_net/rte_net.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h index 94b06d9ee..434435ffa 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; - uint8_t l4_len; - uint8_t tunnel_len; uint8_t inner_l2_len; - uint8_t inner_l3_len; + uint16_t l3_len; + uint16_t inner_l3_len; + uint16_t tunnel_len; + uint8_t l4_len; uint8_t inner_l4_len; }; -- 2.28.0