[Xen-devel] [PATCH 3/6] xen: remove xen dependency in app, examples, test

2017-08-30 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
---
 app/test-pmd/testpmd.c  |  2 +-
 examples/ip_pipeline/app.h  |  4 --
 examples/ip_pipeline/config_parse.c | 19 -
 examples/ip_pipeline/init.c |  5 ---
 examples/kni/main.c |  3 --
 test/test/process.h | 10 -
 test/test/test.c|  4 --
 test/test/test_eal_flags.c  | 81 -
 8 files changed, 1 insertion(+), 127 deletions(-)

diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index f8d02ae..d9c785c 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -494,7 +494,7 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
"create a new mbuf pool <%s>: n=%u, size=%u, socket=%u\n",
pool_name, nb_mbuf, mbuf_seg_size, socket_id);
 
-   /* if the former XEN allocation failed fall back to normal allocation */
+   /* if the former allocation failed fall back to normal allocation */
if (rte_mp == NULL) {
if (mp_anon != 0) {
rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h
index e41290e..94e7a6d 100644
--- a/examples/ip_pipeline/app.h
+++ b/examples/ip_pipeline/app.h
@@ -428,10 +428,6 @@ struct app_eal_params {
/* Interrupt mode for VFIO (legacy|msi|msix) */
char *vfio_intr;
 
-   /* Support running on Xen dom0 without hugetlbfs */
-   uint32_t xen_dom0_present;
-   int xen_dom0;
-
uint32_t parsed;
 };
 
diff --git a/examples/ip_pipeline/config_parse.c 
b/examples/ip_pipeline/config_parse.c
index 0b76134..3211c6a 100644
--- a/examples/ip_pipeline/config_parse.c
+++ b/examples/ip_pipeline/config_parse.c
@@ -809,21 +809,6 @@ parse_eal(struct app_params *app,
continue;
}
 
-   /* xen_dom0 */
-   if (strcmp(entry->name, "xen_dom0") == 0) {
-   int val;
-
-   PARSE_ERROR_DUPLICATE((p->xen_dom0_present == 0),
-   section_name,
-   entry->name);
-   p->xen_dom0_present = 1;
-
-   val = parser_read_arg_bool(entry->value);
-   PARSE_ERROR((val >= 0), section_name, entry->name);
-   p->xen_dom0 = val;
-   continue;
-   }
-
/* unrecognized */
PARSE_ERROR_INVALID(0, section_name, entry->name);
}
@@ -2643,10 +2628,6 @@ save_eal_params(struct app_params *app, FILE *f)
if (p->vfio_intr)
fprintf(f, "%s = %s\n", "vfio_intr", p->vfio_intr);
 
-   if (p->xen_dom0_present)
-   fprintf(f, "%s = %s\n", "xen_dom0",
-   (p->xen_dom0) ? "yes" : "no");
-
fputc('\n', f);
 }
 
diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index 7cde49a..034c238 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -296,11 +296,6 @@ app_init_eal(struct app_params *app)
app->eal_argv[n_args++] = strdup(buffer);
}
 
-   if ((p->xen_dom0_present) && (p->xen_dom0)) {
-   snprintf(buffer, sizeof(buffer), "--xen-dom0");
-   app->eal_argv[n_args++] = strdup(buffer);
-   }
-
snprintf(buffer, sizeof(buffer), "--");
app->eal_argv[n_args++] = strdup(buffer);
 
diff --git a/examples/kni/main.c b/examples/kni/main.c
index e3bc2fb..9f9d227 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -919,9 +919,6 @@ main(int argc, char** argv)
continue;
kni_free_kni(port);
}
-#ifdef RTE_LIBRTE_XEN_DOM0
-   rte_kni_close();
-#endif
for (i = 0; i < RTE_MAX_ETHPORTS; i++)
if (kni_port_params_array[i]) {
rte_free(kni_port_params_array[i]);
diff --git a/test/test/process.h b/test/test/process.h
index 4f8d121..51ced12 100644
--- a/test/test/process.h
+++ b/test/test/process.h
@@ -52,11 +52,7 @@ static inline int
 process_dup(const char *const argv[], int numargs, const char *env_value)
 {
int num;
-#ifdef RTE_LIBRTE_XEN_DOM0
-   char *argv_cpy[numargs + 2];
-#else
char *argv_cpy[numargs + 1];
-#endif
int i, fd, status;
char path[32];
 
@@ -67,14 +63,8 @@ process_dup(const char *const argv[], int numargs, const 
char *env_value)
/* make a copy of the arguments to be passed to exec */
for (i = 0; i < numargs; i++)
argv_cpy[i] = strdup(argv[i]);
-#ifdef RTE_LIBRTE_XEN_DOM0
-   argv_cpy[i] = strdup("--xen-dom0");
-  

[Xen-devel] [PATCH 4/6] xen: remove xen dependency in drivers, ether, mempool

2017-08-30 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
---
 drivers/crypto/qat/qat_qp.c  | 7 +--
 drivers/net/i40e/i40e_rxtx.c | 8 ++--
 lib/librte_ether/rte_ethdev.c| 7 +--
 lib/librte_mempool/rte_mempool.c | 8 ++--
 4 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/crypto/qat/qat_qp.c
index 5048d21..34f75ca 100644
--- a/drivers/crypto/qat/qat_qp.c
+++ b/drivers/crypto/qat/qat_qp.c
@@ -122,14 +122,9 @@ queue_dma_zone_reserve(const char *queue_name, uint32_t 
queue_size,
break;
default:
memzone_flags = RTE_MEMZONE_SIZE_HINT_ONLY;
-}
-#ifdef RTE_LIBRTE_XEN_DOM0
-   return rte_memzone_reserve_bounded(queue_name, queue_size,
-   socket_id, 0, RTE_CACHE_LINE_SIZE, RTE_PGSIZE_2M);
-#else
+   }
return rte_memzone_reserve_aligned(queue_name, queue_size, socket_id,
memzone_flags, queue_size);
-#endif
 }
 
 int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index d42c23c..f571e79 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2221,12 +2221,8 @@ i40e_memzone_reserve(const char *name, uint32_t len, int 
socket_id)
if (mz)
return mz;
 
-   if (rte_xen_dom0_supported())
-   mz = rte_memzone_reserve_bounded(name, len,
-   socket_id, 0, I40E_RING_BASE_ALIGN, 
RTE_PGSIZE_2M);
-   else
-   mz = rte_memzone_reserve_aligned(name, len,
-   socket_id, 0, I40E_RING_BASE_ALIGN);
+   mz = rte_memzone_reserve_aligned(name, len,
+socket_id, 0, I40E_RING_BASE_ALIGN);
return mz;
 }
 
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index 0597641..cb0bde7 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2818,12 +2818,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, 
const char *ring_name,
if (mz)
return mz;
 
