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 8C575A046B for ; Thu, 25 Jul 2019 19:14:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 514371C3A4; Thu, 25 Jul 2019 19:14:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id F2BF31C37F; Thu, 25 Jul 2019 19:14:51 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x6PG065o010458; Thu, 25 Jul 2019 10:14:48 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=H8WNLhpM8kDXQZMMIeYl0J8HmrLNr8ycaYctopiAlFQ=; b=Wyu7MuLMpaNtPA/ekbta2j055KIn7VIjcTv/C4j/0snV7KgzVNHqtNB/r3O8KAvoOnzu lQHB0M1SuZ9/IpBiaGjhAeXc7k4/NpBhrO+UM/S4nprxqnOabGU4OTDD4vDftcjVj/Ht hRI7J7RUjPRHJe643euPat9A+ZZbWytTSiKjb306hxLYhMjTEg5ixlSnGmbKSEvoI+gn Up5tiPFoGt+0HrJOzSOf5iz15jdgilsPWnm7oNFJPyP0B7PTai7d0bI8BfnLKDs2Ku+n eGFXPu+ENwgmg613ehWV49gJdFwRr0peDRuOycsqovj8dEyCAGfXU5NYqqkhFwwOmwt0 Hg== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2tx6252akn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 25 Jul 2019 10:14:48 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 25 Jul 2019 10:14:46 -0700 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.58) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 25 Jul 2019 10:14:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GeCVKvaxcmcab4xqNDjAePT/dn2rPUoGDq070oyBOWDsxcA5yjE+YmILdwcjR5YzIF0c4L093Z1MpV8fw96kTJ2awynQoBPAYdRSHAFEovS22ANZPGT62ayIRHBXr/EBPRTw5ebiloqBF3XwRRWW8hXqEUNMvWTCFDpKMoSVrIYBoCtV3cKZ7VAIOlX4kUG3eYvdEUagIqkhNSc9g+7hgPha0D4ord4t82S7QDPumslvQUxpl8WYI/JloMlasn7+WWah7iObDxud+iffYJRPl4mxwfvQ6YWTjq10174s7XPvDm3wM38eGzoD5WiMRBdy6gxWmFA4T9hVG+vCxZWkdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H8WNLhpM8kDXQZMMIeYl0J8HmrLNr8ycaYctopiAlFQ=; b=BU0aum2D9U7PzhsLbgZdWar99XVtE8bl3Da18JPZSOttzazCtmmO6KEU+QtjuBaslFHjcxD1d7MLEpRscGS3fFoIammm8G228qX59cbrz1dFL1fP1klPyBgm0xcX57gBhQqohmQHN7chkyNVha19qVBkHUg4iP4umwo/BnsqSZjviuPF9E18/s3yOsR4mFJprIVa1IF/L7PtfChrfS0CfYBYhLHK331nTtREZFiq/1cbxB+B1f3pF9tTagIGhNVw809fShoB50cOedRQCODYs9UfNhGC31i3jpv+M/2j8+Q/k8ohwQU22oh/aoDyKYmewUxuyYxqaAtRQYacWVsJrQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=marvell.com;dmarc=pass action=none header.from=marvell.com;dkim=pass header.d=marvell.com;arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H8WNLhpM8kDXQZMMIeYl0J8HmrLNr8ycaYctopiAlFQ=; b=tbXHgiyyIDSBGq3ylweLIMl11Gm6hihl30SCN/QSLo3XSocrpEFAIpRC2DOpbl3+afS8PGkBKI+/ST0PUIYGD06kvgq1naKZLVy05kCMx+/MiKE+NZfdAbODN6KM3uFLv+PFLYVAIwRiBKfC/SF9I40RaikpFG3M52WdLx9prUc= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2792.namprd18.prod.outlook.com (20.179.57.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.17; Thu, 25 Jul 2019 17:14:44 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::2d42:12b6:aa2e:2862]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::2d42:12b6:aa2e:2862%4]) with mapi id 15.20.2094.013; Thu, 25 Jul 2019 17:14:44 +0000 From: Jerin Jacob Kollanukkaran To: Bruce Richardson , 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" , "drc@linux.vnet.ibm.com" , Gavin Hu Thread-Topic: [dpdk-dev] [PATCH v2] examples/l3fwd: fix unaligned memory access Thread-Index: AQHVQwiDQov0aU8xcUyQGYouARGaGabbkVAA Date: Thu, 25 Jul 2019 17:14:44 +0000 Message-ID: References: <20190724164354.18811-1-hariprasad.govindharajan@intel.com> <20190725162903.106262-1-hariprasad.govindharajan@intel.com> <20190725164600.GA1621@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190725164600.GA1621@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-Mentions: hariprasad.govindharajan@intel.com X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [106.200.248.176] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a7d333e4-e081-4630-71b3-08d7112396b2 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB2792; x-ms-traffictypediagnostic: BYAPR18MB2792: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0109D382B0 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(39860400002)(376002)(366004)(346002)(199004)(189003)(13464003)(54906003)(99286004)(81156014)(71200400001)(68736007)(71190400001)(6116002)(14454004)(3846002)(74316002)(7696005)(66066001)(316002)(110136005)(7416002)(2906002)(33656002)(305945005)(6246003)(476003)(446003)(11346002)(6506007)(76116006)(26005)(229853002)(76176011)(6436002)(52536014)(64756008)(25786009)(7736002)(66556008)(66446008)(66476007)(102836004)(66946007)(5660300002)(486006)(9686003)(8936002)(14444005)(81166006)(4326008)(478600001)(86362001)(256004)(53936002)(55016002)(186003)(53546011); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2792; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: M46oMBzn4bz45p+Uv5WTFOPFS+bRzWZsLnqi0aaOQdkU+lXYpDDBjcdv8XrTRMcx+d+nTfUVLFIJRdxrwEd2SSsvXLqqTWEgkvAf6xVBFE/FQBYyWcdfhBeVip/5Z7WhhId6gVzb/QpsubeaEwnfaSjIBaPf8UPjVGvASx7+c1hHMa3JwJEEAx1sW8a9u5QJlTHt4tHJPv3/wbFoJ30L8lJgwC5AleMxKblS4PSlEHR9wn1EuG2C6wx0jKQ0WHEVNropOYURB7pqWDtfVjfjyHHLXWXUGNlHgzjEkilcXXjvyOQmt7GCQfyt12DVIFe9U7ZoAbLrnFWQFgoBPyA4URTm055R51oKRDhtBUGEuj3M2+exAqjHphdPNupgrxD8/EYknFDMimrFUFUAcbSSngc9LaBOOv1e0YJGBk4zBzE= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: a7d333e4-e081-4630-71b3-08d7112396b2 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jul 2019 17:14:44.4639 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jerinj@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2792 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-07-25_06:2019-07-25,2019-07-25 signatures=0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] examples/l3fwd: fix unaligned memory access X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" > -----Original Message----- > From: dev On Behalf Of Bruce Richardson > Sent: Thursday, July 25, 2019 10:16 PM > 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 > Subject: Re: [dpdk-dev] [PATCH v2] examples/l3fwd: fix unaligned memory > access >=20 > On Thu, Jul 25, 2019 at 05:29:03PM +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 > > --- > > V2: Added functions which will do unaligned load based on the > > underlying architecture > > --- > > --- > > examples/l3fwd/l3fwd_em.c | 26 ++++++++++++++++++++++++-- > > 1 file changed, 24 insertions(+), 2 deletions(-) > > > > diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c > > index fa8f82be6..f2641586b 100644 > > --- a/examples/l3fwd/l3fwd_em.c > > +++ b/examples/l3fwd/l3fwd_em.c > > @@ -244,6 +244,29 @@ em_mask_key(void *key, xmm_t mask) #error No > > vector engine (SSE, NEON, ALTIVEC) available, check your toolchain > > #endif > > > > +#if defined(RTE_MACHINE_CPUFLAG_SSE2) static inline xmm_t > > +em_load_key(void *key) { > > + return _mm_loadu_si128((__m128i *)(key)); } #elif > > +defined(RTE_MACHINE_CPUFLAG_NEON) > > +static inline xmm_t > > +em_load_key(void *key) > > +{ > > + return vld1q_s32((int32_t *)key); > > +} > > +#elif defined(RTE_MACHINE_CPUFLAG_ALTIVEC) > > +static inline xmm_t > > +em_load_key(void *key) > > +{ > > + return vec_ld(0, (xmm_t *)(key)); > > +} Added power pc maintainer Not sure all architecture need SIMD instructions for access to unaligned me= mory location. @hgovindh, Could you provide exact setup details for reproducing this issue, I can tes= t it on arm64. Like l3fwd command, Traffic generator traffic pattern