From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 26DF2685D for ; Mon, 20 Oct 2014 15:56:45 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 20 Oct 2014 06:58:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,756,1406617200"; d="scan'208";a="592397675" Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by orsmga001.jf.intel.com with ESMTP; 20 Oct 2014 07:04:40 -0700 Received: from irsmsx105.ger.corp.intel.com (163.33.3.28) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 20 Oct 2014 15:03:24 +0100 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.248]) by IRSMSX105.ger.corp.intel.com ([169.254.7.174]) with mapi id 14.03.0195.001; Mon, 20 Oct 2014 15:03:23 +0100 From: "Walukiewicz, Miroslaw" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] pmd: Add generic support for TCP TSO (Transmit Segmentation Offload) Thread-Index: AQHP7Epr9YF+GxESYUWki811ObjU9Jw4yQ2AgAAWpWCAABDDgIAAEh4A Date: Mon, 20 Oct 2014 14:03:24 +0000 Message-ID: <7C4248CAE043B144B1CD242D275626532FDE0752@IRSMSX104.ger.corp.intel.com> References: <20141020094252.14456.58891.stgit@gklab-18-011.igk.intel.com> <1675767.ObibVazTHA@xps13> <7C4248CAE043B144B1CD242D275626532FDE0709@IRSMSX104.ger.corp.intel.com> <2828270.80eTSv21yY@xps13> In-Reply-To: <2828270.80eTSv21yY@xps13> Accept-Language: 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 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] pmd: Add generic support for TCP TSO (Transmit Segmentation Offload) 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: Mon, 20 Oct 2014 13:56:46 -0000 > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Monday, October 20, 2014 3:51 PM > To: Walukiewicz, Miroslaw > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] pmd: Add generic support for TCP TSO > (Transmit Segmentation Offload) >=20 > 2014-10-20 12:45, Walukiewicz, Miroslaw: > > > > /* fields to support TX offloads */ > > > > - union { > > > > - uint16_t l2_l3_len; /**< combined l2/l3 lengths as single var > > > */ > > > > - struct { > > > > - uint16_t l3_len:9; /**< L3 (IP) Header Length. */ > > > > - uint16_t l2_len:7; /**< L2 (MAC) Header Length. > > > */ > > > > + /* two bytes - l2/l3 len for compatibility (endian issues) > > > > + * two bytes - reseved for alignment > > > > + * two bytes - l4 len (TCP/UDP) header len > > > > + * two bytes - TCP tso segment size > > > > + */ > > > > + struct { > > > > + union { > > > > + uint16_t l2_l3_len; /**< combined l2/l3 len */ > > > > + struct { > > > > + uint16_t l3_len:9; /**< L3 (IP) Header */ > > > > + uint16_t l2_len:7; /**< L2 (MAC) Header */ > > > > + }; > > > > }; > > > > > > Why nesting these fields in an anonymous structure? > > > > I want to keep a source compatibility with non-TSO applications using t= hat > > field for example IP checksum computing by NIC. > > Keeping this structure anonymous I do not require changes in old > > applications that do not need TSO support. > > > > The second argument is that in original patch extending the rte_mbuf to > 128 > > bytes made by Bruce the author made this structure anonymous and I > follow > > this assumption too. >=20 > Excuse me, maybe I missed something, but I still don't understand why you > are > embedding the union into a struct? You are right. It has no sense.=20 Let me send a new version of the patch with new structure definition and be= tter description >=20 > -- > Thomas