From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 4393458CB for ; Thu, 3 Sep 2015 17:24:24 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 03 Sep 2015 08:24:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,462,1437462000"; d="scan'208";a="797116218" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 03 Sep 2015 08:24:22 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.12]) by IRSMSX104.ger.corp.intel.com ([163.33.3.159]) with mapi id 14.03.0224.002; Thu, 3 Sep 2015 16:23:55 +0100 From: "Dumitrescu, Cristian" To: "Azarewicz, PiotrX T" , "dev@dpdk.org" , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH 1/1] ip_frag: fix creating ipv6 fragment extension header Thread-Index: AQHQ5YlVwXkjiuRmikKlD7jY484rh54q7dKA Date: Thu, 3 Sep 2015 15:23:54 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D89126478B6EEB@IRSMSX108.ger.corp.intel.com> References: <1441203181-15487-1-git-send-email-piotrx.t.azarewicz@intel.com> In-Reply-To: <1441203181-15487-1-git-send-email-piotrx.t.azarewicz@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/1] ip_frag: fix creating ipv6 fragment extension header 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: Thu, 03 Sep 2015 15:24:24 -0000 Konstantin, What do you think about this issue and the patch? Thanks, Cristian > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Piotr > Sent: Wednesday, September 2, 2015 3:13 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/1] ip_frag: fix creating ipv6 fragment > extension header >=20 > From: Piotr Azarewicz >=20 > Previous implementation won't work on every environment. The order of > allocation of bit-fields within a unit (high-order to low-order or > low-order to high-order) is implementation-defined. > Solution: used bytes instead of bit fields. >=20 > Signed-off-by: Piotr Azarewicz > --- > lib/librte_ip_frag/rte_ipv6_fragmentation.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/lib/librte_ip_frag/rte_ipv6_fragmentation.c > b/lib/librte_ip_frag/rte_ipv6_fragmentation.c > index 0e32aa8..7342421 100644 > --- a/lib/librte_ip_frag/rte_ipv6_fragmentation.c > +++ b/lib/librte_ip_frag/rte_ipv6_fragmentation.c > @@ -65,10 +65,8 @@ __fill_ipv6hdr_frag(struct ipv6_hdr *dst, >=20 > fh =3D (struct ipv6_extension_fragment *) ++dst; > fh->next_header =3D src->proto; > - fh->reserved1 =3D 0; > - fh->frag_offset =3D rte_cpu_to_be_16(fofs); > - fh->reserved2 =3D 0; > - fh->more_frags =3D rte_cpu_to_be_16(mf); > + fh->reserved1 =3D 0; > + fh->frag_data =3D rte_cpu_to_be_16((fofs & ~IPV6_HDR_FO_MASK) | > mf); > fh->id =3D 0; > } >=20 > -- > 1.7.9.5