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 A83C3A10DA for ; Fri, 2 Aug 2019 05:51:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4ECCA1C211; Fri, 2 Aug 2019 05:51:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 584991C205 for ; Fri, 2 Aug 2019 05:51:16 +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 x723jZiF002930; Thu, 1 Aug 2019 20:51:14 -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=YCQpaihxJOLrvaTQsjpShsmKwZs4iOo01Ij7oDOtT1o=; b=zKskHR3c+6mn0xr3Rok4MtiJn2icHibWKAyBTE24KY06wa5Q42hveyIDjp+FoME2uTmS 4qzEx0/yVjK4lhnd989JUtm8zcvcckSJc3yq63W9tRfuA09ZZdNn+DRw5y/7UPltBAD2 Mr9tSTYUvf20hSKb7TVIPb/MGFihlBiUfGrUsdRcGJB7Om5XeStg9DKfn07v987KbUvC 2GF0xj9nBysvBcYMF5nuyReY8+duy3d71LtZJreetg80iue+G/UIP7VJq+BwF0erwjrq wAREgoo70/QNr0tw7iF0/ovXExyFDm2y45JUEdRMuIFyc/EDQx/RZCeu48LXurEkorBa YQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2u42fsjp8p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 01 Aug 2019 20:51:13 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 1 Aug 2019 20:51:12 -0700 Received: from NAM05-DM3-obe.outbound.protection.outlook.com (104.47.49.55) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 1 Aug 2019 20:51:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BAM9UsbQBKyj0Sj3nwq6ExzJGYeKBFvt3vMMAurYk2RLre+qONtBRPLh2h1z3NPyY7YpPHrCpUncG1MN+zWkZ547og6tJwHCj2HUPbe9Q1+eYdtMtg8xkEv97I++DXsCUScja1NxdVNdfWVPVBntgG59JlZohVvjeKPhCr2vQz2JgTaacUi7f633T9oCQ1fKqPGJKdZhuExwxVEgL6ex/GO2Ld/ri2RR0RKAD2Qx54yaerMbf5hI/re4JeuAGHqSM5U3L3uAGjCdoMbQaqeiiD5zlZ7WZshFT6x66d0Cnr5a71xv4aCGhsOAuIlnFpvu3p0mWJLu6Zf9TiCsVgdrxg== 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=YCQpaihxJOLrvaTQsjpShsmKwZs4iOo01Ij7oDOtT1o=; b=G5nOE0KWTwWe/hefk5xTUgj7urudl6POvU+LkCzdr1v4LTRBASVmsBWEzknyhsIeUeK3T3pGfFopZu0LE01vHg0f3J+BOcX0/x04FmItDDiLVavILu8nuV3Ewow7FkncacJPK7A3POVZ6BEfA5rWFzLzouV+xYwci9fD8Cc/6Tw/LL6mVL6Mbt9j6Ec7iot3Eh9H7bnqiwjl7Fct1aTgVPjLd7ru8ML1O7VpYrHiv7mIpeYCr/hlwl896lp7mH/QBdto/o8CjWfshUAUi+ll+MjIjO7aQluThA7oBXHDCz4ylVK6fFspvPMfGVRuXiEhZFjooq4rfZCJU3S7KcPOVQ== 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=YCQpaihxJOLrvaTQsjpShsmKwZs4iOo01Ij7oDOtT1o=; b=TtvhNIeIOimdAMECGUUs64mw/TynP9rNoN4cjE1/IqdoHybdwI8VBnqLrqOrr/5B7Xz2aws9fv0PdPKJUJ/PrutfAgvANZE4nltDGWg3P25UmcQb+uwvQ9MhVTOZb9ZZ6WWVko3RAskjsJ+qJ5XjRMu7rm71dg3tsu6IgWIb1t4= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2437.namprd18.prod.outlook.com (20.179.91.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.15; Fri, 2 Aug 2019 03:51:10 +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.2115.005; Fri, 2 Aug 2019 03:51:10 +0000 From: Jerin Jacob Kollanukkaran To: Vamsi Krishna Attunuru , "dev@dpdk.org" CC: "thomas@monjalon.net" , Vamsi Krishna Attunuru , Nithin Kumar Dabilpuram Thread-Topic: [dpdk-dev] [PATCH v1 1/1] common/octeontx2: fix unaligned mbox memory accesses Thread-Index: AQHVSJcWfiPHEs9vKE6BWpRsVXmrGKbnOTJQ Date: Fri, 2 Aug 2019 03:51:10 +0000 Message-ID: References: <20190801182928.26216-1-vattunuru@marvell.com> In-Reply-To: <20190801182928.26216-1-vattunuru@marvell.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.140.231.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4d08d87a-fc02-49ce-0d80-08d716fca84e x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB2437; x-ms-traffictypediagnostic: BYAPR18MB2437: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 011787B9DD x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(366004)(136003)(346002)(39850400004)(396003)(199004)(13464003)(189003)(478600001)(486006)(107886003)(14454004)(446003)(86362001)(33656002)(6116002)(3846002)(9686003)(305945005)(64756008)(76176011)(2501003)(74316002)(55016002)(4326008)(66446008)(2906002)(476003)(66066001)(11346002)(66556008)(66476007)(25786009)(68736007)(7736002)(6246003)(66946007)(53936002)(76116006)(99286004)(55236004)(5660300002)(52536014)(8676002)(26005)(14444005)(256004)(81166006)(71190400001)(8936002)(7696005)(6506007)(81156014)(186003)(110136005)(229853002)(102836004)(6436002)(54906003)(316002)(53546011)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2437; 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: RZMgVyczKsnQ7RWJVxw+86Jh4PQFcUj4g7AEhMwSykvj7/vWsxzZYYpKr8HwjY7B7vbeK52ZzWzxanpARz3dWYVOcsWWWkOHWiHxtz+GJSpVwpaiw139o9C3bzHbF1LMkS5vUGI9lTQy3dfNPhdZHlqpqH2mdVJazes9GCW57B3xCd9xpGLJ+sEuIYar1MMByOEhHTpxRylOHuWTzeNdoNBY08iGpqkpbc1gphkZfdBunO0pYpJrQIBksH4W9KwWcVLsaUuG0kGjIGSIjPLfkNA6FwLceBuFFyLLR6lvJOWOOQCtNjj32N0+SjUson6dH8dgN+L7bReq/tL7u0BXRIefCxSk6RUTdNI2HVcW38noUP9xVH2DzgaCHtJ1VuiNv9S9CEySNslSb52rSFuJ37DcLnoMO/Tnsbg2o1tZnDs= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4d08d87a-fc02-49ce-0d80-08d716fca84e X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2019 03:51:10.5882 (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: BYAPR18MB2437 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-02_02:2019-07-31,2019-08-02 signatures=0 Subject: Re: [dpdk-dev] [PATCH v1 1/1] common/octeontx2: fix unaligned mbox memory accesses 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" > -----Original Message----- > From: vattunuru@marvell.com > Sent: Thursday, August 1, 2019 11:59 PM > To: dev@dpdk.org > Cc: thomas@monjalon.net; Jerin Jacob Kollanukkaran ; > Vamsi Krishna Attunuru ; Nithin Kumar > Dabilpuram > Subject: [dpdk-dev] [PATCH v1 1/1] common/octeontx2: fix unaligned mbox > memory accesses >=20 > From: Vamsi Attunuru >=20 > Octeontx2 PMD's mailbox client uses HW memory to send messages to Change "HW memory" to "device memory" to align with ARM nomenclature > mailbox server in the admin function Linux kernel driver. > The device memory used for the mailbox communication needs to be > qualified as volatile memory type to avoid unaligned device memory > accesses because of compiler's memory access coalescing. >=20 > This patch modifies the mailbox request and responses as volatile type wh= ich > were non-volatile earlier and accessed from unaligned memory addresses. >=20 > Fixes: 2b71657c8660 ("common/octeontx2: add mbox request and response > ") >=20 > Signed-off-by: Vamsi Attunuru > Signed-off-by: Nithin Dabilpuram > --- > drivers/common/octeontx2/otx2_mbox.h | 12 ++++++------ > drivers/mempool/octeontx2/otx2_mempool_debug.c | 4 ++-- > drivers/mempool/octeontx2/otx2_mempool_ops.c | 6 +++--- > drivers/net/octeontx2/otx2_ethdev_debug.c | 6 +++--- > 4 files changed, 14 insertions(+), 14 deletions(-) >=20 > diff --git a/drivers/common/octeontx2/otx2_mbox.h > b/drivers/common/octeontx2/otx2_mbox.h > index b2c59c8..ceec406 100644 > --- a/drivers/common/octeontx2/otx2_mbox.h > +++ b/drivers/common/octeontx2/otx2_mbox.h > @@ -547,7 +547,7 @@ struct npa_aq_enq_req { > uint32_t __otx2_io aura_id; > uint8_t __otx2_io ctype; > uint8_t __otx2_io op; > - union { > + __otx2_io union { > /* Valid when op =3D=3D WRITE/INIT and ctype =3D=3D AURA. > * LF fills the pool_id in aura.pool_addr. AF will translate > * the pool_id to pool context pointer. > @@ -557,7 +557,7 @@ struct npa_aq_enq_req { > struct npa_pool_s pool; Please move __otx2_io to individual members to align with other mbox elemen= ts.