From: Thomas Monjalon <thomas@monjalon.net>
To: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Cc: olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com,
anatoly.burakov@intel.com, dev@dpdk.org
Subject: [dpdk-dev] [PATCH v4 14/15] drivers/net: rename physical address type to IOVA
Date: Mon, 6 Nov 2017 02:41:40 +0100 [thread overview]
Message-ID: <20171106014141.13266-15-thomas@monjalon.net> (raw)
In-Reply-To: <20171106014141.13266-1-thomas@monjalon.net>
From: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Renamed data type from phys_addr_t to rte_iova_t.
Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Anatoly Burakov <anatoly.burakov@intel.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/ark/ark_ddm.c | 2 +-
drivers/net/ark/ark_ddm.h | 4 +--
drivers/net/ark/ark_ethdev_rx.c | 12 ++++-----
drivers/net/ark/ark_ethdev_tx.c | 2 +-
drivers/net/ark/ark_mpu.c | 2 +-
drivers/net/ark/ark_mpu.h | 4 +--
drivers/net/ark/ark_udm.c | 2 +-
drivers/net/ark/ark_udm.h | 4 +--
drivers/net/avp/avp_ethdev.c | 2 +-
drivers/net/avp/rte_avp_common.h | 20 +++++++--------
drivers/net/bnx2x/bnx2x.c | 40 +++++++++++++++---------------
drivers/net/bnx2x/bnx2x.h | 22 ++++++++--------
drivers/net/bnx2x/bnx2x_rxtx.c | 4 +--
drivers/net/bnx2x/bnx2x_stats.c | 2 +-
drivers/net/bnx2x/bnx2x_vfpf.c | 2 +-
drivers/net/bnx2x/ecore_sp.h | 2 +-
drivers/net/bnxt/bnxt.h | 10 ++++----
drivers/net/bnxt/bnxt_cpr.h | 4 +--
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bnxt/bnxt_hwrm.c | 6 ++---
drivers/net/bnxt/bnxt_ring.c | 2 +-
drivers/net/bnxt/bnxt_ring.h | 2 +-
drivers/net/bnxt/bnxt_rxr.h | 4 +--
drivers/net/bnxt/bnxt_txr.h | 2 +-
drivers/net/bnxt/bnxt_vnic.c | 2 +-
drivers/net/bnxt/bnxt_vnic.h | 6 ++---
drivers/net/liquidio/lio_rxtx.c | 4 +--
drivers/net/liquidio/lio_rxtx.h | 4 +--
drivers/net/octeontx/base/octeontx_pkovf.c | 2 +-
drivers/net/qede/base/bcm_osal.h | 2 +-
drivers/net/sfc/efsys.h | 2 +-
drivers/net/sfc/sfc.c | 2 +-
drivers/net/sfc/sfc_ef10_rx.c | 2 +-
drivers/net/sfc/sfc_ef10_tx.c | 4 +--
drivers/net/thunderx/base/nicvf_hw.c | 2 +-
drivers/net/thunderx/base/nicvf_hw.h | 2 +-
drivers/net/thunderx/base/nicvf_hw_defs.h | 6 ++---
drivers/net/thunderx/nicvf_ethdev.c | 4 +--
drivers/net/thunderx/nicvf_ethdev.h | 4 +--
drivers/net/thunderx/nicvf_struct.h | 6 ++---
drivers/net/virtio/virtio_rxtx.h | 4 +--
drivers/net/virtio/virtqueue.h | 4 +--
lib/librte_vhost/vhost.h | 2 +-
43 files changed, 111 insertions(+), 111 deletions(-)
diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c
index 221460c78..929dc7d1f 100644
--- a/drivers/net/ark/ark_ddm.c
+++ b/drivers/net/ark/ark_ddm.c
@@ -93,7 +93,7 @@ ark_ddm_reset(struct ark_ddm_t *ddm)
}
void
-ark_ddm_setup(struct ark_ddm_t *ddm, phys_addr_t cons_addr, uint32_t interval)
+ark_ddm_setup(struct ark_ddm_t *ddm, rte_iova_t cons_addr, uint32_t interval)
{
ddm->setup.cons_write_index_addr = cons_addr;
ddm->setup.write_index_interval = interval / 4; /* 4 ns period */
diff --git a/drivers/net/ark/ark_ddm.h b/drivers/net/ark/ark_ddm.h
index de61926c3..f67ad012c 100644
--- a/drivers/net/ark/ark_ddm.h
+++ b/drivers/net/ark/ark_ddm.h
@@ -127,7 +127,7 @@ struct ark_ddm_cpld_ps_t {
#define ARK_DDM_SETUP 0x00e0
struct ark_ddm_setup_t {
- phys_addr_t cons_write_index_addr;
+ rte_iova_t cons_write_index_addr;
uint32_t write_index_interval; /* 4ns each */
volatile uint32_t cons_index;
};
@@ -165,7 +165,7 @@ void ark_ddm_start(struct ark_ddm_t *ddm);
int ark_ddm_stop(struct ark_ddm_t *ddm, const int wait);
void ark_ddm_reset(struct ark_ddm_t *ddm);
void ark_ddm_stats_reset(struct ark_ddm_t *ddm);
-void ark_ddm_setup(struct ark_ddm_t *ddm, phys_addr_t cons_addr,
+void ark_ddm_setup(struct ark_ddm_t *ddm, rte_iova_t cons_addr,
uint32_t interval);
void ark_ddm_dump_stats(struct ark_ddm_t *ddm, const char *msg);
void ark_ddm_dump(struct ark_ddm_t *ddm, const char *msg);
diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c
index 2ffaeac3e..a3c0377c6 100644
--- a/drivers/net/ark/ark_ethdev_rx.c
+++ b/drivers/net/ark/ark_ethdev_rx.c
@@ -61,7 +61,7 @@ struct ark_rx_queue {
struct rte_mbuf **reserve_q;
/* array of physical addresses of the mbuf data pointer */
/* This point is a virtual address */
- phys_addr_t *paddress_q;
+ rte_iova_t *paddress_q;
struct rte_mempool *mb_pool;
struct ark_udm_t *udm;
@@ -95,9 +95,9 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
struct ark_rx_queue *queue,
uint16_t rx_queue_id __rte_unused, uint16_t rx_queue_idx)
{
- phys_addr_t queue_base;
- phys_addr_t phys_addr_q_base;
- phys_addr_t phys_addr_prod_index;
+ rte_iova_t queue_base;
+ rte_iova_t phys_addr_q_base;
+ rte_iova_t phys_addr_prod_index;
queue_base = rte_malloc_virt2iova(queue);
phys_addr_prod_index = queue_base +
@@ -106,7 +106,7 @@ eth_ark_rx_hw_setup(struct rte_eth_dev *dev,
phys_addr_q_base = rte_malloc_virt2iova(queue->paddress_q);
/* Verify HW */
- if (ark_mpu_verify(queue->mpu, sizeof(phys_addr_t))) {
+ if (ark_mpu_verify(queue->mpu, sizeof(rte_iova_t))) {
PMD_DRV_LOG(ERR, "Illegal configuration rx queue\n");
return -1;
}
@@ -204,7 +204,7 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev,
socket_id);
queue->paddress_q =
rte_zmalloc_socket("Ark_rx_queue paddr",
- nb_desc * sizeof(phys_addr_t),
+ nb_desc * sizeof(rte_iova_t),
64,
socket_id);
diff --git a/drivers/net/ark/ark_ethdev_tx.c b/drivers/net/ark/ark_ethdev_tx.c
index 0d3c7dc41..4ef55d10a 100644
--- a/drivers/net/ark/ark_ethdev_tx.c
+++ b/drivers/net/ark/ark_ethdev_tx.c
@@ -310,7 +310,7 @@ eth_ark_tx_queue_setup(struct rte_eth_dev *dev,
static int
eth_ark_tx_hw_queue_config(struct ark_tx_queue *queue)
{
- phys_addr_t queue_base, ring_base, cons_index_addr;
+ rte_iova_t queue_base, ring_base, cons_index_addr;
uint32_t write_interval_ns;
/* Verify HW -- MPU */
diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c
index cd2c0788f..d4ba6dc70 100644
--- a/drivers/net/ark/ark_mpu.c
+++ b/drivers/net/ark/ark_mpu.c
@@ -118,7 +118,7 @@ ark_mpu_reset_stats(struct ark_mpu_t *mpu)
}
int
-ark_mpu_configure(struct ark_mpu_t *mpu, phys_addr_t ring, uint32_t ring_size,
+ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring, uint32_t ring_size,
int is_tx)
{
ark_mpu_reset(mpu);
diff --git a/drivers/net/ark/ark_mpu.h b/drivers/net/ark/ark_mpu.h
index a0171dbd6..f6f6c808c 100644
--- a/drivers/net/ark/ark_mpu.h
+++ b/drivers/net/ark/ark_mpu.h
@@ -75,7 +75,7 @@ struct ark_mpu_hw_t {
#define ARK_MPU_CFG 0x040
struct ark_mpu_cfg_t {
- phys_addr_t ring_base; /* phys_addr_t is a uint64_t */
+ rte_iova_t ring_base; /* rte_iova_t is a uint64_t */
uint32_t ring_size;
uint32_t ring_mask;
uint32_t min_host_move;
@@ -137,7 +137,7 @@ int ark_mpu_verify(struct ark_mpu_t *mpu, uint32_t obj_size);
void ark_mpu_stop(struct ark_mpu_t *mpu);
void ark_mpu_start(struct ark_mpu_t *mpu);
int ark_mpu_reset(struct ark_mpu_t *mpu);
-int ark_mpu_configure(struct ark_mpu_t *mpu, phys_addr_t ring,
+int ark_mpu_configure(struct ark_mpu_t *mpu, rte_iova_t ring,
uint32_t ring_size, int is_tx);
void ark_mpu_dump(struct ark_mpu_t *mpu, const char *msg, uint16_t idx);
diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c
index 1ba7d26d4..7a429ac7e 100644
--- a/drivers/net/ark/ark_udm.c
+++ b/drivers/net/ark/ark_udm.c
@@ -122,7 +122,7 @@ ark_udm_configure(struct ark_udm_t *udm,
}
void
-ark_udm_write_addr(struct ark_udm_t *udm, phys_addr_t addr)
+ark_udm_write_addr(struct ark_udm_t *udm, rte_iova_t addr)
{
udm->rt_cfg.hw_prod_addr = addr;
}
diff --git a/drivers/net/ark/ark_udm.h b/drivers/net/ark/ark_udm.h
index 29bf1e8f7..915343fe2 100644
--- a/drivers/net/ark/ark_udm.h
+++ b/drivers/net/ark/ark_udm.h
@@ -137,7 +137,7 @@ struct ark_udm_tlp_ps_t {
#define ARK_UDM_RT_CFG 0x00e0
struct ark_udm_rt_cfg_t {
- phys_addr_t hw_prod_addr;
+ rte_iova_t hw_prod_addr;
uint32_t write_interval; /* 4ns cycles */
volatile uint32_t prod_idx; /* RO */
};
@@ -171,7 +171,7 @@ void ark_udm_configure(struct ark_udm_t *udm,
uint32_t headroom,
uint32_t dataroom,
uint32_t write_interval_ns);
-void ark_udm_write_addr(struct ark_udm_t *udm, phys_addr_t addr);
+void ark_udm_write_addr(struct ark_udm_t *udm, rte_iova_t addr);
void ark_udm_stats_reset(struct ark_udm_t *udm);
void ark_udm_dump_stats(struct ark_udm_t *udm, const char *msg);
void ark_udm_dump_queue_stats(struct ark_udm_t *udm, const char *msg,
diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index d615a2fb7..9b342bfa3 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -387,7 +387,7 @@ avp_dev_translate_buffer(struct avp_dev *avp, void *host_mbuf_address)
/* translate from host physical address to guest virtual address */
static void *
avp_dev_translate_address(struct rte_eth_dev *eth_dev,
- phys_addr_t host_phys_addr)
+ rte_iova_t host_phys_addr)
{
struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
struct rte_mem_resource *resource;
diff --git a/drivers/net/avp/rte_avp_common.h b/drivers/net/avp/rte_avp_common.h
index 488d72168..54437e9a1 100644
--- a/drivers/net/avp/rte_avp_common.h
+++ b/drivers/net/avp/rte_avp_common.h
@@ -243,7 +243,7 @@ struct rte_avp_desc {
*/
struct rte_avp_memmap {
void *addr;
- phys_addr_t phys_addr;
+ rte_iova_t phys_addr;
uint64_t length;
};
@@ -345,7 +345,7 @@ RTE_AVP_MAKE_VERSION(RTE_AVP_RELEASE_VERSION_1, \
*/
struct rte_avp_mempool_info {
void *addr;
- phys_addr_t phys_addr;
+ rte_iova_t phys_addr;
uint64_t length;
};
@@ -359,10 +359,10 @@ struct rte_avp_device_info {
char ifname[RTE_AVP_NAMESIZE]; /**< Network device name for AVP */
- phys_addr_t tx_phys;
- phys_addr_t rx_phys;
- phys_addr_t alloc_phys;
- phys_addr_t free_phys;
+ rte_iova_t tx_phys;
+ rte_iova_t rx_phys;
+ rte_iova_t alloc_phys;
+ rte_iova_t free_phys;
uint32_t features; /**< Supported feature bitmap */
uint8_t min_rx_queues; /**< Minimum supported receive/free queues */
@@ -379,14 +379,14 @@ struct rte_avp_device_info {
uint32_t free_size; /**< Size of each free queue */
/* Used by Ethtool */
- phys_addr_t req_phys;
- phys_addr_t resp_phys;
- phys_addr_t sync_phys;
+ rte_iova_t req_phys;
+ rte_iova_t resp_phys;
+ rte_iova_t sync_phys;
void *sync_va;
/* mbuf mempool (used when a single memory area is supported) */
void *mbuf_va;
- phys_addr_t mbuf_phys;
+ rte_iova_t mbuf_phys;
/* mbuf mempools */
struct rte_avp_mempool_info pool[RTE_AVP_MAX_MEMPOOLS];
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 99b532bb4..9394f6c50 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -419,7 +419,7 @@ void bnx2x_read_dmae(struct bnx2x_softc *sc, uint32_t src_addr, uint32_t len32)
}
void
-bnx2x_write_dmae(struct bnx2x_softc *sc, phys_addr_t dma_addr, uint32_t dst_addr,
+bnx2x_write_dmae(struct bnx2x_softc *sc, rte_iova_t dma_addr, uint32_t dst_addr,
uint32_t len32)
{
struct dmae_command dmae;
@@ -447,7 +447,7 @@ bnx2x_write_dmae(struct bnx2x_softc *sc, phys_addr_t dma_addr, uint32_t dst_addr
}
static void
-bnx2x_write_dmae_phys_len(struct bnx2x_softc *sc, phys_addr_t phys_addr,
+bnx2x_write_dmae_phys_len(struct bnx2x_softc *sc, rte_iova_t phys_addr,
uint32_t addr, uint32_t len)
{
uint32_t dmae_wr_max = DMAE_LEN32_WR_MAX(sc);
@@ -823,14 +823,14 @@ bnx2x_fw_command(struct bnx2x_softc *sc, uint32_t command, uint32_t param)
static void
__storm_memset_dma_mapping(struct bnx2x_softc *sc, uint32_t addr,
- phys_addr_t mapping)
+ rte_iova_t mapping)
{
REG_WR(sc, addr, U64_LO(mapping));
REG_WR(sc, (addr + 4), U64_HI(mapping));
}
static void
-storm_memset_spq_addr(struct bnx2x_softc *sc, phys_addr_t mapping,
+storm_memset_spq_addr(struct bnx2x_softc *sc, rte_iova_t mapping,
uint16_t abs_fid)
{
uint32_t addr = (XSEM_REG_FAST_MEMORY +
@@ -1498,7 +1498,7 @@ bnx2x_set_q_rx_mode(struct bnx2x_softc *sc, uint8_t cl_id,
ramrod_param.rdata = BNX2X_SP(sc, rx_mode_rdata);
ramrod_param.rdata_mapping =
- (phys_addr_t)BNX2X_SP_MAPPING(sc, rx_mode_rdata),
+ (rte_iova_t)BNX2X_SP_MAPPING(sc, rx_mode_rdata),
bnx2x_set_bit(ECORE_FILTER_RX_MODE_PENDING, &sc->sp_state);
ramrod_param.ramrod_flags = ramrod_flags;
@@ -4599,9 +4599,9 @@ static void bnx2x_init_func_obj(struct bnx2x_softc *sc)
ecore_init_func_obj(sc,
&sc->func_obj,
BNX2X_SP(sc, func_rdata),
- (phys_addr_t)BNX2X_SP_MAPPING(sc, func_rdata),
+ (rte_iova_t)BNX2X_SP_MAPPING(sc, func_rdata),
BNX2X_SP(sc, func_afex_rdata),
- (phys_addr_t)BNX2X_SP_MAPPING(sc, func_afex_rdata),
+ (rte_iova_t)BNX2X_SP_MAPPING(sc, func_afex_rdata),
&bnx2x_func_sp_drv);
}
@@ -4772,7 +4772,7 @@ static void bnx2x_map_sb_state_machines(struct hc_index_data *index_data)
}
static void
-bnx2x_init_sb(struct bnx2x_softc *sc, phys_addr_t busaddr, int vfid,
+bnx2x_init_sb(struct bnx2x_softc *sc, rte_iova_t busaddr, int vfid,
uint8_t vf_valid, int fw_sb_id, int igu_sb_id)
{
struct hc_status_block_data_e2 sb_data_e2;
@@ -4918,7 +4918,7 @@ static void bnx2x_init_eth_fp(struct bnx2x_softc *sc, int idx)
sc->max_cos,
SC_FUNC(sc),
BNX2X_SP(sc, q_rdata),
- (phys_addr_t)BNX2X_SP_MAPPING(sc, q_rdata),
+ (rte_iova_t)BNX2X_SP_MAPPING(sc, q_rdata),
q_type);
/* configure classification DBs */
@@ -4928,7 +4928,7 @@ static void bnx2x_init_eth_fp(struct bnx2x_softc *sc, int idx)
idx,
SC_FUNC(sc),
BNX2X_SP(sc, mac_rdata),
- (phys_addr_t)BNX2X_SP_MAPPING(sc, mac_rdata),
+ (rte_iova_t)BNX2X_SP_MAPPING(sc, mac_rdata),
ECORE_FILTER_MAC_PENDING, &sc->sp_state,
ECORE_OBJ_TYPE_RX_TX, &sc->macs_pool);
}
@@ -5028,7 +5028,7 @@ static void bnx2x_init_tx_rings(struct bnx2x_softc *sc)
static void bnx2x_init_def_sb(struct bnx2x_softc *sc)
{
struct host_sp_status_block *def_sb = sc->def_sb;
- phys_addr_t mapping = sc->def_sb_dma.paddr;
+ rte_iova_t mapping = sc->def_sb_dma.paddr;
int igu_sp_sb_index;
int igu_seg_id;
int port = SC_PORT(sc);
@@ -5700,7 +5700,7 @@ static void bnx2x_init_objs(struct bnx2x_softc *sc)
SC_FUNC(sc),
SC_FUNC(sc),
BNX2X_SP(sc, mcast_rdata),
- (phys_addr_t)BNX2X_SP_MAPPING(sc, mcast_rdata),
+ (rte_iova_t)BNX2X_SP_MAPPING(sc, mcast_rdata),
ECORE_FILTER_MCAST_PENDING,
&sc->sp_state, o_type);
@@ -5724,7 +5724,7 @@ static void bnx2x_init_objs(struct bnx2x_softc *sc)
SC_FUNC(sc),
SC_FUNC(sc),
BNX2X_SP(sc, rss_rdata),
- (phys_addr_t)BNX2X_SP_MAPPING(sc, rss_rdata),
+ (rte_iova_t)BNX2X_SP_MAPPING(sc, rss_rdata),
ECORE_FILTER_RSS_CONF_PENDING,
&sc->sp_state, ECORE_OBJ_TYPE_RX);
}
@@ -6445,9 +6445,9 @@ bnx2x_pf_rx_q_prep(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
pause->pri_map = 1;
/* rxq setup */
- rxq_init->dscr_map = (phys_addr_t)rxq->rx_ring_phys_addr;
- rxq_init->rcq_map = (phys_addr_t)rxq->cq_ring_phys_addr;
- rxq_init->rcq_np_map = (phys_addr_t)(rxq->cq_ring_phys_addr +
+ rxq_init->dscr_map = (rte_iova_t)rxq->rx_ring_phys_addr;
+ rxq_init->rcq_map = (rte_iova_t)rxq->cq_ring_phys_addr;
+ rxq_init->rcq_np_map = (rte_iova_t)(rxq->cq_ring_phys_addr +
BNX2X_PAGE_SIZE);
/*
@@ -6486,7 +6486,7 @@ bnx2x_pf_tx_q_prep(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,
PMD_TX_LOG(ERR, "ERROR: TX queue is NULL");
return;
}
- txq_init->dscr_map = (phys_addr_t)txq->tx_ring_phys_addr;
+ txq_init->dscr_map = (rte_iova_t)txq->tx_ring_phys_addr;
txq_init->sb_cq_index = HC_INDEX_ETH_FIRST_TX_CQ_CONS + cos;
txq_init->traffic_type = LLFC_TRAFFIC_TYPE_NW;
txq_init->fw_sb_id = fp->fw_sb_id;
@@ -11059,7 +11059,7 @@ static int bnx2x_init_hw_func(struct bnx2x_softc *sc)
for (i = 0; i < L2_ILT_LINES(sc); i++) {
ilt->lines[cdu_ilt_start + i].page = sc->context[i].vcxt;
ilt->lines[cdu_ilt_start + i].page_mapping =
- (phys_addr_t)sc->context[i].vcxt_dma.paddr;
+ (rte_iova_t)sc->context[i].vcxt_dma.paddr;
ilt->lines[cdu_ilt_start + i].size = sc->context[i].size;
}
ecore_ilt_init_op(sc, INITOP_SET);
@@ -11357,7 +11357,7 @@ static void bnx2x_reset_port(struct bnx2x_softc *sc)
}
}
-static void bnx2x_ilt_wr(struct bnx2x_softc *sc, uint32_t index, phys_addr_t addr)
+static void bnx2x_ilt_wr(struct bnx2x_softc *sc, uint32_t index, rte_iova_t addr)
{
int reg;
uint32_t wb_write[2];
@@ -11587,7 +11587,7 @@ static int ecore_gunzip(struct bnx2x_softc *sc, const uint8_t * zbuf, int len)
}
static void
-ecore_write_dmae_phys_len(struct bnx2x_softc *sc, phys_addr_t phys_addr,
+ecore_write_dmae_phys_len(struct bnx2x_softc *sc, rte_iova_t phys_addr,
uint32_t addr, uint32_t len)
{
bnx2x_write_dmae_phys_len(sc, phys_addr, addr, len);
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h
index 497bc69cf..17075d384 100644
--- a/drivers/net/bnx2x/bnx2x.h
+++ b/drivers/net/bnx2x/bnx2x.h
@@ -318,7 +318,7 @@ struct bnx2x_bar {
/* Used to manage DMA allocations. */
struct bnx2x_dma {
struct bnx2x_softc *sc;
- phys_addr_t paddr;
+ rte_iova_t paddr;
void *vaddr;
int nseg;
char msg[RTE_MEMZONE_NAMESIZE - 6];
@@ -371,10 +371,10 @@ struct bnx2x_fastpath {
struct bnx2x_dma sb_dma;
union bnx2x_host_hc_status_block status_block;
- phys_addr_t tx_desc_mapping;
+ rte_iova_t tx_desc_mapping;
- phys_addr_t rx_desc_mapping;
- phys_addr_t rx_comp_mapping;
+ rte_iova_t rx_desc_mapping;
+ rte_iova_t rx_comp_mapping;
uint16_t *sb_index_values;
uint16_t *sb_running_index;
@@ -469,7 +469,7 @@ union cdu_context {
struct hw_context {
struct bnx2x_dma vcxt_dma;
union cdu_context *vcxt;
- //phys_addr_t cxt_mapping;
+ //rte_iova_t cxt_mapping;
size_t size;
};
@@ -1243,7 +1243,7 @@ struct bnx2x_softc {
uint32_t gz_outlen;
#define GUNZIP_BUF(sc) (sc->gz_buf)
#define GUNZIP_OUTLEN(sc) (sc->gz_outlen)
-#define GUNZIP_PHYS(sc) (phys_addr_t)(sc->gz_buf_dma.paddr)
+#define GUNZIP_PHYS(sc) (rte_iova_t)(sc->gz_buf_dma.paddr)
#define FW_BUF_SIZE 0x40000
struct raw_op *init_ops;
@@ -1311,14 +1311,14 @@ struct bnx2x_softc {
*/
int fw_stats_req_size;
struct bnx2x_fw_stats_req *fw_stats_req;
- phys_addr_t fw_stats_req_mapping;
+ rte_iova_t fw_stats_req_mapping;
/*
* FW statistics data shortcut (points at the beginning of fw_stats
* buffer + fw_stats_req_size).
*/
int fw_stats_data_size;
struct bnx2x_fw_stats_data *fw_stats_data;
- phys_addr_t fw_stats_data_mapping;
+ rte_iova_t fw_stats_data_mapping;
/* tracking a pending STAT_QUERY ramrod */
uint16_t stats_pending;
@@ -1403,8 +1403,8 @@ union bnx2x_stats_show_data {
#define FUNC_FLG_LEADING 0x0020 /* PF only */
struct bnx2x_func_init_params {
- phys_addr_t fw_stat_map; /* (dma) valid if FUNC_FLG_STATS */
- phys_addr_t spq_map; /* (dma) valid if FUNC_FLG_SPQ */
+ rte_iova_t fw_stat_map; /* (dma) valid if FUNC_FLG_STATS */
+ rte_iova_t spq_map; /* (dma) valid if FUNC_FLG_SPQ */
uint16_t func_flgs;
uint16_t func_id; /* abs function id */
uint16_t pf_id;
@@ -1749,7 +1749,7 @@ uint32_t bnx2x_dmae_opcode(struct bnx2x_softc *sc, uint8_t src_type,
uint8_t comp_type);
void bnx2x_post_dmae(struct bnx2x_softc *sc, struct dmae_command *dmae, int idx);
void bnx2x_read_dmae(struct bnx2x_softc *sc, uint32_t src_addr, uint32_t len32);
-void bnx2x_write_dmae(struct bnx2x_softc *sc, phys_addr_t dma_addr,
+void bnx2x_write_dmae(struct bnx2x_softc *sc, rte_iova_t dma_addr,
uint32_t dst_addr, uint32_t len32);
void bnx2x_set_ctx_validation(struct bnx2x_softc *sc, struct eth_context *cxt,
uint32_t cid);
diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index 7c3324a6d..a0d4ac929 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -71,8 +71,8 @@ bnx2x_dev_rx_queue_setup(struct rte_eth_dev *dev,
struct bnx2x_softc *sc = dev->data->dev_private;
struct bnx2x_fastpath *fp = &sc->fp[queue_idx];
struct eth_rx_cqe_next_page *nextpg;
- phys_addr_t *rx_bd;
- phys_addr_t busaddr;
+ rte_iova_t *rx_bd;
+ rte_iova_t busaddr;
/* First allocate the rx queue data structure */
rxq = rte_zmalloc_socket("ethdev RX queue", sizeof(struct bnx2x_rx_queue),
diff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c
index 6223cfef1..b9b859639 100644
--- a/drivers/net/bnx2x/bnx2x_stats.c
+++ b/drivers/net/bnx2x/bnx2x_stats.c
@@ -1338,7 +1338,7 @@ bnx2x_prep_fw_stats_req(struct bnx2x_softc *sc)
int i;
int first_queue_query_index;
struct stats_query_header *stats_hdr = &sc->fw_stats_req->hdr;
- phys_addr_t cur_data_offset;
+ rte_iova_t cur_data_offset;
struct stats_query_entry *cur_query_entry;
stats_hdr->cmd_num = sc->fw_stats_num;
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
index 0ca0df876..3c08f2a2b 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
@@ -113,7 +113,7 @@ bnx2x_vf_finalize(struct bnx2x_softc *sc,
#define BNX2X_VF_CHANNEL_TRIES 100
static int
-bnx2x_do_req4pf(struct bnx2x_softc *sc, phys_addr_t phys_addr)
+bnx2x_do_req4pf(struct bnx2x_softc *sc, rte_iova_t phys_addr)
{
uint8_t *status = &sc->vf2pf_mbox->resp.common_reply.status;
uint8_t i;
diff --git a/drivers/net/bnx2x/ecore_sp.h b/drivers/net/bnx2x/ecore_sp.h
index 85ab4c28f..ff40413cf 100644
--- a/drivers/net/bnx2x/ecore_sp.h
+++ b/drivers/net/bnx2x/ecore_sp.h
@@ -36,7 +36,7 @@
#include "ecore_reg.h"
struct bnx2x_softc;
-typedef phys_addr_t ecore_dma_addr_t; /* expected to be 64 bit wide */
+typedef rte_iova_t ecore_dma_addr_t; /* expected to be 64 bit wide */
typedef volatile int ecore_atomic_t;
diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index 039b248ec..646fe79e3 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -133,7 +133,7 @@ struct bnxt_pf_info {
uint16_t max_vfs;
uint32_t func_cfg_flags;
void *vf_req_buf;
- phys_addr_t vf_req_buf_dma_addr;
+ rte_iova_t vf_req_buf_dma_addr;
uint32_t vf_req_fwd[8];
uint16_t total_vnics;
struct bnxt_child_vf_info *vf_info;
@@ -203,14 +203,14 @@ struct bnxt {
struct bnxt_rx_queue **rx_queues;
const void *rx_mem_zone;
struct rx_port_stats *hw_rx_port_stats;
- phys_addr_t hw_rx_port_stats_map;
+ rte_iova_t hw_rx_port_stats_map;
unsigned int tx_nr_rings;
unsigned int tx_cp_nr_rings;
struct bnxt_tx_queue **tx_queues;
const void *tx_mem_zone;
struct tx_port_stats *hw_tx_port_stats;
- phys_addr_t hw_tx_port_stats_map;
+ rte_iova_t hw_tx_port_stats_map;
/* Default completion ring */
struct bnxt_cp_ring_info *def_cp_ring;
@@ -236,9 +236,9 @@ struct bnxt {
uint16_t hwrm_cmd_seq;
void *hwrm_cmd_resp_addr;
- phys_addr_t hwrm_cmd_resp_dma_addr;
+ rte_iova_t hwrm_cmd_resp_dma_addr;
void *hwrm_short_cmd_req_addr;
- phys_addr_t hwrm_short_cmd_req_dma_addr;
+ rte_iova_t hwrm_short_cmd_req_dma_addr;
rte_spinlock_t hwrm_lock;
uint16_t max_req_len;
uint16_t max_resp_len;
diff --git a/drivers/net/bnxt/bnxt_cpr.h b/drivers/net/bnxt/bnxt_cpr.h
index e8f048a3b..ce2b0cb8a 100644
--- a/drivers/net/bnxt/bnxt_cpr.h
+++ b/drivers/net/bnxt/bnxt_cpr.h
@@ -86,10 +86,10 @@ struct bnxt_cp_ring_info {
struct cmpl_base *cp_desc_ring;
- phys_addr_t cp_desc_mapping;
+ rte_iova_t cp_desc_mapping;
struct ctx_hw_stats *hw_stats;
- phys_addr_t hw_stats_map;
+ rte_iova_t hw_stats_map;
uint32_t hw_stats_ctx_id;
struct bnxt_ring *cp_ring_struct;
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index ccd50a704..10735f6a8 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -2796,7 +2796,7 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev)
const struct rte_memzone *mz = NULL;
static int version_printed;
uint32_t total_alloc_len;
- phys_addr_t mz_phys_addr;
+ rte_iova_t mz_phys_addr;
struct bnxt *bp;
int rc;
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 1fdc51cba..bf1fb469a 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -3026,7 +3026,7 @@ int bnxt_get_nvram_directory(struct bnxt *bp, uint32_t len, uint8_t *data)
uint32_t entry_length;
uint8_t *buf;
size_t buflen;
- phys_addr_t dma_handle;
+ rte_iova_t dma_handle;
struct hwrm_nvm_get_dir_entries_input req = {0};
struct hwrm_nvm_get_dir_entries_output *resp = bp->hwrm_cmd_resp_addr;
@@ -3071,7 +3071,7 @@ int bnxt_hwrm_get_nvram_item(struct bnxt *bp, uint32_t index,
{
int rc;
uint8_t *buf;
- phys_addr_t dma_handle;
+ rte_iova_t dma_handle;
struct hwrm_nvm_read_input req = {0};
struct hwrm_nvm_read_output *resp = bp->hwrm_cmd_resp_addr;
@@ -3125,7 +3125,7 @@ int bnxt_hwrm_flash_nvram(struct bnxt *bp, uint16_t dir_type,
int rc;
struct hwrm_nvm_write_input req = {0};
struct hwrm_nvm_write_output *resp = bp->hwrm_cmd_resp_addr;
- phys_addr_t dma_handle;
+ rte_iova_t dma_handle;
uint8_t *buf;
HWRM_PREP(req, NVM_WRITE);
diff --git a/drivers/net/bnxt/bnxt_ring.c b/drivers/net/bnxt/bnxt_ring.c
index b196dd1e3..0fa2f0c0d 100644
--- a/drivers/net/bnxt/bnxt_ring.c
+++ b/drivers/net/bnxt/bnxt_ring.c
@@ -98,7 +98,7 @@ int bnxt_alloc_rings(struct bnxt *bp, uint16_t qidx,
struct rte_pci_device *pdev = bp->pdev;
const struct rte_memzone *mz = NULL;
char mz_name[RTE_MEMZONE_NAMESIZE];
- phys_addr_t mz_phys_addr;
+ rte_iova_t mz_phys_addr;
int sz;
int stats_len = (tx_ring_info || rx_ring_info) ?
diff --git a/drivers/net/bnxt/bnxt_ring.h b/drivers/net/bnxt/bnxt_ring.h
index ac1ce2a57..164f482e3 100644
--- a/drivers/net/bnxt/bnxt_ring.h
+++ b/drivers/net/bnxt/bnxt_ring.h
@@ -70,7 +70,7 @@
struct bnxt_ring {
void *bd;
- phys_addr_t bd_dma;
+ rte_iova_t bd_dma;
uint32_t ring_size;
uint32_t ring_mask;
diff --git a/drivers/net/bnxt/bnxt_rxr.h b/drivers/net/bnxt/bnxt_rxr.h
index cb0cef303..a94373d19 100644
--- a/drivers/net/bnxt/bnxt_rxr.h
+++ b/drivers/net/bnxt/bnxt_rxr.h
@@ -101,8 +101,8 @@ struct bnxt_rx_ring_info {
struct bnxt_sw_rx_bd *rx_buf_ring; /* sw ring */
struct bnxt_sw_rx_bd *ag_buf_ring; /* sw ring */
- phys_addr_t rx_desc_mapping;
- phys_addr_t ag_desc_mapping;
+ rte_iova_t rx_desc_mapping;
+ rte_iova_t ag_desc_mapping;
struct bnxt_ring *rx_ring_struct;
struct bnxt_ring *ag_ring_struct;
diff --git a/drivers/net/bnxt/bnxt_txr.h b/drivers/net/bnxt/bnxt_txr.h
index 3f3eb312b..2feac51db 100644
--- a/drivers/net/bnxt/bnxt_txr.h
+++ b/drivers/net/bnxt/bnxt_txr.h
@@ -49,7 +49,7 @@ struct bnxt_tx_ring_info {
struct tx_bd_long *tx_desc_ring;
struct bnxt_sw_tx_bd *tx_buf_ring;
- phys_addr_t tx_desc_mapping;
+ rte_iova_t tx_desc_mapping;
#define BNXT_DEV_STATE_CLOSING 0x1
uint32_t dev_state;
diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c
index 937ad6570..5bac26053 100644
--- a/drivers/net/bnxt/bnxt_vnic.c
+++ b/drivers/net/bnxt/bnxt_vnic.c
@@ -175,7 +175,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp)
BNXT_MAX_MC_ADDRS * ETHER_ADDR_LEN);
uint16_t max_vnics;
int i;
- phys_addr_t mz_phys_addr;
+ rte_iova_t mz_phys_addr;
max_vnics = bp->max_vnics;
snprintf(mz_name, RTE_MEMZONE_NAMESIZE,
diff --git a/drivers/net/bnxt/bnxt_vnic.h b/drivers/net/bnxt/bnxt_vnic.h
index 544390453..875dc3c1c 100644
--- a/drivers/net/bnxt/bnxt_vnic.h
+++ b/drivers/net/bnxt/bnxt_vnic.h
@@ -53,11 +53,11 @@ struct bnxt_vnic_info {
uint16_t dflt_ring_grp;
uint16_t mru;
uint16_t hash_type;
- phys_addr_t rss_table_dma_addr;
+ rte_iova_t rss_table_dma_addr;
uint16_t *rss_table;
- phys_addr_t rss_hash_key_dma_addr;
+ rte_iova_t rss_hash_key_dma_addr;
void *rss_hash_key;
- phys_addr_t mc_list_dma_addr;
+ rte_iova_t mc_list_dma_addr;
char *mc_list;
uint32_t mc_addr_cnt;
#define BNXT_MAX_MC_ADDRS 16
diff --git a/drivers/net/liquidio/lio_rxtx.c b/drivers/net/liquidio/lio_rxtx.c
index efad4e7c9..376893ac8 100644
--- a/drivers/net/liquidio/lio_rxtx.c
+++ b/drivers/net/liquidio/lio_rxtx.c
@@ -1744,7 +1744,7 @@ lio_dev_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts)
} else {
struct lio_buf_free_info *finfo;
struct lio_gather *g;
- phys_addr_t phyaddr;
+ rte_iova_t phyaddr;
int i, frags;
finfo = (struct lio_buf_free_info *)rte_malloc(NULL,
@@ -1791,7 +1791,7 @@ lio_dev_xmit_pkts(void *tx_queue, struct rte_mbuf **pkts, uint16_t nb_pkts)
}
phyaddr = rte_mem_virt2iova(g->sg);
- if (phyaddr == RTE_BAD_PHYS_ADDR) {
+ if (phyaddr == RTE_BAD_IOVA) {
PMD_TX_LOG(lio_dev, ERR, "bad phys addr\n");
goto xmit_failed;
}
diff --git a/drivers/net/liquidio/lio_rxtx.h b/drivers/net/liquidio/lio_rxtx.h
index 47d84fb16..ef033735f 100644
--- a/drivers/net/liquidio/lio_rxtx.h
+++ b/drivers/net/liquidio/lio_rxtx.h
@@ -686,7 +686,7 @@ lio_swap_8B_data(uint64_t *data, uint32_t blocks)
static inline uint64_t
lio_map_ring(void *buf)
{
- phys_addr_t dma_addr;
+ rte_iova_t dma_addr;
dma_addr = rte_mbuf_data_iova_default(((struct rte_mbuf *)buf));
@@ -696,7 +696,7 @@ lio_map_ring(void *buf)
static inline uint64_t
lio_map_ring_info(struct lio_droq *droq, uint32_t i)
{
- phys_addr_t dma_addr;
+ rte_iova_t dma_addr;
dma_addr = droq->info_list_dma + (i * LIO_DROQ_INFO_SIZE);
diff --git a/drivers/net/octeontx/base/octeontx_pkovf.c b/drivers/net/octeontx/base/octeontx_pkovf.c
index 64e5d69b1..f01d948e4 100644
--- a/drivers/net/octeontx/base/octeontx_pkovf.c
+++ b/drivers/net/octeontx/base/octeontx_pkovf.c
@@ -46,7 +46,7 @@
struct octeontx_pko_iomem {
uint8_t *va;
- phys_addr_t iova;
+ rte_iova_t iova;
size_t size;
};
diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index 74e518821..a384b01f6 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -63,7 +63,7 @@ typedef u32 OSAL_BE32;
#define osal_uintptr_t uintptr_t
-typedef phys_addr_t dma_addr_t;
+typedef rte_iova_t dma_addr_t;
typedef rte_spinlock_t osal_spinlock_t;
diff --git a/drivers/net/sfc/efsys.h b/drivers/net/sfc/efsys.h
index 0405d02bb..f428b6246 100644
--- a/drivers/net/sfc/efsys.h
+++ b/drivers/net/sfc/efsys.h
@@ -253,7 +253,7 @@ typedef struct __efsys_identifier_s efsys_identifier_t;
/* DMA */
-typedef phys_addr_t efsys_dma_addr_t;
+typedef rte_iova_t efsys_dma_addr_t;
typedef struct efsys_mem_s {
const struct rte_memzone *esm_mz;
diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c
index 1c1274067..49d7e9370 100644
--- a/drivers/net/sfc/sfc.c
+++ b/drivers/net/sfc/sfc.c
@@ -62,7 +62,7 @@ sfc_dma_alloc(const struct sfc_adapter *sa, const char *name, uint16_t id,
}
esmp->esm_addr = mz->iova;
- if (esmp->esm_addr == RTE_BAD_PHYS_ADDR) {
+ if (esmp->esm_addr == RTE_BAD_IOVA) {
(void)rte_memzone_free(mz);
return EFAULT;
}
diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c
index 23e45b453..18d60c694 100644
--- a/drivers/net/sfc/sfc_ef10_rx.c
+++ b/drivers/net/sfc/sfc_ef10_rx.c
@@ -177,7 +177,7 @@ sfc_ef10_rx_qrefill(struct sfc_ef10_rxq *rxq)
++i, ++id) {
struct rte_mbuf *m = objs[i];
struct sfc_ef10_rx_sw_desc *rxd;
- phys_addr_t phys_addr;
+ rte_iova_t phys_addr;
SFC_ASSERT((id & ~ptr_mask) == 0);
rxd = &rxq->sw_ring[id];
diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c
index 2e246f40c..0454e79a2 100644
--- a/drivers/net/sfc/sfc_ef10_tx.c
+++ b/drivers/net/sfc/sfc_ef10_tx.c
@@ -195,7 +195,7 @@ sfc_ef10_tx_reap(struct sfc_ef10_txq *txq)
}
static void
-sfc_ef10_tx_qdesc_dma_create(phys_addr_t addr, uint16_t size, bool eop,
+sfc_ef10_tx_qdesc_dma_create(rte_iova_t addr, uint16_t size, bool eop,
efx_qword_t *edp)
{
EFX_POPULATE_QWORD_4(*edp,
@@ -341,7 +341,7 @@ sfc_ef10_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
pkt_len = m_seg->pkt_len;
do {
- phys_addr_t seg_addr = rte_mbuf_data_iova(m_seg);
+ rte_iova_t seg_addr = rte_mbuf_data_iova(m_seg);
unsigned int seg_len = rte_pktmbuf_data_len(m_seg);
unsigned int id = added & ptr_mask;
diff --git a/drivers/net/thunderx/base/nicvf_hw.c b/drivers/net/thunderx/base/nicvf_hw.c
index 2634285eb..dc0af1ca0 100644
--- a/drivers/net/thunderx/base/nicvf_hw.c
+++ b/drivers/net/thunderx/base/nicvf_hw.c
@@ -509,7 +509,7 @@ nicvf_qset_rbdr_precharge(void *dev, struct nicvf *nic,
struct rbdr_entry_t *desc, *desc0;
struct nicvf_rbdr *rbdr = nic->rbdr;
uint32_t count;
- nicvf_phys_addr_t phy;
+ nicvf_iova_addr_t phy;
assert(rbdr != NULL);
desc = rbdr->desc;
diff --git a/drivers/net/thunderx/base/nicvf_hw.h b/drivers/net/thunderx/base/nicvf_hw.h
index b7d0a3dc5..698aa4878 100644
--- a/drivers/net/thunderx/base/nicvf_hw.h
+++ b/drivers/net/thunderx/base/nicvf_hw.h
@@ -88,7 +88,7 @@ enum nicvf_err_e {
NICVF_ERR_RSS_GET_SZ, /* -8171 */
};
-typedef nicvf_phys_addr_t (*rbdr_pool_get_handler)(void *dev, void *opaque);
+typedef nicvf_iova_addr_t (*rbdr_pool_get_handler)(void *dev, void *opaque);
struct nicvf_hw_rx_qstats {
uint64_t q_rx_bytes;
diff --git a/drivers/net/thunderx/base/nicvf_hw_defs.h b/drivers/net/thunderx/base/nicvf_hw_defs.h
index 0fe673e6d..e7e092b61 100644
--- a/drivers/net/thunderx/base/nicvf_hw_defs.h
+++ b/drivers/net/thunderx/base/nicvf_hw_defs.h
@@ -213,7 +213,7 @@
#define NICVF_STATIC_ASSERT(s) _Static_assert(s, #s)
#define assert_primary(nic) assert((nic)->sqs_mode == 0)
-typedef uint64_t nicvf_phys_addr_t;
+typedef uint64_t nicvf_iova_addr_t;
/* vNIC HW Enumerations */
@@ -840,7 +840,7 @@ struct rbdr_entry_t {
uint64_t buf_addr:42;
uint64_t cache_align:7;
};
- nicvf_phys_addr_t full_addr;
+ nicvf_iova_addr_t full_addr;
};
#else
union {
@@ -849,7 +849,7 @@ struct rbdr_entry_t {
uint64_t buf_addr:42;
uint64_t rsvd0:15;
};
- nicvf_phys_addr_t full_addr;
+ nicvf_iova_addr_t full_addr;
};
#endif
};
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index ea561395b..d65d3cee7 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -680,7 +680,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic,
static void
nicvf_rbdr_release_mbuf(struct rte_eth_dev *dev, struct nicvf *nic,
- nicvf_phys_addr_t phy)
+ nicvf_iova_addr_t phy)
{
uint16_t qidx;
void *obj;
@@ -1429,7 +1429,7 @@ nicvf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
};
}
-static nicvf_phys_addr_t
+static nicvf_iova_addr_t
rbdr_rte_mempool_get(void *dev, void *opaque)
{
uint16_t qidx;
diff --git a/drivers/net/thunderx/nicvf_ethdev.h b/drivers/net/thunderx/nicvf_ethdev.h
index e92c3242a..71bc3cf2a 100644
--- a/drivers/net/thunderx/nicvf_ethdev.h
+++ b/drivers/net/thunderx/nicvf_ethdev.h
@@ -104,7 +104,7 @@ nicvf_netdev_qidx(struct nicvf *nic, uint8_t local_qidx)
* P = V - offset
*/
static inline uintptr_t
-nicvf_mbuff_phy2virt(phys_addr_t phy, uint64_t mbuf_phys_off)
+nicvf_mbuff_phy2virt(rte_iova_t phy, uint64_t mbuf_phys_off)
{
return (uintptr_t)(phy + mbuf_phys_off);
}
@@ -112,7 +112,7 @@ nicvf_mbuff_phy2virt(phys_addr_t phy, uint64_t mbuf_phys_off)
static inline uintptr_t
nicvf_mbuff_virt2phy(uintptr_t virt, uint64_t mbuf_phys_off)
{
- return (phys_addr_t)(virt - mbuf_phys_off);
+ return (rte_iova_t)(virt - mbuf_phys_off);
}
static inline void
diff --git a/drivers/net/thunderx/nicvf_struct.h b/drivers/net/thunderx/nicvf_struct.h
index e54a96f8e..0f8208ef1 100644
--- a/drivers/net/thunderx/nicvf_struct.h
+++ b/drivers/net/thunderx/nicvf_struct.h
@@ -46,7 +46,7 @@ struct nicvf_rbdr {
uintptr_t rbdr_status;
uintptr_t rbdr_door;
struct rbdr_entry_t *desc;
- nicvf_phys_addr_t phys;
+ nicvf_iova_addr_t phys;
uint32_t buffsz;
uint32_t tail;
uint32_t next_tail;
@@ -56,7 +56,7 @@ struct nicvf_rbdr {
struct nicvf_txq {
union sq_entry_t *desc;
- nicvf_phys_addr_t phys;
+ nicvf_iova_addr_t phys;
struct rte_mbuf **txbuffs;
uintptr_t sq_head;
uintptr_t sq_door;
@@ -87,7 +87,7 @@ struct nicvf_rxq {
uintptr_t cq_status;
uintptr_t cq_door;
union mbuf_initializer mbuf_initializer;
- nicvf_phys_addr_t phys;
+ nicvf_iova_addr_t phys;
union cq_entry_t *desc;
struct nicvf_rbdr *shared_rbdr;
struct nicvf *nic;
diff --git a/drivers/net/virtio/virtio_rxtx.h b/drivers/net/virtio/virtio_rxtx.h
index 2a7c3ad3a..54f1e849b 100644
--- a/drivers/net/virtio/virtio_rxtx.h
+++ b/drivers/net/virtio/virtio_rxtx.h
@@ -66,7 +66,7 @@ struct virtnet_tx {
struct virtqueue *vq;
/**< memzone to populate hdr. */
const struct rte_memzone *virtio_net_hdr_mz;
- phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
+ rte_iova_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
uint16_t queue_id; /**< DPDK queue index. */
uint16_t port_id; /**< Device port identifier. */
@@ -81,7 +81,7 @@ struct virtnet_ctl {
struct virtqueue *vq;
/**< memzone to populate hdr. */
const struct rte_memzone *virtio_net_hdr_mz;
- phys_addr_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
+ rte_iova_t virtio_net_hdr_mem; /**< hdr for each xmit packet */
uint16_t port_id; /**< Device port identifier. */
const struct rte_memzone *mz; /**< mem zone to populate CTL ring. */
};
diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
index 6c90d3779..2305d91a4 100644
--- a/drivers/net/virtio/virtqueue.h
+++ b/drivers/net/virtio/virtqueue.h
@@ -203,8 +203,8 @@ struct virtqueue {
struct virtnet_ctl cq;
};
- phys_addr_t vq_ring_mem; /**< physical address of vring,
- * or virtual address for virtio_user. */
+ rte_iova_t vq_ring_mem; /**< physical address of vring,
+ * or virtual address for virtio_user. */
/**
* Head of the free chain in the descriptor table. If
diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 01b17ca72..1cc81c17c 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -338,7 +338,7 @@ extern uint64_t VHOST_FEATURES;
extern struct virtio_net *vhost_devices[MAX_VHOST_DEVICE];
/* Convert guest physical address to host physical address */
-static __rte_always_inline phys_addr_t
+static __rte_always_inline rte_iova_t
gpa_to_hpa(struct virtio_net *dev, uint64_t gpa, uint64_t size)
{
uint32_t i;
--
2.14.2
next prev parent reply other threads:[~2017-11-06 1:42 UTC|newest]
Thread overview: 91+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-14 15:15 [dpdk-dev] [PATCH v1 0/4] make dpdk iova aware Santosh Shukla
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 1/4] eal: rename phys_addr_t to iova_addr_t Santosh Shukla
2017-09-18 14:06 ` Burakov, Anatoly
2017-09-18 14:31 ` santosh
2017-09-18 14:32 ` Burakov, Anatoly
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 2/4] eal/memory: rename buf_physaddr to buf_iovaaddr Santosh Shukla
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 3/4] eal/memory: rename memory translational api to _iova types Santosh Shukla
2017-08-14 15:15 ` [dpdk-dev] [PATCH v1 4/4] doc: remove dpdk iova aware notice Santosh Shukla
2017-09-18 18:44 ` Mcnamara, John
2017-09-05 10:31 ` [dpdk-dev] [PATCH v2 0/5] make dpdk iova aware Santosh Shukla
2017-09-05 10:31 ` [dpdk-dev] [PATCH v2 1/5] eal: rename phys_addr_t to iova_addr_t Santosh Shukla
2017-09-18 15:19 ` Burakov, Anatoly
2017-09-05 10:31 ` [dpdk-dev] [PATCH v2 2/5] eal/memory: rename buf_physaddr to buf_iovaaddr Santosh Shukla
2017-09-18 15:20 ` Burakov, Anatoly
2017-09-05 10:31 ` [dpdk-dev] [PATCH v2 3/5] eal/memory: rename memseg member phys to iova addr Santosh Shukla
2017-09-18 15:04 ` Burakov, Anatoly
2017-09-18 15:08 ` santosh
2017-09-18 15:11 ` Burakov, Anatoly
2017-09-18 15:21 ` Burakov, Anatoly
2017-09-05 10:31 ` [dpdk-dev] [PATCH v2 4/5] eal/memory: rename memory api to iova types Santosh Shukla
2017-09-05 10:31 ` [dpdk-dev] [PATCH v2 5/5] doc: remove dpdk iova aware notice Santosh Shukla
2017-09-19 13:38 ` Mcnamara, John
2017-10-17 13:31 ` [dpdk-dev] [PATCH v2 0/5] make dpdk iova aware Thomas Monjalon
2017-10-17 14:12 ` santosh
2017-10-20 12:31 ` [dpdk-dev] [PATCH v3 0/6] " Santosh Shukla
2017-10-20 12:31 ` [dpdk-dev] [PATCH v3 1/6] eal: rename phys addr to iova addr Santosh Shukla
2017-10-23 20:32 ` Thomas Monjalon
2017-10-24 5:16 ` santosh
2017-10-20 12:31 ` [dpdk-dev] [PATCH v3 2/6] eal/memory: rename buf physaddr to buf iovaaddr Santosh Shukla
2017-10-23 20:15 ` Thomas Monjalon
2017-10-25 9:55 ` Olivier MATZ
2017-10-23 20:34 ` Thomas Monjalon
2017-10-24 5:17 ` santosh
2017-10-25 9:44 ` Olivier MATZ
2017-10-20 12:31 ` [dpdk-dev] [PATCH v3 3/6] eal/memory: rename memseg member phys to iova addr Santosh Shukla
2017-10-20 12:31 ` [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iova types Santosh Shukla
2017-11-03 11:11 ` Thomas Monjalon
2017-11-03 11:35 ` santosh
2017-11-03 13:58 ` Thomas Monjalon
2017-11-03 15:22 ` [dpdk-dev] [PATCH v3 4/6] eal/memory: rename memory API to iovatypes Jonas Pfefferle1
2017-10-20 12:31 ` [dpdk-dev] [PATCH v3 5/6] doc: remove dpdk iova aware notice Santosh Shukla
2017-10-23 20:29 ` Thomas Monjalon
2017-10-24 5:06 ` santosh
2017-10-25 9:45 ` Thomas Monjalon
2017-10-25 9:50 ` Richardson, Bruce
2017-10-25 10:01 ` Thomas Monjalon
2017-10-25 10:05 ` Bruce Richardson
2017-10-25 10:12 ` Thomas Monjalon
2017-10-25 10:32 ` Bruce Richardson
2017-10-20 12:31 ` [dpdk-dev] [PATCH v3 6/6] eal/common/rte_malloc: use pointer diff in virt2iova Santosh Shukla
2017-10-23 14:58 ` [dpdk-dev] [PATCH v3 0/6] make dpdk iova aware Thomas Monjalon
2017-10-24 5:12 ` santosh
2017-10-24 7:38 ` Thomas Monjalon
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 00/15] make DPDK IOVA aware Thomas Monjalon
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 01/15] mem: hide physical address error in VA mode Thomas Monjalon
2017-11-06 5:39 ` santosh
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 02/15] mem: introduce IOVA type Thomas Monjalon
2017-11-06 5:38 ` santosh
2017-11-06 8:37 ` Thomas Monjalon
2017-11-06 8:51 ` santosh
2017-11-06 9:08 ` Thomas Monjalon
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 03/15] mem: rename segment address from physical to IOVA Thomas Monjalon
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 04/15] mem: rename address mapping function " Thomas Monjalon
2017-11-06 5:41 ` santosh
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 05/15] malloc: " Thomas Monjalon
2017-11-06 5:47 ` santosh
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 06/15] malloc: use pointer diff macro in IOVA mapping Thomas Monjalon
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 07/15] memzone: rename address from physical to IOVA Thomas Monjalon
2017-11-06 5:50 ` santosh
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 08/15] mempool: rename addresses " Thomas Monjalon
2017-11-06 5:52 ` santosh
2017-11-06 15:44 ` Olivier MATZ
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 09/15] mempool: rename address mapping function " Thomas Monjalon
2017-11-06 5:54 ` santosh
2017-11-06 15:44 ` Olivier MATZ
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 10/15] mempool: rename populate functions " Thomas Monjalon
2017-11-06 15:49 ` Olivier MATZ
2017-11-06 15:58 ` Thomas Monjalon
2017-11-06 16:39 ` Olivier MATZ
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 11/15] mbuf: rename physical address " Thomas Monjalon
2017-11-06 15:52 ` Olivier MATZ
2017-11-06 16:00 ` Thomas Monjalon
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 12/15] mbuf: rename data address helpers " Thomas Monjalon
2017-11-06 15:56 ` Olivier MATZ
2017-11-06 16:03 ` Thomas Monjalon
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 13/15] cryptodev: rename physical address type " Thomas Monjalon
2017-11-06 1:41 ` Thomas Monjalon [this message]
2017-11-06 1:41 ` [dpdk-dev] [PATCH v4 15/15] doc: add IOVA aware API changes in release notes Thomas Monjalon
2017-11-06 5:56 ` santosh
2017-11-06 8:50 ` Mcnamara, John
2017-11-06 22:48 ` [dpdk-dev] [PATCH v4 00/15] make DPDK IOVA aware Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171106014141.13266-15-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=olivier.matz@6wind.com \
--cc=santosh.shukla@caviumnetworks.com \
--cc=sergio.gonzalez.monroy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).