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 9DD09A046B for ; Thu, 25 Jul 2019 11:05:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 51A161C2BC; Thu, 25 Jul 2019 11:05:25 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 949981C2BA; Thu, 25 Jul 2019 11:05:23 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 02:05:22 -0700 X-IronPort-AV: E=Sophos;i="5.64,306,1559545200"; d="scan'208";a="164120180" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.51]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 02:05:19 -0700 Date: Thu, 25 Jul 2019 10:05:16 +0100 From: Bruce Richardson To: hgovindh Cc: Remy Horton , Marko Kovacevic , Ori Kam , Pablo de Lara , Radu Nicolau , Akhil Goyal , Tomasz Kantecki , dev@dpdk.org, maciej.czekaj@caviumnetworks.com, stable@dpdk.org Message-ID: <20190725090516.GA1614@bricha3-MOBL.ger.corp.intel.com> References: <20190724164354.18811-1-hariprasad.govindharajan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190724164354.18811-1-hariprasad.govindharajan@intel.com> User-Agent: Mutt/1.11.4 (2019-03-13) 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" On Wed, Jul 24, 2019 at 05:43:54PM +0100, hgovindh wrote: > 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] = *(xmm_t *)data1; > + key.xmm[1] = _mm_loadu_si128((xmm_t *)data1); > Minor nit, but since data1 is defined as "void *" the cast to xmm_t is unnecessary. Although we can't reproduce the bug, the fix looks correct for the bug as described and harmless otherwise, so: Acked-by: Bruce Richardson