From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 56C01C326 for ; Tue, 23 Jun 2015 03:21:31 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 22 Jun 2015 18:21:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,663,1427785200"; d="scan'208";a="751430834" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga002.jf.intel.com with ESMTP; 22 Jun 2015 18:21:30 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 23 Jun 2015 09:21:27 +0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.165]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.146]) with mapi id 14.03.0224.002; Tue, 23 Jun 2015 09:21:24 +0800 From: "He, Shaopeng" To: Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH] fm10k: support XEN domain0 Thread-Index: AQHQju0R4dHaa4L0okWP5aPaWkV2Cp2c2HSAgBypsMA= Date: Tue, 23 Jun 2015 01:21:24 +0000 Message-ID: References: <1431680162-13704-1-git-send-email-shaopeng.he@intel.com> <1ED644BD7E0A5F4091CF203DAFB8E4CC0575FDE4@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <1ED644BD7E0A5F4091CF203DAFB8E4CC0575FDE4@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] fm10k: support XEN domain0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jun 2015 01:21:31 -0000 Hi Thomas, > -----Original Message----- > From: Liu, Jijiang > Sent: Friday, June 05, 2015 11:18 AM > To: dev@dpdk.org > Cc: He, Shaopeng > Subject: RE: [dpdk-dev] [PATCH] fm10k: support XEN domain0 >=20 >=20 > Acked-by: Jijiang Liu >=20 > I think this patch could be merged before Stephen's following patch[1] is > merged, then Stephen should rework the patch[1]. > Thanks. >=20 > [1]http://dpdk.org/ml/archives/dev/2015-March/014992.html Do you think we can accept this patch in current no-so-elegant way, so user= can use XEN with fm10k from release 2.1; or better to wait for Stephen's patch? Thank you in advance for your attention to this matter. Best Regards, --Shaopeng > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Shaopeng He > > Sent: Friday, May 15, 2015 4:56 PM > > To: dev@dpdk.org > > Cc: He, Shaopeng > > Subject: [dpdk-dev] [PATCH] fm10k: support XEN domain0 > > > > fm10k was failing to run in XEN domain0, as the physical memory for DMA > > should be allocated and translated in a different way for XEN domain0. = So > > rte_memzone_reserve_bounded() should be used for DMA memory > > allocation, and rte_mem_phy2mch() should be used for DMA memory > > address translation to support running fm10k PMD in XEN domain0. > > > > Signed-off-by: Shaopeng He > > --- > > lib/librte_pmd_fm10k/fm10k_ethdev.c | 8 ++++++++ > > 1 file changed, 8 insertions(+) > > > > diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c > > b/lib/librte_pmd_fm10k/fm10k_ethdev.c > > index 275c19c..c85c856 100644 > > --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c > > +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c > > @@ -1004,7 +1004,11 @@ fm10k_rx_queue_setup(struct rte_eth_dev > *dev, > > uint16_t queue_id, > > return (-ENOMEM); > > } > > q->hw_ring =3D mz->addr; > > +#ifdef RTE_LIBRTE_XEN_DOM0 > > + q->hw_ring_phys_addr =3D rte_mem_phy2mch(mz->memseg_id, mz- > > >phys_addr); > > +#else > > q->hw_ring_phys_addr =3D mz->phys_addr; > > +#endif > > > > dev->data->rx_queues[queue_id] =3D q; > > return 0; > > @@ -1150,7 +1154,11 @@ fm10k_tx_queue_setup(struct rte_eth_dev > *dev, > > uint16_t queue_id, > > return (-ENOMEM); > > } > > q->hw_ring =3D mz->addr; > > +#ifdef RTE_LIBRTE_XEN_DOM0 > > + q->hw_ring_phys_addr =3D rte_mem_phy2mch(mz->memseg_id, mz- > > >phys_addr); > > +#else > > q->hw_ring_phys_addr =3D mz->phys_addr; > > +#endif > > > > /* > > * allocate memory for the RS bit tracker. Enough slots to hold the > > -- > > 1.9.3 >=20