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 86272A046B for ; Thu, 25 Jul 2019 16:01:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 085BD1C367; Thu, 25 Jul 2019 16:01:28 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 13A591C34D; Thu, 25 Jul 2019 16:01:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 07:01:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,306,1559545200"; d="scan'208";a="181474875" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga002.jf.intel.com with ESMTP; 25 Jul 2019 07:01:20 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by irsmsx110.ger.corp.intel.com (163.33.3.25) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 25 Jul 2019 15:01:19 +0100 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.40]) by irsmsx111.ger.corp.intel.com ([169.254.2.65]) with mapi id 14.03.0439.000; Thu, 25 Jul 2019 15:01:19 +0100 From: "Lipiec, Herakliusz" To: Aaron Conole , "Govindharajan, Hariprasad" CC: Remy Horton , "Kovacevic, Marko" , Ori Kam , "Richardson, Bruce" , "De Lara Guarch, Pablo" , "Nicolau, Radu" , Akhil Goyal , "Kantecki, Tomasz" , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] examples/l3fwd: fix unaligned memory access Thread-Index: AQHVQj8MbnfuOJXqKEyhxnlGCNpwR6bbVSepgAAGi1A= Date: Thu, 25 Jul 2019 14:01:18 +0000 Message-ID: References: <20190724164354.18811-1-hariprasad.govindharajan@intel.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZjQ2ODM0MWItNjY3Zi00MGJkLTg1ZTItMWNmYjFjMzYxMTU3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidHdTTjJuVlJZTGZONk9rUFBGaFBJVXVPXC9yZ25ZMk9sVFhsTXk4dnYrbjNcL1V6TVlXcE5oMEJuMnNlazNxVHV0In0= 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] examples/l3fwd: fix unaligned memory access 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" > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Aaron Conole > Sent: Thursday, July 25, 2019 2:28 PM > hgovindh writes: >=20 > > Fix unaligned memory access when reading IPv6 header which leads to > > segmentation fault by changing aligned memory read to unaligned memory > > read. > > > > Bugzilla ID: 279 > > Fixes: 64d3955de1de ("examples/l3fwd: fix ARM build") > > Cc: maciej.czekaj@caviumnetworks.com > > Cc: stable@dpdk.org > > Signed-off-by: hgovindh > > --- > > examples/l3fwd/l3fwd_em.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c > > index fa8f82be6..f0c443dae 100644 > > --- a/examples/l3fwd/l3fwd_em.c > > +++ b/examples/l3fwd/l3fwd_em.c > > @@ -285,7 +285,7 @@ em_get_ipv6_dst_port(void *ipv6_hdr, uint16_t > portid, void *lookup_struct) > > * Get part of 5 tuple: dst IP address lower 96 bits > > * and src IP address higher 32 bits. > > */ > > - key.xmm[1] =3D *(xmm_t *)data1; > > + key.xmm[1] =3D _mm_loadu_si128((xmm_t *)data1); >=20 > Nak. Please use a generic unaligned load, rather than an intel specific = one. > Otherwise, supported platforms like arm64 will have broken builds. >=20 > Additionally, which chip and compiler did you use to get this error? This comes from Bugzilla, the compiler used there is GCC 8.2.0 and the CPU = is Intel Core i5, As far as I know this can also be reproduced on Intel Xeon, with GCC 8.3.0,= =20 in both cases its compiled with compiler optimizations disabled. >=20 > > > > /* > > * Get part of 5 tuple: dst port and src port