From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 4B94C1B020 for ; Wed, 17 Jan 2018 17:53:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2018 08:53:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,372,1511856000"; d="scan'208";a="10996258" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.48]) ([10.237.220.48]) by fmsmga007.fm.intel.com with ESMTP; 17 Jan 2018 08:53:26 -0800 To: olivier.matz@6wind.com, yskoh@mellanox.com, nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com Cc: Shahaf Shuler , stephen@networkplumber.org, dev@dpdk.org, Shachar Beiser References: <07cfe9a606927b551c3530a2b910ef88547d9118.1514705637.git.shacharbe@mellanox.com> From: Ferruh Yigit Message-ID: <32496fef-0f1e-759e-71bb-c338a81aed34@intel.com> Date: Wed, 17 Jan 2018 16:53:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/2] lib/net: add IPv6 header fields macros 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: , X-List-Received-Date: Wed, 17 Jan 2018 16:53:29 -0000 On 1/16/2018 9:17 AM, Shahaf Shuler wrote: > From: Shachar Beiser > > Support IPv6 header vtc_flow fields : tc , flow_label > > Signed-off-by: Shachar Beiser > --- > Sending on behalf of Shachar. > > On v2: > - Addressed Stephen comments on the coding style. Hi Olivier, Any objection to the patch? Thanks, ferruh > > --- > lib/librte_net/rte_ip.h | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h > index 9a62ff667..f32684c66 100644 > --- a/lib/librte_net/rte_ip.h > +++ b/lib/librte_net/rte_ip.h > @@ -344,6 +344,12 @@ struct ipv6_hdr { > uint8_t dst_addr[16]; /**< IP address of destination host(s). */ > } __attribute__((__packed__)); > > +/* IPv6 vtc_flow: IPv / TC / flow_label */ > +#define IPV6_HDR_FL_SHIFT 0 > +#define IPV6_HDR_TC_SHIFT 20 > +#define IPV6_HDR_FL_MASK ((1u << IPV6_HDR_TC_SHIFT) - 1) > +#define IPV6_HDR_TC_MASK (0xf << IPV6_HDR_TC_SHIFT) > + > /** > * Process the pseudo-header checksum of an IPv6 header. > * >