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 D4B9AA04AA; Tue, 8 Sep 2020 16:53:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B0B2E2BAB; Tue, 8 Sep 2020 16:53:41 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 4503FDE0 for ; Tue, 8 Sep 2020 16:53:40 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id w7so11159380pfi.4 for ; Tue, 08 Sep 2020 07:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DSSWlwnFQYnPs+I0gXJIYlTZD+tC8b9nKoTQDHRMLtI=; b=hkHgE1AdDqTTfcES3V/izYfMBiq1/Dk5cWd6deBNpuXwIZ6uTrx6DWZdnmicR1pTgw yvHQ+Iu9WpkO5LqDy3e8Zn98hmwJMCBCJb6L76SX23crT0j6FE60XBg7d6oxYgthtDnk rcCMF6Nr5qM8w/fvnGV+pcpsSPAeqK8+vD/lUORAR2OdeWxOqyPdca3DY7PoshiRLdtX 5zAWmV3F97IG/e3ukWwtjAHMAmVAhb0oKPMDbghfO9v3Jg8QrOm3HSnEB1j+RAGg8+bJ oz+Y5Ydcly5T3RTna8bnC6zkq1dZog5fK0DP6mxA99JQaK6FQ/12AuouBk77S6MdYbi1 /Z4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DSSWlwnFQYnPs+I0gXJIYlTZD+tC8b9nKoTQDHRMLtI=; b=H8JRIhaufddOItJeF/I+mL+oS3PtfsVfFqoVcqyEFezsAzLLxBKSkN588z2AS9NzIO 6upRafHRq5uBL0YOufxMTfoWburMC0kS+yff2IyhZAe1t3GQ5Y2Ty4yow0SH5I/fGhkB W87aKriYVUBDNV7DLHmUMC/u9OHQqXcx2Lvr1UWt0YH/3XG2v/Ng8JIaDkSoppgPodsl qoWrZkDNKSSyjGT1379e37ULZ6bMIHyuA2CH2QZUcggsMQv/0h5LTdDWh3IQyw/cqZ0Y FwW+l+y8B/6NtGMoovPEWDGL6kTsERjwNZK2HFp+H8BSkJSQus+NO2ngcgjsbISqMheB XOTA== X-Gm-Message-State: AOAM530BHLJIiBmRu7yBvwJpo+73mGdpo8MNqqzFtgTtzUj+bEnAUbZC vUVlWNVwDgKoRUzcY89g/FUchg== X-Google-Smtp-Source: ABdhPJyzEb+6YWDtW6P38eJYhKAzS6TzLRf60UbGdIQE5IqE3zwNlM80FP2tk+DAtaxylI2wWBezzQ== X-Received: by 2002:a65:49c7:: with SMTP id t7mr20826932pgs.131.1599576819447; Tue, 08 Sep 2020 07:53:39 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q4sm18754420pfs.193.2020.09.08.07.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 07:53:39 -0700 (PDT) Date: Tue, 8 Sep 2020 07:53:36 -0700 From: Stephen Hemminger To: Haiyue Wang Cc: dev@dpdk.org, ferruh.yigit@intel.com, Olivier Matz Message-ID: <20200908075336.7d75195c@hermes.lan> In-Reply-To: <20200907015651.956011-1-haiyue.wang@intel.com> References: <20200904054020.77648-1-haiyue.wang@intel.com> <20200907015651.956011-1-haiyue.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [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" On Mon, 7 Sep 2020 09:56:50 +0800 Haiyue Wang wrote: > 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; > }; > Acked-by: Stephhen Hemminger