-   if (rte_xen_dom0_supported())
-   return rte_memzone_reserve_bounded(z_name, size, socket_id,
-  0, align, RTE_PGSIZE_2M);
-   else
-   return rte_memzone_reserve_aligned(z_name, size, socket_id,
-  0, align);
+   return rte_memzone_reserve_aligned(z_name, size, socket_id, 0, align);
 }
 
 int
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 6fc3c9c..6d726ae 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -527,11 +527,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
if (mp->nb_mem_chunks != 0)
return -EEXIST;
 
-   if (rte_xen_dom0_supported()) {
-   pg_sz = RTE_PGSIZE_2M;
-   pg_shift = rte_bsf32(pg_sz);
-   align = pg_sz;
-   } else if (rte_eal_has_hugepages()) {
+   if (rte_eal_has_hugepages()) {
pg_shift = 0; /* not needed, zone is physically contiguous */
pg_sz = 0;
align = RTE_CACHE_LINE_SIZE;
@@ -568,7 +564,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
else
paddr = mz->phys_addr;
 
-   if (rte_eal_has_hugepages() && !rte_xen_dom0_supported())
+   if (rte_eal_has_hugepages())
ret = rte_mempool_populate_phys(mp, mz->addr,
paddr, mz->len,
rte_mempool_memchunk_mz_free,
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 6/6] eal: remove API rte_mem_phy2mch

2017-08-30 Thread Jianfeng Tan
Previously, to get MFN address in dom0, this API is a wrapper to
obtain the "physical address".

As we removed xen dom0 support, this API is not necessary.

Signed-off-by: Jianfeng Tan 
---
 doc/guides/rel_notes/release_17_11.rst | 2 ++
 drivers/net/e1000/em_rxtx.c| 4 ++--
 drivers/net/e1000/igb_rxtx.c   | 4 ++--
 drivers/net/fm10k/fm10k_ethdev.c   | 4 ++--
 drivers/net/i40e/i40e_ethdev.c | 2 +-
 drivers/net/i40e/i40e_fdir.c   | 2 +-
 drivers/net/i40e/i40e_rxtx.c   | 8 
 drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++--
 drivers/net/sfc/sfc.c  | 2 +-
 lib/librte_eal/common/include/rte_memory.h | 5 -
 lib/librte_mempool/rte_mempool.c   | 3 ---
 11 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst 
b/doc/guides/rel_notes/release_17_11.rst
index d211084..06c334b 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -110,6 +110,8 @@ API Changes
Also, make sure to start the actual text at the margin.
=
 
+   * ``rte_mem_phy2mch`` was used in xen dom0 to obtain the physical address;
+ remove this API as xen dom0 support was removed.
 
 ABI Changes
 ---
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 31819c5..a0f63a7 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -1289,7 +1289,7 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,
txq->port_id = dev->data->port_id;
 
txq->tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(queue_idx));
-   txq->tx_ring_phys_addr = rte_mem_phy2mch(tz->memseg_id, tz->phys_addr);
+   txq->tx_ring_phys_addr = tz->phys_addr;
txq->tx_ring = (struct e1000_data_desc *) tz->addr;
 
PMD_INIT_LOG(DEBUG, "sw_ring=%p hw_ring=%p dma_addr=0x%"PRIx64,
@@ -1416,7 +1416,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,
 
rxq->rdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDT(queue_idx));
rxq->rdh_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDH(queue_idx));
-   rxq->rx_ring_phys_addr = rte_mem_phy2mch(rz->memseg_id, rz->phys_addr);
+   rxq->rx_ring_phys_addr = rz->phys_addr;
rxq->rx_ring = (struct e1000_rx_desc *) rz->addr;
 
PMD_INIT_LOG(DEBUG, "sw_ring=%p hw_ring=%p dma_addr=0x%"PRIx64,
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1c80a2a..0fccb5d 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1530,7 +1530,7 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,
txq->port_id = dev->data->port_id;
 
txq->tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(txq->reg_idx));
-   txq->tx_ring_phys_addr = rte_mem_phy2mch(tz->memseg_id, tz->phys_addr);
+   txq->tx_ring_phys_addr = tz->phys_addr;
 
txq->tx_ring = (union e1000_adv_tx_desc *) tz->addr;
/* Allocate software ring */
@@ -1667,7 +1667,7 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
}
rxq->rdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDT(rxq->reg_idx));
rxq->rdh_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDH(rxq->reg_idx));
-   rxq->rx_ring_phys_addr = rte_mem_phy2mch(rz->memseg_id, rz->phys_addr);
+   rxq->rx_ring_phys_addr = rz->phys_addr;
rxq->rx_ring = (union e1000_adv_rx_desc *) rz->addr;
 
/* Allocate software ring. */
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index e60d3a3..15ea2a5 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1887,7 +1887,7 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t 
queue_id,
return -ENOMEM;
}
q->hw_ring = mz->addr;
-   q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr);
+   q->hw_ring_phys_addr = mz->phys_addr;
 
/* Check if number of descs satisfied Vector requirement */
if (!rte_is_power_of_2(nb_desc)) {
@@ -2047,7 +2047,7 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t 
queue_id,
return -ENOMEM;
}
q->hw_ring = mz->addr;
-   q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr);
+   q->hw_ring_phys_addr = mz->phys_addr;
 
