From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 065387CF6 for ; Mon, 4 Sep 2017 17:25:26 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2017 08:25:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,475,1498546800"; d="scan'208";a="145327173" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga005.jf.intel.com with ESMTP; 04 Sep 2017 08:25:23 -0700 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX102.ger.corp.intel.com (163.33.3.155) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 16:25:22 +0100 Received: from irsmsx109.ger.corp.intel.com ([169.254.13.28]) by irsmsx155.ger.corp.intel.com ([169.254.14.70]) with mapi id 14.03.0319.002; Mon, 4 Sep 2017 16:25:22 +0100 From: "Burakov, Anatoly" To: Santosh Shukla , "dev@dpdk.org" CC: "thomas@monjalon.net" , "jerin.jacob@caviumnetworks.com" , "hemant.agrawal@nxp.com" , "olivier.matz@6wind.com" , "maxime.coquelin@redhat.com" , "Gonzalez Monroy, Sergio" , "Richardson, Bruce" , "shreyansh.jain@nxp.com" , "gaetan.rivet@6wind.com" , "stephen@networkplumber.org" , "aconole@redhat.com" Thread-Topic: [PATCH v7 4/9] bus: get iommu class Thread-Index: AQHTIgkNm/0EitqzI02yg8I2eKdhdaKk39kg Date: Mon, 4 Sep 2017 15:25:21 +0000 Message-ID: References: <20170814161059.6684-1-santosh.shukla@caviumnetworks.com> <20170831032618.7120-1-santosh.shukla@caviumnetworks.com> <20170831032618.7120-5-santosh.shukla@caviumnetworks.com> In-Reply-To: <20170831032618.7120-5-santosh.shukla@caviumnetworks.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_PUBLIC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjkyM2Y5ZjEtNjk2Ni00YjI1LWJiOWYtNTYxZThlYWYyNWEwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNi41LjkuMyIsIlRydXN0ZWRMYWJlbEhhc2giOiJzODRmV1NTWjM5Q25xZHI3Q3N1YkVEUWtKZ25IeW1sOHUxVGNpZzJBYXpRPSJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action 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 v7 4/9] bus: get iommu class 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: , X-List-Received-Date: Mon, 04 Sep 2017 15:25:27 -0000 > From: Santosh Shukla [mailto:santosh.shukla@caviumnetworks.com] > Sent: Thursday, August 31, 2017 4:26 AM > To: dev@dpdk.org > Cc: thomas@monjalon.net; jerin.jacob@caviumnetworks.com; > hemant.agrawal@nxp.com; olivier.matz@6wind.com; > maxime.coquelin@redhat.com; Gonzalez Monroy, Sergio > ; Richardson, Bruce > ; shreyansh.jain@nxp.com; > gaetan.rivet@6wind.com; Burakov, Anatoly ; > stephen@networkplumber.org; aconole@redhat.com; Santosh Shukla > > Subject: [PATCH v7 4/9] bus: get iommu class >=20 > API(rte_bus_get_iommu_class) helps to automatically detect and select > appropriate iova mapping scheme for iommu capable device on that bus. >=20 > Algorithm for iova scheme selection for bus: > 0. Iterate through bus_list. > 1. Collect each bus iova mode value and update into 'mode' var. > 2. Mode selection scheme is: > if mode =3D=3D 0 then iova mode is _pa, > if mode =3D=3D 1 then iova mode is _pa, > if mode =3D=3D 2 then iova mode is _va, > if mode =3D=3D 3 then iova mode ia _pa. >=20 > So mode !=3D2 will be default iova mode (_pa). >=20 > Signed-off-by: Santosh Shukla > Signed-off-by: Jerin Jacob > Reviewed-by: Maxime Coquelin > Acked-by: Hemant Agrawal > --- Reviewed-by: Anatoly Burakov