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 D3C57231C for ; Fri, 28 Nov 2014 11:27:42 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 28 Nov 2014 02:20:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="422611484" Received: from irsmsx153.ger.corp.intel.com ([163.33.192.75]) by FMSMGA003.fm.intel.com with ESMTP; 28 Nov 2014 02:17:39 -0800 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.144]) by IRSMSX153.ger.corp.intel.com ([163.33.192.75]) with mapi id 14.03.0195.001; Fri, 28 Nov 2014 10:27:31 +0000 From: "Ananyev, Konstantin" To: Olivier MATZ , "Liu, Jijiang" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3 1/4] mbuf:add three TX offload flags and change three fields Thread-Index: AQHQCu8HtybaEe97F0+AWT7gU9Fz85x1zwhg Date: Fri, 28 Nov 2014 10:27:34 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258213BB1EA@IRSMSX105.ger.corp.intel.com> References: <1417107801-9544-1-git-send-email-jijiang.liu@intel.com> <1417107801-9544-2-git-send-email-jijiang.liu@intel.com> <54784232.8030707@6wind.com> In-Reply-To: <54784232.8030707@6wind.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 1/4] mbuf:add three TX offload flags and change three fields X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2014 10:27:43 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier MATZ > Sent: Friday, November 28, 2014 9:37 AM > To: Liu, Jijiang; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3 1/4] mbuf:add three TX offload flags an= d change three fields >=20 > Hi Jijiang, >=20 > On 11/27/2014 06:03 PM, Jijiang Liu wrote: > > /** Tell the NIC it's an IPv4 packet. Required for L4 checksum offload= or TSO. */ > > #define PKT_TX_IPV4 PKT_RX_IPV4_HDR > > > > /** Tell the NIC it's an IPv6 packet. Required for L4 checksum offload= or TSO. */ > > #define PKT_TX_IPV6 PKT_RX_IPV6_HDR >=20 > The description still does not match what we discussed. Either we > have PKT_TX_IPV4 meaning "packet is IPv4 without requiring IP cksum > offload", or "packet is IPv4". I prefer the second one, but whatever > the choice is, the comments must be coherent. >=20 > > -#define PKT_TX_VLAN_PKT (1ULL << 55) /**< TX packet is a 802.1q V= LAN packet. */ > > +/** Outer IP cksum of TX pkt. computed by NIC for tunneling packet */ > > +#define PKT_TX_OUTER_IP_CKSUM (1ULL << 58) > > + > > +/** Tell the NIC it's an outer IPv6 packet for tunneling packet.*/ > > +#define PKT_TX_OUTER_IPV6 (1ULL << 59) >=20 > I think we should have the same flags with the same meanings for > inner and outer: >=20 > - PKT_TX_IPV4, PKT_TX_IP_CKSUM, PKT_TX_IPV6 > - PKT_TX_OUTER_IPV4, PKT_TX_OUTER_IP_CKSUM, PKT_TX_OUTER_IPV6 Good point. I still think: should we squeeze each of these triple in 2 bits? Same as we doing for L4 checksum flags: #define PKT_TX_IP_CKSUM (1ULL << X) #define PKT_TX_IPV6 (2ULL << X) #define PKT_TX_IPV4 (3ULL << X) Same of outer flags. Of course it means that they need to be mutually exclusive. >=20 > In your patch there is no PKT_TX_OUTER_IPV4 flag. >=20 > Regards, > Olivier