/*
 * allocate memory for the RS bit tracker. Enough slots to hold the
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 5f26e24..dc5458d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3741,7 +3741,7 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struct 
i40e_hw *hw,
 
mem->size = size;
mem->va = mz-

[Xen-devel] [PATCH 0/6] remove xen dom0 support in DPDK

2017-08-30 Thread Jianfeng Tan
Following the calls on the mailing list:
http://dpdk.org/ml/archives/dev/2017-June/068151.html
The Technical Board decided to drop Xen dom0 support from EAL:
http://dpdk.org/ml/archives/dev/2017-June/068615.html

This series remove xen dom0 support in DPDK, as well as xenvirt PMD and
vhost_xen example.

What are effected?

After these patches, users cannot run DPDK applications inside xen dom0.

What are not effected?

Users can still run DPDK applications inside xen domU on pass-throughed
physical devices and virtio devices; on the host, users still can run
DPDK applications same as before.

Jianfeng Tan (6):
  example/vhost_xen: remove
  net/xenvirt: remove
  xen: remove xen dependency in app, examples, test
  xen: remove xen dependency in drivers, ether, mempool
  eal: remove xen dom0 support
  eal: remove API rte_mem_phy2mch

 MAINTAINERS|   10 -
 app/test-pmd/Makefile  |4 -
 app/test-pmd/testpmd.c |   14 +-
 config/common_base |   10 -
 config/defconfig_arm-armv7a-linuxapp-gcc   |1 -
 doc/guides/index.rst   |1 -
 doc/guides/linux_gsg/build_sample_apps.rst |5 +-
 doc/guides/linux_gsg/sys_reqs.rst  |   53 -
 doc/guides/nics/features/xenvirt.ini   |6 -
 doc/guides/prog_guide/source_org.rst   |1 -
 doc/guides/rel_notes/deprecation.rst   |3 -
 doc/guides/rel_notes/release_17_11.rst |   14 +
 doc/guides/testpmd_app_ug/run_app.rst  |4 -
 doc/guides/xen/img/dpdk_xen_pkt_switch.png |  Bin 163842 -> 0 bytes
 doc/guides/xen/img/grant_refs.png  |  Bin 6405 -> 0 bytes
 doc/guides/xen/img/grant_table.png |  Bin 96762 -> 0 bytes
 doc/guides/xen/index.rst   |   38 -
 doc/guides/xen/pkt_switch.rst  |  470 --
 drivers/crypto/qat/qat_qp.c|7 +-
 drivers/net/Makefile   |2 -
 drivers/net/e1000/em_rxtx.c|4 +-
 drivers/net/e1000/igb_rxtx.c   |4 +-
 drivers/net/fm10k/fm10k_ethdev.c   |4 +-
 drivers/net/i40e/i40e_ethdev.c |2 +-
 drivers/net/i40e/i40e_fdir.c   |2 +-
 drivers/net/i40e/i40e_rxtx.c   |   16 +-
 drivers/net/ixgbe/ixgbe_rxtx.c |4 +-
 drivers/net/sfc/sfc.c  |2 +-
 drivers/net/xenvirt/Makefile   |   57 -
 drivers/net/xenvirt/rte_eth_xenvirt.c  |  766 --
 drivers/net/xenvirt/rte_eth_xenvirt.h  |   61 -
 drivers/net/xenvirt/rte_eth_xenvirt_version.map|7 -
 drivers/net/xenvirt/rte_mempool_gntalloc.c |  295 
 drivers/net/xenvirt/rte_xen_lib.c  |  454 --
 drivers/net/xenvirt/rte_xen_lib.h  |  116 --
 drivers/net/xenvirt/virtio_logs.h  |   70 -
 drivers/net/xenvirt/virtqueue.h|  273 
 examples/Makefile  |1 -
 examples/ip_pipeline/app.h |4 -
 examples/ip_pipeline/config_parse.c|   19 -
 examples/ip_pipeline/init.c|5 -
 examples/kni/main.c|3 -
 examples/vhost_xen/Makefile|   52 -
 examples/vhost_xen/main.c  | 1522 
 examples/vhost_xen/main.h  |   66 -
 examples/vhost_xen/vhost_monitor.c |  595 
 examples/vhost_xen/virtio-net.h|  113 --
 examples/vhost_xen/xen_vhost.h |  148 --
 examples/vhost_xen/xenstore_parse.c|  775 --
 .../bsdapp/eal/include/exec-env/rte_dom0_common.h  |  107 --
 lib/librte_eal/common/eal_common_options.c |3 -
 lib/librte_eal/common/eal_internal_cfg.h   |1 -
 lib/librte_eal/common/eal_options.h|2 -
 lib/librte_eal/common/include/rte_memory.h |   71 -
 lib/librte_eal/linuxapp/Makefile   |2 -
 lib/librte_eal/linuxapp/eal/Makefile   |5 +-
 lib/librte_eal/linuxapp/eal/eal.c  |   24 -
 lib/librte_eal/linuxapp/eal/eal_memory.c   |   56 -
 lib/librte_eal/linuxapp/eal/eal_xen_memory.c   |  381 -
 .../eal/include/exec-env/rte_dom0_common.h |  108 --
 lib/librte_eal/linuxapp/igb_uio/igb_uio.c  |   54 -
 lib/librte_eal/linuxapp/xen_dom0/Makefile  |   53 -
 lib/librte_eal/linuxapp/xen_dom0/compat.h  |   15 -
 lib/librte_eal/linuxapp/xen_dom0/dom0_mm_dev.h |  107 --
 lib/librte_eal/linuxapp/xen_dom0/dom0_mm_misc.c|  780 --
 lib/librte_ether/rte

[Xen-devel] [PATCH 2/6] net/xenvirt: remove

2017-08-30 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
---
 MAINTAINERS |   2 -
 app/test-pmd/Makefile   |   4 -
 app/test-pmd/testpmd.c  |  12 -
 config/common_base  |   5 -
 config/defconfig_arm-armv7a-linuxapp-gcc|   1 -
 doc/guides/nics/features/xenvirt.ini|   6 -
 drivers/net/Makefile|   2 -
 drivers/net/xenvirt/Makefile|  57 --
 drivers/net/xenvirt/rte_eth_xenvirt.c   | 766 
 drivers/net/xenvirt/rte_eth_xenvirt.h   |  61 --
 drivers/net/xenvirt/rte_eth_xenvirt_version.map |   7 -
 drivers/net/xenvirt/rte_mempool_gntalloc.c  | 295 -
 drivers/net/xenvirt/rte_xen_lib.c   | 454 --
 drivers/net/xenvirt/rte_xen_lib.h   | 116 
 drivers/net/xenvirt/virtio_logs.h   |  70 ---
 drivers/net/xenvirt/virtqueue.h | 273 -
 mk/rte.app.mk   |   1 -
 pkg/dpdk.spec   |   3 -
 18 files changed, 2135 deletions(-)
 delete mode 100644 doc/guides/nics/features/xenvirt.ini
 delete mode 100644 drivers/net/xenvirt/Makefile
 delete mode 100644 drivers/net/xenvirt/rte_eth_xenvirt.c
 delete mode 100644 drivers/net/xenvirt/rte_eth_xenvirt.h
 delete mode 100644 drivers/net/xenvirt/rte_eth_xenvirt_version.map
 delete mode 100644 drivers/net/xenvirt/rte_mempool_gntalloc.c
 delete mode 100644 drivers/net/xenvirt/rte_xen_lib.c
 delete mode 100644 drivers/net/xenvirt/rte_xen_lib.h
 delete mode 100644 drivers/net/xenvirt/virtio_logs.h
 delete mode 100644 drivers/net/xenvirt/virtqueue.h

diff --git a/MAINTAINERS b/MAINTAINERS
index fe6c6db..003e72e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -194,9 +194,7 @@ M: Jianfeng Tan 
 F: lib/librte_eal/linuxapp/xen_dom0/
 F: lib/librte_eal/linuxapp/eal/*xen*
 F: lib/librte_eal/linuxapp/eal/include/exec-env/rte_dom0_common.h
-F: drivers/net/xenvirt/
 F: doc/guides/xen/
-F: doc/guides/nics/features/xenvirt.ini
 
 FreeBSD EAL (with overlaps)
 M: Bruce Richardson 
diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index c36be19..b6e80dd 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -77,10 +77,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)
 LDLIBS += -lrte_pmd_bnxt
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
-LDLIBS += -lrte_pmd_xenvirt
-endif
-
 endif
 
 CFLAGS_cmdline.o := -D_GNU_SOURCE
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 7d40139..f8d02ae 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -76,9 +76,6 @@
 #ifdef RTE_LIBRTE_IXGBE_PMD
 #include 
 #endif
-#ifdef RTE_LIBRTE_PMD_XENVIRT
-#include 
-#endif
 #ifdef RTE_LIBRTE_PDUMP
 #include 
 #endif
@@ -497,15 +494,6 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
"create a new mbuf pool <%s>: n=%u, size=%u, socket=%u\n",
pool_name, nb_mbuf, mbuf_seg_size, socket_id);
 
-#ifdef RTE_LIBRTE_PMD_XENVIRT
-   rte_mp = rte_mempool_gntalloc_create(pool_name, nb_mbuf, mb_size,
-   (unsigned) mb_mempool_cache,
-   sizeof(struct rte_pktmbuf_pool_private),
-   rte_pktmbuf_pool_init, NULL,
-   rte_pktmbuf_init, NULL,
-   socket_id, 0);
-#endif
-
/* if the former XEN allocation failed fall back to normal allocation */
if (rte_mp == NULL) {
if (mp_anon != 0) {
diff --git a/config/common_base b/config/common_base
index 5e97a08..93928b6 100644
--- a/config/common_base
+++ b/config/common_base
@@ -411,11 +411,6 @@ CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n
 CONFIG_RTE_LIBRTE_PMD_TAP=n
 
 #
-# Compile Xen PMD
-#
-CONFIG_RTE_LIBRTE_PMD_XENVIRT=n
-
-#
 # Compile null PMD
 #
 CONFIG_RTE_LIBRTE_PMD_NULL=y
diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc 
b/config/defconfig_arm-armv7a-linuxapp-gcc
index 00bc2ab..6628567 100644
--- a/config/defconfig_arm-armv7a-linuxapp-gcc
+++ b/config/defconfig_arm-armv7a-linuxapp-gcc
@@ -76,7 +76,6 @@ CONFIG_RTE_LIBRTE_I40E_PMD=n
 CONFIG_RTE_LIBRTE_IXGBE_PMD=n
 CONFIG_RTE_LIBRTE_MLX4_PMD=n
 CONFIG_RTE_LIBRTE_VMXNET3_PMD=n
-CONFIG_RTE_LIBRTE_PMD_XENVIRT=n
 CONFIG_RTE_LIBRTE_PMD_BNX2X=n
 CONFIG_RTE_LIBRTE_QEDE_PMD=n
 CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n
diff --git a/doc/guides/nics/features/xenvirt.ini 
b/doc/guides/nics/features/xenvirt.ini
deleted file mode 100644
index 8ab5f46..000
--- a/doc/guides/nics/features/xenvirt.ini
+++ /dev/null
@@ -1,6 +0,0 @@
-;
-; Supported features of the 'xenvirt' network poll mode driver.
-;
-; Refer to default.ini for the full list of available PMD features.
-;
-[Features]
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index d33c959..0e00cd1 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -97,8 +97,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio
 DEPDIRS-virtio = $(core-libs)
 DIRS-$(CON

[Xen-devel] [PATCH 1/6] example/vhost_xen: remove

2017-08-30 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
---
 MAINTAINERS |1 -
 examples/Makefile   |1 -
 examples/vhost_xen/Makefile |   52 --
 examples/vhost_xen/main.c   | 1522 ---
 examples/vhost_xen/main.h   |   66 --
 examples/vhost_xen/vhost_monitor.c  |  595 --
 examples/vhost_xen/virtio-net.h |  113 ---
 examples/vhost_xen/xen_vhost.h  |  148 
 examples/vhost_xen/xenstore_parse.c |  775 --
 9 files changed, 3273 deletions(-)
 delete mode 100644 examples/vhost_xen/Makefile
 delete mode 100644 examples/vhost_xen/main.c
 delete mode 100644 examples/vhost_xen/main.h
 delete mode 100644 examples/vhost_xen/vhost_monitor.c
 delete mode 100644 examples/vhost_xen/virtio-net.h
 delete mode 100644 examples/vhost_xen/xen_vhost.h
 delete mode 100644 examples/vhost_xen/xenstore_parse.c

diff --git a/MAINTAINERS b/MAINTAINERS
index a0cd75e..fe6c6db 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -196,7 +196,6 @@ F: lib/librte_eal/linuxapp/eal/*xen*
 F: lib/librte_eal/linuxapp/eal/include/exec-env/rte_dom0_common.h
 F: drivers/net/xenvirt/
 F: doc/guides/xen/
-F: examples/vhost_xen/
 F: doc/guides/nics/features/xenvirt.ini
 
 FreeBSD EAL (with overlaps)
diff --git a/examples/Makefile b/examples/Makefile
index 28354ff..d27eddd 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -89,7 +89,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += tep_termination
 endif
 DIRS-$(CONFIG_RTE_LIBRTE_TIMER) += timer
 DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost vhost_scsi
-DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen
 DIRS-y += vmdq
 DIRS-y += vmdq_dcb
 ifeq ($(CONFIG_RTE_LIBRTE_POWER), y)
diff --git a/examples/vhost_xen/Makefile b/examples/vhost_xen/Makefile
deleted file mode 100644
index ad2466a..000
--- a/examples/vhost_xen/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-#   BSD LICENSE
-#
-#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-#   All rights reserved.
-#
-#   Redistribution and use in source and binary forms, with or without
-#   modification, are permitted provided that the following conditions
-#   are met:
-#
-# * Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in
-#   the documentation and/or other materials provided with the
-#   distribution.
-# * Neither the name of Intel Corporation nor the names of its
-#   contributors may be used to endorse or promote products derived
-#   from this software without specific prior written permission.
-#
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
-endif
-
-# Default target, can be overridden by command line or environment
-RTE_TARGET ?= x86_64-native-linuxapp-gcc
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
-# binary name
-APP = vhost-switch
-
-# all source are stored in SRCS-y
-SRCS-y := main.c vhost_monitor.c xenstore_parse.c
-
-CFLAGS += -O2 -I/usr/local/include -D_FILE_OFFSET_BITS=64 -Wno-unused-parameter
-CFLAGS += $(WERROR_FLAGS)
-CFLAGS += -D_GNU_SOURCE
-LDFLAGS += -lxenstore
-
-include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c
deleted file mode 100644
index eba4d35..000
--- a/examples/vhost_xen/main.c
+++ /dev/null
@@ -1,1522 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materials provided with the
- 

[Xen-devel] [PATCH v2 4/6] xen: remove xen dependency in drivers, ether, mempool

2017-09-13 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
Acked-by: Bruce Richardson 
---
 drivers/crypto/qat/qat_qp.c  | 7 +--
 drivers/net/i40e/i40e_rxtx.c | 8 ++--
 lib/librte_ether/rte_ethdev.c| 7 +--
 lib/librte_mempool/rte_mempool.c | 8 ++--
 4 files changed, 6 insertions(+), 24 deletions(-)

diff --git a/drivers/crypto/qat/qat_qp.c b/drivers/crypto/qat/qat_qp.c
index 5048d21..34f75ca 100644
--- a/drivers/crypto/qat/qat_qp.c
+++ b/drivers/crypto/qat/qat_qp.c
@@ -122,14 +122,9 @@ queue_dma_zone_reserve(const char *queue_name, uint32_t 
queue_size,
break;
default:
memzone_flags = RTE_MEMZONE_SIZE_HINT_ONLY;
-}
-#ifdef RTE_LIBRTE_XEN_DOM0
-   return rte_memzone_reserve_bounded(queue_name, queue_size,
-   socket_id, 0, RTE_CACHE_LINE_SIZE, RTE_PGSIZE_2M);
-#else
+   }
return rte_memzone_reserve_aligned(queue_name, queue_size, socket_id,
memzone_flags, queue_size);
-#endif
 }
 
 int qat_crypto_sym_qp_setup(struct rte_cryptodev *dev, uint16_t queue_pair_id,
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index d42c23c..f571e79 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2221,12 +2221,8 @@ i40e_memzone_reserve(const char *name, uint32_t len, int 
socket_id)
if (mz)
return mz;
 
-   if (rte_xen_dom0_supported())
-   mz = rte_memzone_reserve_bounded(name, len,
-   socket_id, 0, I40E_RING_BASE_ALIGN, 
RTE_PGSIZE_2M);
-   else
-   mz = rte_memzone_reserve_aligned(name, len,
-   socket_id, 0, I40E_RING_BASE_ALIGN);
+   mz = rte_memzone_reserve_aligned(name, len,
+socket_id, 0, I40E_RING_BASE_ALIGN);
return mz;
 }
 
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index a88916f..e8f7295 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2835,12 +2835,7 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, 
const char *ring_name,
if (mz)
return mz;
 
-   if (rte_xen_dom0_supported())
-   return rte_memzone_reserve_bounded(z_name, size, socket_id,
-  0, align, RTE_PGSIZE_2M);
-   else
-   return rte_memzone_reserve_aligned(z_name, size, socket_id,
-  0, align);
+   return rte_memzone_reserve_aligned(z_name, size, socket_id, 0, align);
 }
 
 int
diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c
index 6fc3c9c..6d726ae 100644
--- a/lib/librte_mempool/rte_mempool.c
+++ b/lib/librte_mempool/rte_mempool.c
@@ -527,11 +527,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
if (mp->nb_mem_chunks != 0)
return -EEXIST;
 
-   if (rte_xen_dom0_supported()) {
-   pg_sz = RTE_PGSIZE_2M;
-   pg_shift = rte_bsf32(pg_sz);
-   align = pg_sz;
-   } else if (rte_eal_has_hugepages()) {
+   if (rte_eal_has_hugepages()) {
pg_shift = 0; /* not needed, zone is physically contiguous */
pg_sz = 0;
align = RTE_CACHE_LINE_SIZE;
@@ -568,7 +564,7 @@ rte_mempool_populate_default(struct rte_mempool *mp)
else
paddr = mz->phys_addr;
 
-   if (rte_eal_has_hugepages() && !rte_xen_dom0_supported())
+   if (rte_eal_has_hugepages())
ret = rte_mempool_populate_phys(mp, mz->addr,
paddr, mz->len,
rte_mempool_memchunk_mz_free,
-- 
2.7.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH v2 2/6] net/xenvirt: remove

2017-09-13 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
Acked-by: Bruce Richardson 
---
 MAINTAINERS |   2 -
 app/test-pmd/Makefile   |   4 -
 app/test-pmd/testpmd.c  |  51 +-
 config/common_base  |   5 -
 config/defconfig_arm-armv7a-linuxapp-gcc|   1 -
 doc/guides/nics/features/xenvirt.ini|   6 -
 drivers/net/Makefile|   2 -
 drivers/net/xenvirt/Makefile|  57 --
 drivers/net/xenvirt/rte_eth_xenvirt.c   | 766 
 drivers/net/xenvirt/rte_eth_xenvirt.h   |  61 --
 drivers/net/xenvirt/rte_eth_xenvirt_version.map |   7 -
 drivers/net/xenvirt/rte_mempool_gntalloc.c  | 295 -
 drivers/net/xenvirt/rte_xen_lib.c   | 454 --
 drivers/net/xenvirt/rte_xen_lib.h   | 116 
 drivers/net/xenvirt/virtio_logs.h   |  70 ---
 drivers/net/xenvirt/virtqueue.h | 273 -
 mk/rte.app.mk   |   1 -
 pkg/dpdk.spec   |   3 -
 18 files changed, 18 insertions(+), 2156 deletions(-)
 delete mode 100644 doc/guides/nics/features/xenvirt.ini
 delete mode 100644 drivers/net/xenvirt/Makefile
 delete mode 100644 drivers/net/xenvirt/rte_eth_xenvirt.c
 delete mode 100644 drivers/net/xenvirt/rte_eth_xenvirt.h
 delete mode 100644 drivers/net/xenvirt/rte_eth_xenvirt_version.map
 delete mode 100644 drivers/net/xenvirt/rte_mempool_gntalloc.c
 delete mode 100644 drivers/net/xenvirt/rte_xen_lib.c
 delete mode 100644 drivers/net/xenvirt/rte_xen_lib.h
 delete mode 100644 drivers/net/xenvirt/virtio_logs.h
 delete mode 100644 drivers/net/xenvirt/virtqueue.h

diff --git a/MAINTAINERS b/MAINTAINERS
index fe6c6db..003e72e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -194,9 +194,7 @@ M: Jianfeng Tan 
 F: lib/librte_eal/linuxapp/xen_dom0/
 F: lib/librte_eal/linuxapp/eal/*xen*
 F: lib/librte_eal/linuxapp/eal/include/exec-env/rte_dom0_common.h
-F: drivers/net/xenvirt/
 F: doc/guides/xen/
-F: doc/guides/nics/features/xenvirt.ini
 
 FreeBSD EAL (with overlaps)
 M: Bruce Richardson 
diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile
index c36be19..b6e80dd 100644
--- a/app/test-pmd/Makefile
+++ b/app/test-pmd/Makefile
@@ -77,10 +77,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_BNXT_PMD),y)
 LDLIBS += -lrte_pmd_bnxt
 endif
 
-ifeq ($(CONFIG_RTE_LIBRTE_PMD_XENVIRT),y)
-LDLIBS += -lrte_pmd_xenvirt
-endif
-
 endif
 
 CFLAGS_cmdline.o := -D_GNU_SOURCE
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index e097ee0..c92fff2 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -76,9 +76,6 @@
 #ifdef RTE_LIBRTE_IXGBE_PMD
 #include 
 #endif
-#ifdef RTE_LIBRTE_PMD_XENVIRT
-#include 
-#endif
 #ifdef RTE_LIBRTE_PDUMP
 #include 
 #endif
@@ -497,37 +494,25 @@ mbuf_pool_create(uint16_t mbuf_seg_size, unsigned nb_mbuf,
"create a new mbuf pool <%s>: n=%u, size=%u, socket=%u\n",
pool_name, nb_mbuf, mbuf_seg_size, socket_id);
 
-#ifdef RTE_LIBRTE_PMD_XENVIRT
-   rte_mp = rte_mempool_gntalloc_create(pool_name, nb_mbuf, mb_size,
-   (unsigned) mb_mempool_cache,
-   sizeof(struct rte_pktmbuf_pool_private),
-   rte_pktmbuf_pool_init, NULL,
-   rte_pktmbuf_init, NULL,
-   socket_id, 0);
-#endif
-
-   /* if the former XEN allocation failed fall back to normal allocation */
-   if (rte_mp == NULL) {
-   if (mp_anon != 0) {
-   rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
-   mb_size, (unsigned) mb_mempool_cache,
-   sizeof(struct rte_pktmbuf_pool_private),
-   socket_id, 0);
-   if (rte_mp == NULL)
-   goto err;
-
-   if (rte_mempool_populate_anon(rte_mp) == 0) {
-   rte_mempool_free(rte_mp);
-   rte_mp = NULL;
-   goto err;
-   }
-   rte_pktmbuf_pool_init(rte_mp, NULL);
-   rte_mempool_obj_iter(rte_mp, rte_pktmbuf_init, NULL);
-   } else {
-   /* wrapper to rte_mempool_create() */
-   rte_mp = rte_pktmbuf_pool_create(pool_name, nb_mbuf,
-   mb_mempool_cache, 0, mbuf_seg_size, socket_id);
+   if (mp_anon != 0) {
+   rte_mp = rte_mempool_create_empty(pool_name, nb_mbuf,
+   mb_size, (unsigned) mb_mempool_cache,
+   sizeof(struct rte_pktmbuf_pool_private),
+   socket_id, 0);
+   if (rte_mp == NULL)
+   goto err;
+
+   if (rte_mempool_populate_anon(rte_mp) == 0) {
+   rte_mem

[Xen-devel] [PATCH v2 5/6] eal: remove API rte_mem_phy2mch

2017-09-13 Thread Jianfeng Tan
Previously, to get MFN address in dom0, this API is a wrapper to
obtain the "physical address".

As we will removed xen dom0 support, this API is not necessary.

Signed-off-by: Jianfeng Tan 
Acked-by: Bruce Richardson 
---
 doc/guides/rel_notes/release_17_11.rst |  2 ++
 drivers/net/e1000/em_rxtx.c|  4 ++--
 drivers/net/e1000/igb_rxtx.c   |  4 ++--
 drivers/net/fm10k/fm10k_ethdev.c   |  4 ++--
 drivers/net/i40e/i40e_ethdev.c |  2 +-
 drivers/net/i40e/i40e_fdir.c   |  2 +-
 drivers/net/i40e/i40e_rxtx.c   |  8 
 drivers/net/ixgbe/ixgbe_rxtx.c |  4 ++--
 drivers/net/sfc/sfc.c  |  2 +-
 lib/librte_eal/common/include/rte_memory.h | 30 --
 lib/librte_mempool/rte_mempool.c   |  3 ---
 11 files changed, 17 insertions(+), 48 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_11.rst 
b/doc/guides/rel_notes/release_17_11.rst
index 170f4f9..8534947 100644
--- a/doc/guides/rel_notes/release_17_11.rst
+++ b/doc/guides/rel_notes/release_17_11.rst
@@ -110,6 +110,8 @@ API Changes
Also, make sure to start the actual text at the margin.
=
 
+   * ``rte_mem_phy2mch`` was used in xen dom0 to obtain the physical address;
+ remove this API as xen dom0 support was removed.
 
 ABI Changes
 ---
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 31819c5..a0f63a7 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -1289,7 +1289,7 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev,
txq->port_id = dev->data->port_id;
 
txq->tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(queue_idx));
-   txq->tx_ring_phys_addr = rte_mem_phy2mch(tz->memseg_id, tz->phys_addr);
+   txq->tx_ring_phys_addr = tz->phys_addr;
txq->tx_ring = (struct e1000_data_desc *) tz->addr;
 
PMD_INIT_LOG(DEBUG, "sw_ring=%p hw_ring=%p dma_addr=0x%"PRIx64,
@@ -1416,7 +1416,7 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,
 
rxq->rdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDT(queue_idx));
rxq->rdh_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDH(queue_idx));
-   rxq->rx_ring_phys_addr = rte_mem_phy2mch(rz->memseg_id, rz->phys_addr);
+   rxq->rx_ring_phys_addr = rz->phys_addr;
rxq->rx_ring = (struct e1000_rx_desc *) rz->addr;
 
PMD_INIT_LOG(DEBUG, "sw_ring=%p hw_ring=%p dma_addr=0x%"PRIx64,
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index 1c80a2a..0fccb5d 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -1530,7 +1530,7 @@ eth_igb_tx_queue_setup(struct rte_eth_dev *dev,
txq->port_id = dev->data->port_id;
 
txq->tdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_TDT(txq->reg_idx));
-   txq->tx_ring_phys_addr = rte_mem_phy2mch(tz->memseg_id, tz->phys_addr);
+   txq->tx_ring_phys_addr = tz->phys_addr;
 
txq->tx_ring = (union e1000_adv_tx_desc *) tz->addr;
/* Allocate software ring */
@@ -1667,7 +1667,7 @@ eth_igb_rx_queue_setup(struct rte_eth_dev *dev,
}
rxq->rdt_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDT(rxq->reg_idx));
rxq->rdh_reg_addr = E1000_PCI_REG_ADDR(hw, E1000_RDH(rxq->reg_idx));
-   rxq->rx_ring_phys_addr = rte_mem_phy2mch(rz->memseg_id, rz->phys_addr);
+   rxq->rx_ring_phys_addr = rz->phys_addr;
rxq->rx_ring = (union e1000_adv_rx_desc *) rz->addr;
 
/* Allocate software ring. */
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index e60d3a3..15ea2a5 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -1887,7 +1887,7 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t 
queue_id,
return -ENOMEM;
}
q->hw_ring = mz->addr;
-   q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr);
+   q->hw_ring_phys_addr = mz->phys_addr;
 
/* Check if number of descs satisfied Vector requirement */
if (!rte_is_power_of_2(nb_desc)) {
@@ -2047,7 +2047,7 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t 
queue_id,
return -ENOMEM;
}
q->hw_ring = mz->addr;
-   q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr);
+   q->hw_ring_phys_addr = mz->phys_addr;
 
/*
 * allocate memory for the RS bit tracker. Enough slots to hold the
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f12aefa..f30b4f5 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -3769,7 +3769,7 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struc

[Xen-devel] [PATCH v2 3/6] xen: remove xen dependency in app, examples, test

2017-09-13 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
Acked-by: Bruce Richardson 
---
 examples/ip_pipeline/app.h  |  4 --
 examples/ip_pipeline/config_parse.c | 19 -
 examples/ip_pipeline/init.c |  5 ---
 examples/kni/main.c |  3 --
 test/test/process.h | 10 -
 test/test/test.c|  4 --
 test/test/test_eal_flags.c  | 81 -
 7 files changed, 126 deletions(-)

diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h
index e41290e..94e7a6d 100644
--- a/examples/ip_pipeline/app.h
+++ b/examples/ip_pipeline/app.h
@@ -428,10 +428,6 @@ struct app_eal_params {
/* Interrupt mode for VFIO (legacy|msi|msix) */
char *vfio_intr;
 
-   /* Support running on Xen dom0 without hugetlbfs */
-   uint32_t xen_dom0_present;
-   int xen_dom0;
-
uint32_t parsed;
 };
 
