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 4E1D3A00E6 for ; Fri, 12 Jul 2019 04:24:37 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 242BA2C6A; Fri, 12 Jul 2019 04:24:37 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id B66782C6A; Fri, 12 Jul 2019 04:24:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 19:24:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,480,1557212400"; d="scan'208";a="186508275" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 11 Jul 2019 19:24:34 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 11 Jul 2019 19:24:34 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.22]) with mapi id 14.03.0439.000; Fri, 12 Jul 2019 10:22:16 +0800 From: "Wang, Haiyue" To: "Ye, Xiaolong" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1] net/ice: use rx/tx DMA iova instead of phys_addr which is deprecated Thread-Index: AQHVOA6GkjCH8w6nUkCyktrEVwepbabGIceAgAAbYoCAAAJUMA== Date: Fri, 12 Jul 2019 02:22:15 +0000 Message-ID: References: <1562866026-99504-1-git-send-email-haiyue.wang@intel.com> <20190712083003.GA46916@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjExYzI0YjEtZGUxZi00Y2VmLTkyYjItZjdmNmQ4OTEzYmQxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiaXdISlFMUFdSajcxNWk0KzFEMTBLQUZvWTZsTkVpODZ1THF4RGpOQXc2SUh3UkFyaGJVblpRRHNwZG9sdW4xVSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v1] net/ice: use rx/tx DMA iova instead of phys_addr which is deprecated 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" Hi Xiaolong, > -----Original Message----- > From: Wang, Haiyue > Sent: Friday, July 12, 2019 10:12 > To: Ye, Xiaolong > Cc: dev@dpdk.org; stable@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v1] net/ice: use rx/tx DMA iova instead of= phys_addr which is > deprecated >=20 > > -----Original Message----- > > From: Ye, Xiaolong > > Sent: Friday, July 12, 2019 16:30 > > To: Wang, Haiyue > > Cc: dev@dpdk.org; stable@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v1] net/ice: use rx/tx DMA iova instead = of phys_addr which is > > deprecated > > > > Hi, Haiyue > > > > On 07/12, Haiyue Wang wrote: > > >The phys_addr concept is deprecated in rte_memzone, change it to acces= s > > >iova member, and use the type 'rte_iova_t'. > > > > > > > It seems this issue also exists in other PMDs, like ixgbe, i40e, iavf..= ., do > > you have plan to fix them all? > > > I will check them later and submit series of patches. ;) I found that ixgbe, i40e, iavf had used 'rz->iova' instead of 'rz->phys_add= r', this was the main reason that I changed it for ice. For the name & type, I think it = may be acceptable, need no more patches to change them. > > For the patch, Reviewed-by: Xiaolong Ye > > > > Thanks, > > Xiaolong > > > > >Also rename the rx/tx_ring_phys_addr definitions to rx/tx_ring_dma tha= t > > >matches the IOVA concept design. > > > > > >Fixes: 50370662b727 ("net/ice: support device and queue ops") > > >Cc: stable@dpdk.org > > > > > >Signed-off-by: Haiyue Wang > > >--- > > > drivers/net/ice/ice_rxtx.c | 8 ++++---- > > > drivers/net/ice/ice_rxtx.h | 4 ++-- > > > 2 files changed, 6 insertions(+), 6 deletions(-) > > > > > >diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c > > >index 035ed84..3353f23 100644 > > >--- a/drivers/net/ice/ice_rxtx.c > > >+++ b/drivers/net/ice/ice_rxtx.c > > >@@ -70,7 +70,7 @@ ice_program_hw_rx_queue(struct ice_rx_queue *rxq) > > > > > > memset(&rx_ctx, 0, sizeof(rx_ctx)); > > > > > >- rx_ctx.base =3D rxq->rx_ring_phys_addr / ICE_QUEUE_BASE_ADDR_UNIT; > > >+ rx_ctx.base =3D rxq->rx_ring_dma / ICE_QUEUE_BASE_ADDR_UNIT; > > > rx_ctx.qlen =3D rxq->nb_rx_desc; > > > rx_ctx.dbuf =3D rxq->rx_buf_len >> ICE_RLAN_CTX_DBUF_S; > > > rx_ctx.hbuf =3D rxq->rx_hdr_len >> ICE_RLAN_CTX_HBUF_S; > > >@@ -442,7 +442,7 @@ ice_tx_queue_start(struct rte_eth_dev *dev, uint16= _t tx_queue_id) > > > txq_elem.num_txqs =3D 1; > > > txq_elem.txqs[0].txq_id =3D rte_cpu_to_le_16(txq->reg_idx); > > > > > >- tx_ctx.base =3D txq->tx_ring_phys_addr / ICE_QUEUE_BASE_ADDR_UNIT; > > >+ tx_ctx.base =3D txq->tx_ring_dma / ICE_QUEUE_BASE_ADDR_UNIT; > > > tx_ctx.qlen =3D txq->nb_tx_desc; > > > tx_ctx.pf_num =3D hw->pf_id; > > > tx_ctx.vmvf_type =3D ICE_TLAN_CTX_VMVF_TYPE_PF; > > >@@ -663,7 +663,7 @@ ice_rx_queue_setup(struct rte_eth_dev *dev, > > > /* Zero all the descriptors in the ring. */ > > > memset(rz->addr, 0, ring_size); > > > > > >- rxq->rx_ring_phys_addr =3D rz->phys_addr; > > >+ rxq->rx_ring_dma =3D rz->iova; > > > rxq->rx_ring =3D (union ice_rx_desc *)rz->addr; > > > > > > #ifdef RTE_LIBRTE_ICE_RX_ALLOW_BULK_ALLOC > > >@@ -881,7 +881,7 @@ ice_tx_queue_setup(struct rte_eth_dev *dev, > > > txq->vsi =3D vsi; > > > txq->tx_deferred_start =3D tx_conf->tx_deferred_start; > > > > > >- txq->tx_ring_phys_addr =3D tz->phys_addr; > > >+ txq->tx_ring_dma =3D tz->iova; > > > txq->tx_ring =3D (struct ice_tx_desc *)tz->addr; > > > > > > /* Allocate software ring */ > > >diff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h > > >index 9040e3f..e921411 100644 > > >--- a/drivers/net/ice/ice_rxtx.h > > >+++ b/drivers/net/ice/ice_rxtx.h > > >@@ -46,7 +46,7 @@ struct ice_rx_entry { > > > struct ice_rx_queue { > > > struct rte_mempool *mp; /* mbuf pool to populate RX ring */ > > > volatile union ice_rx_desc *rx_ring;/* RX ring virtual address */ > > >- uint64_t rx_ring_phys_addr; /* RX ring DMA address */ > > >+ rte_iova_t rx_ring_dma; /* RX ring DMA address */ > > > struct ice_rx_entry *sw_ring; /* address of RX soft ring */ > > > uint16_t nb_rx_desc; /* number of RX descriptors */ > > > uint16_t rx_free_thresh; /* max free RX desc to hold */ > > >@@ -87,7 +87,7 @@ struct ice_tx_entry { > > > > > > struct ice_tx_queue { > > > uint16_t nb_tx_desc; /* number of TX descriptors */ > > >- uint64_t tx_ring_phys_addr; /* TX ring DMA address */ > > >+ rte_iova_t tx_ring_dma; /* TX ring DMA address */ > > > volatile struct ice_tx_desc *tx_ring; /* TX ring virtual address */ > > > struct ice_tx_entry *sw_ring; /* virtual address of SW ring */ > > > uint16_t tx_tail; /* current value of tail register */ > > >-- > > >2.7.4 > > >