diff --git a/examples/ip_pipeline/config_parse.c 
b/examples/ip_pipeline/config_parse.c
index 0b76134..3211c6a 100644
--- a/examples/ip_pipeline/config_parse.c
+++ b/examples/ip_pipeline/config_parse.c
@@ -809,21 +809,6 @@ parse_eal(struct app_params *app,
continue;
}
 
-   /* xen_dom0 */
-   if (strcmp(entry->name, "xen_dom0") == 0) {
-   int val;
-
-   PARSE_ERROR_DUPLICATE((p->xen_dom0_present == 0),
-   section_name,
-   entry->name);
-   p->xen_dom0_present = 1;
-
-   val = parser_read_arg_bool(entry->value);
-   PARSE_ERROR((val >= 0), section_name, entry->name);
-   p->xen_dom0 = val;
-   continue;
-   }
-
/* unrecognized */
PARSE_ERROR_INVALID(0, section_name, entry->name);
}
@@ -2643,10 +2628,6 @@ save_eal_params(struct app_params *app, FILE *f)
if (p->vfio_intr)
fprintf(f, "%s = %s\n", "vfio_intr", p->vfio_intr);
 
-   if (p->xen_dom0_present)
-   fprintf(f, "%s = %s\n", "xen_dom0",
-   (p->xen_dom0) ? "yes" : "no");
-
fputc('\n', f);
 }
 
diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index 7cde49a..034c238 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -296,11 +296,6 @@ app_init_eal(struct app_params *app)
app->eal_argv[n_args++] = strdup(buffer);
}
 
-   if ((p->xen_dom0_present) && (p->xen_dom0)) {
-   snprintf(buffer, sizeof(buffer), "--xen-dom0");
-   app->eal_argv[n_args++] = strdup(buffer);
-   }
-
snprintf(buffer, sizeof(buffer), "--");
app->eal_argv[n_args++] = strdup(buffer);
 
diff --git a/examples/kni/main.c b/examples/kni/main.c
index e3bc2fb..9f9d227 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -919,9 +919,6 @@ main(int argc, char** argv)
continue;
kni_free_kni(port);
}
-#ifdef RTE_LIBRTE_XEN_DOM0
-   rte_kni_close();
-#endif
for (i = 0; i < RTE_MAX_ETHPORTS; i++)
if (kni_port_params_array[i]) {
rte_free(kni_port_params_array[i]);
diff --git a/test/test/process.h b/test/test/process.h
index 4f8d121..51ced12 100644
--- a/test/test/process.h
+++ b/test/test/process.h
@@ -52,11 +52,7 @@ static inline int
 process_dup(const char *const argv[], int numargs, const char *env_value)
 {
int num;
-#ifdef RTE_LIBRTE_XEN_DOM0
-   char *argv_cpy[numargs + 2];
-#else
char *argv_cpy[numargs + 1];
-#endif
int i, fd, status;
char path[32];
 
@@ -67,14 +63,8 @@ process_dup(const char *const argv[], int numargs, const 
char *env_value)
/* make a copy of the arguments to be passed to exec */
for (i = 0; i < numargs; i++)
argv_cpy[i] = strdup(argv[i]);
-#ifdef RTE_LIBRTE_XEN_DOM0
-   argv_cpy[i] = strdup("--xen-dom0");
-   argv_cpy[i + 1] = NULL;
-   num = numargs + 1;
-#else
argv_cpy[i] = NULL;
num = numargs;
-#endif
 
/* close all open file descriptors, check /proc/self/fd to only
 * call close on open fds. Exclude fds 0, 1 and 2*/
diff --git a/test/test/test.c b/test/test/test.c
index c561eb5..9accbd1 100644
--- a/test/test/test.c
+++ b/test/test/test.c
@@ -87,11 +87,7 @@ do_recursive_call(void)
{ "test_invalid_b_flag", no_action },
{ "test_invalid_vdev_flag", no_action },
{ "test_invalid_r_flag", no_action },
-#ifdef RTE_

[Xen-devel] [PATCH v2 1/6] examples/vhost_xen: remove

2017-09-13 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan 
Acked-by: Bruce Richardson 
---
 MAINTAINERS |1 -
 examples/Makefile   |1 -
 examples/vhost_xen/Makefile |   52 --
 examples/vhost_xen/main.c   | 1522 ---
 examples/vhost_xen/main.h   |   66 --
 examples/vhost_xen/vhost_monitor.c  |  595 --
 examples/vhost_xen/virtio-net.h |  113 ---
 examples/vhost_xen/xen_vhost.h  |  148 
 examples/vhost_xen/xenstore_parse.c |  775 --
 9 files changed, 3273 deletions(-)
 delete mode 100644 examples/vhost_xen/Makefile
 delete mode 100644 examples/vhost_xen/main.c
 delete mode 100644 examples/vhost_xen/main.h
 delete mode 100644 examples/vhost_xen/vhost_monitor.c
 delete mode 100644 examples/vhost_xen/virtio-net.h
 delete mode 100644 examples/vhost_xen/xen_vhost.h
 delete mode 100644 examples/vhost_xen/xenstore_parse.c

diff --git a/MAINTAINERS b/MAINTAINERS
index a0cd75e..fe6c6db 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -196,7 +196,6 @@ F: lib/librte_eal/linuxapp/eal/*xen*
 F: lib/librte_eal/linuxapp/eal/include/exec-env/rte_dom0_common.h
 F: drivers/net/xenvirt/
 F: doc/guides/xen/
-F: examples/vhost_xen/
 F: doc/guides/nics/features/xenvirt.ini
 
 FreeBSD EAL (with overlaps)
diff --git a/examples/Makefile b/examples/Makefile
index 28354ff..d27eddd 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -89,7 +89,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += tep_termination
 endif
 DIRS-$(CONFIG_RTE_LIBRTE_TIMER) += timer
 DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost vhost_scsi
-DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen
 DIRS-y += vmdq
 DIRS-y += vmdq_dcb
 ifeq ($(CONFIG_RTE_LIBRTE_POWER), y)
diff --git a/examples/vhost_xen/Makefile b/examples/vhost_xen/Makefile
deleted file mode 100644
index ad2466a..000
--- a/examples/vhost_xen/Makefile
+++ /dev/null
@@ -1,52 +0,0 @@
-#   BSD LICENSE
-#
-#   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
-#   All rights reserved.
-#
-#   Redistribution and use in source and binary forms, with or without
-#   modification, are permitted provided that the following conditions
-#   are met:
-#
-# * Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in
-#   the documentation and/or other materials provided with the
-#   distribution.
-# * Neither the name of Intel Corporation nor the names of its
-#   contributors may be used to endorse or promote products derived
-#   from this software without specific prior written permission.
-#
-#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-ifeq ($(RTE_SDK),)
-$(error "Please define RTE_SDK environment variable")
-endif
-
-# Default target, can be overridden by command line or environment
-RTE_TARGET ?= x86_64-native-linuxapp-gcc
-
-include $(RTE_SDK)/mk/rte.vars.mk
-
-# binary name
-APP = vhost-switch
-
-# all source are stored in SRCS-y
-SRCS-y := main.c vhost_monitor.c xenstore_parse.c
-
-CFLAGS += -O2 -I/usr/local/include -D_FILE_OFFSET_BITS=64 -Wno-unused-parameter
-CFLAGS += $(WERROR_FLAGS)
-CFLAGS += -D_GNU_SOURCE
-LDFLAGS += -lxenstore
-
-include $(RTE_SDK)/mk/rte.extapp.mk
diff --git a/examples/vhost_xen/main.c b/examples/vhost_xen/main.c
deleted file mode 100644
index eba4d35..000
--- a/examples/vhost_xen/main.c
+++ /dev/null
@@ -1,1522 +0,0 @@
-/*-
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in
- *   the documentation and/or other materia

[Xen-devel] [PATCH v2 0/6] remove xen dom0 support in DPDK

2017-09-13 Thread Jianfeng Tan
v2:
  - Address Bruce's comment on testpmd's memory init for xenvirt in patch 2.
  - Update rte_eal_version.map in bsd and eal.
  - Switch patch 5 and patch 6 so that we bump library version just once.

Following the calls on the mailing list:
http://dpdk.org/ml/archives/dev/2017-June/068151.html
The Technical Board decided to drop Xen dom0 support from EAL:
http://dpdk.org/ml/archives/dev/2017-June/068615.html

This series remove xen dom0 support in DPDK, as well as xenvirt PMD and
vhost_xen example.

What are effected?

After these patches, users cannot run DPDK applications inside xen dom0.

What are not effected?

Users can still run DPDK applications inside xen domU on pass-throughed
physical devices and virtio devices; on the host, users still can run
DPDK applications same as before.

Jianfeng Tan (6):
  examples/vhost_xen: remove
  net/xenvirt: remove
  xen: remove xen dependency in app, examples, test
  xen: remove xen dependency in drivers, ether, mempool
  eal: remove API rte_mem_phy2mch
  eal: remove xen dom0 support

 MAINTAINERS|   10 -
 app/test-pmd/Makefile  |4 -
 app/test-pmd/testpmd.c |   51 +-
 config/common_base |   10 -
 config/defconfig_arm-armv7a-linuxapp-gcc   |1 -
 doc/guides/contributing/documentation.rst  |1 -
 doc/guides/index.rst   |1 -
 doc/guides/linux_gsg/build_sample_apps.rst |5 +-
 doc/guides/linux_gsg/sys_reqs.rst  |   53 -
 doc/guides/nics/features/xenvirt.ini   |6 -
 doc/guides/prog_guide/env_abstraction_layer.rst|   11 -
 doc/guides/prog_guide/source_org.rst   |1 -
 doc/guides/rel_notes/deprecation.rst   |3 -
 doc/guides/rel_notes/release_17_11.rst |   14 +
 doc/guides/testpmd_app_ug/run_app.rst  |4 -
 doc/guides/xen/img/dpdk_xen_pkt_switch.png |  Bin 163842 -> 0 bytes
 doc/guides/xen/img/grant_refs.png  |  Bin 6405 -> 0 bytes
 doc/guides/xen/img/grant_table.png |  Bin 96762 -> 0 bytes
 doc/guides/xen/index.rst   |   38 -
 doc/guides/xen/pkt_switch.rst  |  470 --
 drivers/crypto/qat/qat_qp.c|7 +-
 drivers/net/Makefile   |2 -
 drivers/net/e1000/em_rxtx.c|4 +-
 drivers/net/e1000/igb_rxtx.c   |4 +-
 drivers/net/fm10k/fm10k_ethdev.c   |4 +-
 drivers/net/i40e/i40e_ethdev.c |2 +-
 drivers/net/i40e/i40e_fdir.c   |2 +-
 drivers/net/i40e/i40e_rxtx.c   |   16 +-
 drivers/net/ixgbe/ixgbe_rxtx.c |4 +-
 drivers/net/sfc/sfc.c  |2 +-
 drivers/net/xenvirt/Makefile   |   57 -
 drivers/net/xenvirt/rte_eth_xenvirt.c  |  766 --
 drivers/net/xenvirt/rte_eth_xenvirt.h  |   61 -
 drivers/net/xenvirt/rte_eth_xenvirt_version.map|7 -
 drivers/net/xenvirt/rte_mempool_gntalloc.c |  295 
 drivers/net/xenvirt/rte_xen_lib.c  |  454 --
 drivers/net/xenvirt/rte_xen_lib.h  |  116 --
 drivers/net/xenvirt/virtio_logs.h  |   70 -
 drivers/net/xenvirt/virtqueue.h|  273 
 examples/Makefile  |1 -
 examples/ip_pipeline/app.h |4 -
 examples/ip_pipeline/config_parse.c|   19 -
 examples/ip_pipeline/init.c|5 -
 examples/kni/main.c|3 -
 examples/vhost_xen/Makefile|   52 -
 examples/vhost_xen/main.c  | 1522 
 examples/vhost_xen/main.h  |   66 -
 examples/vhost_xen/vhost_monitor.c |  595 
 examples/vhost_xen/virtio-net.h|  113 --
 examples/vhost_xen/xen_vhost.h |  148 --
 examples/vhost_xen/xenstore_parse.c|  775 --
 lib/librte_eal/bsdapp/eal/Makefile |2 +-
 .../bsdapp/eal/include/exec-env/rte_dom0_common.h  |  107 --
 lib/librte_eal/bsdapp/eal/rte_eal_version.map  |3 -
 lib/librte_eal/common/eal_common_options.c |3 -
 lib/librte_eal/common/eal_internal_cfg.h   |1 -
 lib/librte_eal/common/eal_options.h|2 -
 lib/librte_eal/common/include/rte_memory.h |   71 -
 lib/librte_eal/linuxapp/Makefile   |2 -
 lib/librte_eal/linuxapp/eal/Makefile   |7 +-
 lib/librte_eal/linuxapp/eal/eal.c  |   24 -
 lib/librte_eal/linuxapp/eal/eal_memory.c   |   56 -
 lib/libr