DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH v5 1/2] librte_ether: add protection against overwrite device data
From: Kerlin, MarcinX @ 2016-10-06 13:57 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: dev@dpdk.org, De Lara Guarch, Pablo, Gonzalez Monroy, Sergio
In-Reply-To: <1538060.S3DiiuebUu@xps13>

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, October 06, 2016 11:41 AM
> To: Kerlin, MarcinX <marcinx.kerlin@intel.com>
> Cc: dev@dpdk.org; De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> Gonzalez Monroy, Sergio <sergio.gonzalez.monroy@intel.com>
> Subject: Re: [PATCH v5 1/2] librte_ether: add protection against overwrite
> device data
> 
> Hi Marcin,
> 
> 2016-09-30 16:00, Marcin Kerlin:
> > Added protection against overwrite device data in array
> > rte_eth_dev_data[] for the next secondary applications. Secondary
> > process appends in the first free place rather than at the beginning.
> > This behavior prevents overwriting devices data of primary process by
> secondary process.
> 
> I've just realized that you are trying to fix an useless code.
> Why not just remove the array rte_eth_dev_data[] at first?

because pointer to rte_eth_dev_data in rte_eth_devices[] is 
just to array rte_eth_dev_data[].

rte_ethdev.c:214 
eth_dev->data = &rte_eth_dev_data[port_id];

> We already have the array rte_eth_devices[] and there is a pointer to
> rte_eth_dev_data in rte_eth_dev.

As you write above there is a pointer, but after run secondary testpmd this pointer
will indicate data which hold from now data for secondary testpmd.

1) run testpmd [primary]

rte_eth_devices[0].data.name = 3:0.1

2) run testpmd [secondary]
This testpmd overwrite first index in rte_eth_dev_data[]
3:0.1 -> eth_pcap0

3) back to testpmd [primary]
rte_eth_devices[0].data.name = eth_pcap0

from now in primary testpmd our device name is eth_pcap0 but should be 3:0.1

> 
> Is it just a workaround to be able to lookup the rte_eth_dev_data memzone in
> the secondary process?

No it is not workaround, it is protection against overwrite device data.
I think that my cover letter good explain what is wrong. I did there
short debug log. 

> So wouldn't it be saner to have rte_eth_devices[] in a memzone?

So you mean that move rte_eth_devices[] to memzone + remove rte_eth_dev_data[].
What will indicate pointer inside rte_eth_dev  rte_eth_devices[]:
(struct rte_eth_dev_data *data;  /**< Pointer to device data */)

If I did not understand you please clarify more.

Regards,
Marcin
> 
> Sergio, as the multi-process maintainer, I guess you have an idea :)

^ permalink raw reply

* Re: [PATCH v6 3/4] app/test: added tests for libcrypto PMD
From: Azarewicz, PiotrX T @ 2016-10-06 13:53 UTC (permalink / raw)
  To: Trahe, Fiona
  Cc: Mrozowicz, SlawomirX, Kerlin, MarcinX, Mrzyglod, DanielX T,
	Mrozowicz, SlawomirX, dev@dpdk.org
In-Reply-To: <348A99DA5F5B7549AA880327E580B435890EE063@IRSMSX101.ger.corp.intel.com>

Hi Fiona,

> This patch breaks autotests for all PMDs, due to increasing the MBUF size to
> UNIT16_MAX.
> USER1: Can't create CRYPTO_MBUFPOOL
> 
> It needs more than 500MBs in the MBUFPOOL to run this test.
> Setting this back to MBUF_SIZE fixes the issue, but breaks 2 tests in
> libcrypto_autotest
> 
> TestCase create_gmac_operation() line 5060 failed: no room to append aad
>  + TestCase [27] : test_AES_GMAC_authentication_test_case_4 failed
> TestCase create_gmac_operation() line 5060 failed: no room to append aad
>  + TestCase [28] : test_AES_GMAC_authentication_verify_test_case_4 failed
> 
> Can you investigate if it's possible to run these 2 tests using a different
> smaller MBUFPOOL -  maybe with only a few large mbufs?

Yes, I think that it is possible to run these 2 tests using a different mempoll.
I will make a fix for the issue.

Piotr

^ permalink raw reply

* [PATCH] eal/vdev: rename vdev driver init/uninit to probe/remove
From: Shreyansh Jain @ 2016-10-06 13:54 UTC (permalink / raw)
  To: david.marchand; +Cc: dev, thomas.monjalon, Shreyansh Jain

Inline with PCI probe and remove, VDEV probe and remove hooks provide
a uniform naming.
PCI probe represents scan and driver initialization. For VDEV, it will
represent argument parsing and initialization.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/crypto/aesni_gcm/aesni_gcm_pmd.c   | 12 ++++++------
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 12 ++++++------
 drivers/crypto/kasumi/rte_kasumi_pmd.c     | 12 ++++++------
 drivers/crypto/null/null_crypto_pmd.c      | 12 ++++++------
 drivers/crypto/snow3g/rte_snow3g_pmd.c     | 12 ++++++------
 drivers/net/af_packet/rte_eth_af_packet.c  |  8 ++++----
 drivers/net/bonding/rte_eth_bond_pmd.c     |  8 ++++----
 drivers/net/mpipe/mpipe_tilegx.c           |  6 +++---
 drivers/net/null/rte_eth_null.c            |  8 ++++----
 drivers/net/pcap/rte_eth_pcap.c            |  8 ++++----
 drivers/net/ring/rte_eth_ring.c            |  8 ++++----
 drivers/net/vhost/rte_eth_vhost.c          |  8 ++++----
 drivers/net/virtio/virtio_user_ethdev.c    |  8 ++++----
 drivers/net/xenvirt/rte_eth_xenvirt.c      |  8 ++++----
 lib/librte_eal/common/eal_common_vdev.c    |  4 ++--
 lib/librte_eal/common/include/rte_vdev.h   | 14 +++++++-------
 16 files changed, 74 insertions(+), 74 deletions(-)

diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
index fc939fa..317c556 100644
--- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
+++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
@@ -395,7 +395,7 @@ aesni_gcm_pmd_dequeue_burst(void *queue_pair,
 	return nb_dequeued;
 }
 
-static int aesni_gcm_uninit(const char *name);
+static int aesni_gcm_remove(const char *name);
 
 static int
 aesni_gcm_create(const char *name,
@@ -477,12 +477,12 @@ aesni_gcm_create(const char *name,
 init_error:
 	GCM_LOG_ERR("driver %s: create failed", name);
 
-	aesni_gcm_uninit(crypto_dev_name);
+	aesni_gcm_remove(crypto_dev_name);
 	return -EFAULT;
 }
 
 static int
-aesni_gcm_init(const char *name, const char *input_args)
+aesni_gcm_probe(const char *name, const char *input_args)
 {
 	struct rte_crypto_vdev_init_params init_params = {
 		RTE_CRYPTODEV_VDEV_DEFAULT_MAX_NB_QUEUE_PAIRS,
@@ -503,7 +503,7 @@ aesni_gcm_init(const char *name, const char *input_args)
 }
 
 static int
-aesni_gcm_uninit(const char *name)
+aesni_gcm_remove(const char *name)
 {
 	if (name == NULL)
 		return -EINVAL;
@@ -515,8 +515,8 @@ aesni_gcm_uninit(const char *name)
 }
 
 static struct rte_vdev_driver aesni_gcm_pmd_drv = {
-	.init = aesni_gcm_init,
-	.uninit = aesni_gcm_uninit
+	.probe = aesni_gcm_probe,
+	.remove = aesni_gcm_remove
 };
 
 DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv);
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 2047269..ff2fc25 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -595,7 +595,7 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 }
 
 
-static int cryptodev_aesni_mb_uninit(const char *name);
+static int cryptodev_aesni_mb_remove(const char *name);
 
 static int
 cryptodev_aesni_mb_create(const char *name,
@@ -675,13 +675,13 @@ cryptodev_aesni_mb_create(const char *name,
 init_error:
 	MB_LOG_ERR("driver %s: cryptodev_aesni_create failed", name);
 
-	cryptodev_aesni_mb_uninit(crypto_dev_name);
+	cryptodev_aesni_mb_remove(crypto_dev_name);
 	return -EFAULT;
 }
 
 
 static int
-cryptodev_aesni_mb_init(const char *name,
+cryptodev_aesni_mb_probe(const char *name,
 		const char *input_args)
 {
 	struct rte_crypto_vdev_init_params init_params = {
@@ -703,7 +703,7 @@ cryptodev_aesni_mb_init(const char *name,
 }
 
 static int
-cryptodev_aesni_mb_uninit(const char *name)
+cryptodev_aesni_mb_remove(const char *name)
 {
 	if (name == NULL)
 		return -EINVAL;
@@ -715,8 +715,8 @@ cryptodev_aesni_mb_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
-	.init = cryptodev_aesni_mb_init,
-	.uninit = cryptodev_aesni_mb_uninit
+	.probe = cryptodev_aesni_mb_probe,
+	.remove = cryptodev_aesni_mb_remove
 };
 
 DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv);
diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c
index d1b0b99..8774fc2 100644
--- a/drivers/crypto/kasumi/rte_kasumi_pmd.c
+++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c
@@ -556,7 +556,7 @@ kasumi_pmd_dequeue_burst(void *queue_pair,
 	return nb_dequeued;
 }
 
-static int cryptodev_kasumi_uninit(const char *name);
+static int cryptodev_kasumi_remove(const char *name);
 
 static int
 cryptodev_kasumi_create(const char *name,
@@ -611,12 +611,12 @@ cryptodev_kasumi_create(const char *name,
 init_error:
 	KASUMI_LOG_ERR("driver %s: cryptodev_kasumi_create failed", name);
 
-	cryptodev_kasumi_uninit(crypto_dev_name);
+	cryptodev_kasumi_remove(crypto_dev_name);
 	return -EFAULT;
 }
 
 static int
-cryptodev_kasumi_init(const char *name,
+cryptodev_kasumi_probe(const char *name,
 		const char *input_args)
 {
 	struct rte_crypto_vdev_init_params init_params = {
@@ -638,7 +638,7 @@ cryptodev_kasumi_init(const char *name,
 }
 
 static int
-cryptodev_kasumi_uninit(const char *name)
+cryptodev_kasumi_remove(const char *name)
 {
 	if (name == NULL)
 		return -EINVAL;
@@ -651,8 +651,8 @@ cryptodev_kasumi_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = {
-	.init = cryptodev_kasumi_init,
-	.uninit = cryptodev_kasumi_uninit
+	.probe = cryptodev_kasumi_probe,
+	.remove = cryptodev_kasumi_remove
 };
 
 DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv);
diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c
index bd139b4..e41e819 100644
--- a/drivers/crypto/null/null_crypto_pmd.c
+++ b/drivers/crypto/null/null_crypto_pmd.c
@@ -182,7 +182,7 @@ null_crypto_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
 	return nb_dequeued;
 }
 
-static int cryptodev_null_uninit(const char *name);
+static int cryptodev_null_remove(const char *name);
 
 /** Create crypto device */
 static int
@@ -227,14 +227,14 @@ cryptodev_null_create(const char *name,
 
 init_error:
 	NULL_CRYPTO_LOG_ERR("driver %s: cryptodev_null_create failed", name);
-	cryptodev_null_uninit(crypto_dev_name);
+	cryptodev_null_remove(crypto_dev_name);
 
 	return -EFAULT;
 }
 
 /** Initialise null crypto device */
 static int
-cryptodev_null_init(const char *name,
+cryptodev_null_probe(const char *name,
 		const char *input_args)
 {
 	struct rte_crypto_vdev_init_params init_params = {
@@ -257,7 +257,7 @@ cryptodev_null_init(const char *name,
 
 /** Uninitialise null crypto device */
 static int
-cryptodev_null_uninit(const char *name)
+cryptodev_null_remove(const char *name)
 {
 	if (name == NULL)
 		return -EINVAL;
@@ -269,8 +269,8 @@ cryptodev_null_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_null_pmd_drv = {
-	.init = cryptodev_null_init,
-	.uninit = cryptodev_null_uninit
+	.probe = cryptodev_null_probe,
+	.remove = cryptodev_null_remove
 };
 
 DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv);
diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c
index c46d7e5..f4b596e 100644
--- a/drivers/crypto/snow3g/rte_snow3g_pmd.c
+++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c
@@ -545,7 +545,7 @@ snow3g_pmd_dequeue_burst(void *queue_pair,
 	return nb_dequeued;
 }
 
-static int cryptodev_snow3g_uninit(const char *name);
+static int cryptodev_snow3g_remove(const char *name);
 
 static int
 cryptodev_snow3g_create(const char *name,
@@ -599,12 +599,12 @@ cryptodev_snow3g_create(const char *name,
 init_error:
 	SNOW3G_LOG_ERR("driver %s: cryptodev_snow3g_create failed", name);
 
-	cryptodev_snow3g_uninit(crypto_dev_name);
+	cryptodev_snow3g_remove(crypto_dev_name);
 	return -EFAULT;
 }
 
 static int
-cryptodev_snow3g_init(const char *name,
+cryptodev_snow3g_probe(const char *name,
 		const char *input_args)
 {
 	struct rte_crypto_vdev_init_params init_params = {
@@ -626,7 +626,7 @@ cryptodev_snow3g_init(const char *name,
 }
 
 static int
-cryptodev_snow3g_uninit(const char *name)
+cryptodev_snow3g_remove(const char *name)
 {
 	if (name == NULL)
 		return -EINVAL;
@@ -639,8 +639,8 @@ cryptodev_snow3g_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = {
-	.init = cryptodev_snow3g_init,
-	.uninit = cryptodev_snow3g_uninit
+	.probe = cryptodev_snow3g_probe,
+	.remove = cryptodev_snow3g_remove
 };
 
 DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv);
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 5f48ead..6777c41 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -820,7 +820,7 @@ rte_eth_from_packet(const char *name,
 }
 
 static int
-rte_pmd_af_packet_devinit(const char *name, const char *params)
+rte_pmd_af_packet_probe(const char *name, const char *params)
 {
 	unsigned numa_node;
 	int ret = 0;
@@ -858,7 +858,7 @@ exit:
 }
 
 static int
-rte_pmd_af_packet_devuninit(const char *name)
+rte_pmd_af_packet_remove(const char *name)
 {
 	struct rte_eth_dev *eth_dev = NULL;
 	struct pmd_internals *internals;
@@ -890,8 +890,8 @@ rte_pmd_af_packet_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_af_packet_drv = {
-	.init = rte_pmd_af_packet_devinit,
-	.uninit = rte_pmd_af_packet_devuninit,
+	.probe = rte_pmd_af_packet_probe,
+	.remove = rte_pmd_af_packet_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_af_packet, pmd_af_packet_drv);
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 9202481..970fe0c 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2177,7 +2177,7 @@ const struct eth_dev_ops default_dev_ops = {
 };
 
 static int
-bond_init(const char *name, const char *params)
+bond_probe(const char *name, const char *params)
 {
 	struct bond_dev_private *internals;
 	struct rte_kvargs *kvlist;
@@ -2244,7 +2244,7 @@ parse_error:
 }
 
 static int
-bond_uninit(const char *name)
+bond_remove(const char *name)
 {
 	int  ret;
 
@@ -2509,8 +2509,8 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 }
 
 static struct rte_vdev_driver bond_drv = {
-	.init = bond_init,
-	.uninit = bond_uninit,
+	.probe = bond_probe,
+	.remove = bond_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_bonding, bond_drv);
diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c
index 5b2e8cd..b9eefdf 100644
--- a/drivers/net/mpipe/mpipe_tilegx.c
+++ b/drivers/net/mpipe/mpipe_tilegx.c
@@ -1549,7 +1549,7 @@ mpipe_link_mac(const char *ifname, uint8_t *mac)
 }
 
 static int
-rte_pmd_mpipe_devinit(const char *ifname,
+rte_pmd_mpipe_probe(const char *ifname,
 		      const char *params __rte_unused)
 {
 	gxio_mpipe_context_t *context;
@@ -1624,11 +1624,11 @@ rte_pmd_mpipe_devinit(const char *ifname,
 }
 
 static struct rte_vdev_driver pmd_mpipe_xgbe_drv = {
-	.init = rte_pmd_mpipe_devinit,
+	.probe = rte_pmd_mpipe_probe,
 };
 
 static struct rte_vdev_driver pmd_mpipe_gbe_drv = {
-	.init = rte_pmd_mpipe_devinit,
+	.probe = rte_pmd_mpipe_probe,
 };
 
 DRIVER_REGISTER_VDEV(net_mpipe_xgbe, pmd_mpipe_xgbe_drv);
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 2adc43e..c2e10a8 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -611,7 +611,7 @@ get_packet_copy_arg(const char *key __rte_unused,
 }
 
 static int
-rte_pmd_null_devinit(const char *name, const char *params)
+rte_pmd_null_probe(const char *name, const char *params)
 {
 	unsigned numa_node;
 	unsigned packet_size = default_packet_size;
@@ -663,7 +663,7 @@ free_kvlist:
 }
 
 static int
-rte_pmd_null_devuninit(const char *name)
+rte_pmd_null_remove(const char *name)
 {
 	struct rte_eth_dev *eth_dev = NULL;
 
@@ -687,8 +687,8 @@ rte_pmd_null_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_null_drv = {
-	.init = rte_pmd_null_devinit,
-	.uninit = rte_pmd_null_devuninit,
+	.probe = rte_pmd_null_probe,
+	.remove = rte_pmd_null_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_null, pmd_null_drv);
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 51ef86f..965c999 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -937,7 +937,7 @@ eth_from_pcaps(const char *name, struct pmd_devargs *rx_queues,
 }
 
 static int
-pmd_pcap_devinit(const char *name, const char *params)
+pmd_pcap_probe(const char *name, const char *params)
 {
 	unsigned int is_rx_pcap = 0, is_tx_pcap = 0;
 	struct rte_kvargs *kvlist;
@@ -1036,7 +1036,7 @@ free_kvlist:
 }
 
 static int
-pmd_pcap_devuninit(const char *name)
+pmd_pcap_remove(const char *name)
 {
 	struct rte_eth_dev *eth_dev = NULL;
 
@@ -1060,8 +1060,8 @@ pmd_pcap_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_pcap_drv = {
-	.init = pmd_pcap_devinit,
-	.uninit = pmd_pcap_devuninit,
+	.probe = pmd_pcap_probe,
+	.remove = pmd_pcap_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_pcap, pmd_pcap_drv);
diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c
index ee435c1..b91f222 100644
--- a/drivers/net/ring/rte_eth_ring.c
+++ b/drivers/net/ring/rte_eth_ring.c
@@ -505,7 +505,7 @@ out:
 }
 
 static int
-rte_pmd_ring_devinit(const char *name, const char *params)
+rte_pmd_ring_probe(const char *name, const char *params)
 {
 	struct rte_kvargs *kvlist = NULL;
 	int ret = 0;
@@ -580,7 +580,7 @@ out_free:
 }
 
 static int
-rte_pmd_ring_devuninit(const char *name)
+rte_pmd_ring_remove(const char *name)
 {
 	struct rte_eth_dev *eth_dev = NULL;
 	struct pmd_internals *internals = NULL;
@@ -624,8 +624,8 @@ rte_pmd_ring_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_ring_drv = {
-	.init = rte_pmd_ring_devinit,
-	.uninit = rte_pmd_ring_devuninit,
+	.probe = rte_pmd_ring_probe,
+	.remove = rte_pmd_ring_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_ring, pmd_ring_drv);
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 409e090..c1d09a0 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -1124,7 +1124,7 @@ open_int(const char *key __rte_unused, const char *value, void *extra_args)
 }
 
 static int
-rte_pmd_vhost_devinit(const char *name, const char *params)
+rte_pmd_vhost_probe(const char *name, const char *params)
 {
 	struct rte_kvargs *kvlist = NULL;
 	int ret = 0;
@@ -1176,7 +1176,7 @@ out_free:
 }
 
 static int
-rte_pmd_vhost_devuninit(const char *name)
+rte_pmd_vhost_remove(const char *name)
 {
 	struct rte_eth_dev *eth_dev = NULL;
 	struct pmd_internal *internal;
@@ -1226,8 +1226,8 @@ rte_pmd_vhost_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_vhost_drv = {
-	.init = rte_pmd_vhost_devinit,
-	.uninit = rte_pmd_vhost_devuninit,
+	.probe = rte_pmd_vhost_probe,
+	.remove = rte_pmd_vhost_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_vhost, pmd_vhost_drv);
diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
index a52a140..6fcedd9 100644
--- a/drivers/net/virtio/virtio_user_ethdev.c
+++ b/drivers/net/virtio/virtio_user_ethdev.c
@@ -331,7 +331,7 @@ virtio_user_eth_dev_free(struct rte_eth_dev *eth_dev)
  * Returns 0 on success.
  */
 static int
-virtio_user_pmd_devinit(const char *name, const char *params)
+virtio_user_pmd_probe(const char *name, const char *params)
 {
 	struct rte_kvargs *kvlist = NULL;
 	struct rte_eth_dev *eth_dev;
@@ -445,7 +445,7 @@ end:
 
 /** Called by rte_eth_dev_detach() */
 static int
-virtio_user_pmd_devuninit(const char *name)
+virtio_user_pmd_remove(const char *name)
 {
 	struct rte_eth_dev *eth_dev;
 	struct virtio_hw *hw;
@@ -474,8 +474,8 @@ virtio_user_pmd_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver virtio_user_driver = {
-	.init   = virtio_user_pmd_devinit,
-	.uninit = virtio_user_pmd_devuninit,
+	.probe = virtio_user_pmd_probe,
+	.remove = virtio_user_pmd_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_virtio_user, virtio_user_driver);
diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c
index 4ade78c..fa01ba0 100644
--- a/drivers/net/xenvirt/rte_eth_xenvirt.c
+++ b/drivers/net/xenvirt/rte_eth_xenvirt.c
@@ -729,7 +729,7 @@ eth_dev_xenvirt_free(const char *name, const unsigned numa_node)
 
 /*TODO: Support multiple process model */
 static int
-rte_pmd_xenvirt_devinit(const char *name, const char *params)
+rte_pmd_xenvirt_probe(const char *name, const char *params)
 {
 	if (virtio_idx == 0) {
 		if (xenstore_init() != 0) {
@@ -746,7 +746,7 @@ rte_pmd_xenvirt_devinit(const char *name, const char *params)
 }
 
 static int
-rte_pmd_xenvirt_devuninit(const char *name)
+rte_pmd_xenvirt_remove(const char *name)
 {
 	eth_dev_xenvirt_free(name, rte_socket_id());
 
@@ -760,8 +760,8 @@ rte_pmd_xenvirt_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_xenvirt_drv = {
-	.init = rte_pmd_xenvirt_devinit,
-	.uninit = rte_pmd_xenvirt_devuninit,
+	.probe = rte_pmd_xenvirt_probe,
+	.remove = rte_pmd_xenvirt_remove,
 };
 
 DRIVER_REGISTER_VDEV(net_xenvirt, pmd_xenvirt_drv);
diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c
index 6dab782..0434390 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -76,7 +76,7 @@ rte_eal_vdev_init(const char *name, const char *args)
 		 */
 		if (!strncmp(driver->driver.name, name,
 			    strlen(driver->driver.name)))
-			return driver->init(name, args);
+			return driver->probe(name, args);
 	}
 
 	RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
@@ -100,7 +100,7 @@ rte_eal_vdev_uninit(const char *name)
 		 */
 		if (!strncmp(driver->driver.name, name,
 			     strlen(driver->driver.name)))
-			return driver->uninit(name);
+			return driver->remove(name);
 	}
 
 	RTE_LOG(ERR, EAL, "no driver found for %s\n", name);
diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h
index 1e6b338..0dec8eb 100644
--- a/lib/librte_eal/common/include/rte_vdev.h
+++ b/lib/librte_eal/common/include/rte_vdev.h
@@ -44,23 +44,23 @@ extern "C" {
 TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);
 
 /**
- * Initialization function called for each virtual device driver once.
+ * Probe function called for each virtual device driver once.
  */
-typedef int (rte_vdev_init_t)(const char *name, const char *args);
+typedef int (rte_vdev_probe_t)(const char *name, const char *args);
 
 /**
- * Uninitilization function called for each virtual device driver once.
+ * Remove function called for each virtual device driver once.
  */
-typedef int (rte_vdev_uninit_t)(const char *name);
+typedef int (rte_vdev_remove_t)(const char *name);
 
 /**
  * A virtual device driver abstraction.
  */
 struct rte_vdev_driver {
 	TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */
-	struct rte_driver driver;          /**< Inherited general driver. */
-	rte_vdev_init_t *init;         /**< Virtual device init. function. */
-	rte_vdev_uninit_t *uninit;     /**< Virtual device uninit. function. */
+	struct rte_driver driver;      /**< Inherited general driver. */
+	rte_vdev_probe_t *probe;       /**< Virtual device probe function. */
+	rte_vdev_remove_t *remove;     /**< Virtual device remove function. */
 };
 
 /**
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH v7] net/virtio: add set_mtu in virtio
From: Dey, Souvik @ 2016-10-06 13:39 UTC (permalink / raw)
  To: Dey, Souvik, Kavanagh, Mark B, yuanhan.liu@linux.intel.com,
	stephen@networkplumber.org
  Cc: dev@dpdk.org
In-Reply-To: <CY1PR03MB150394E8F63E461EB744B74ADAC40@CY1PR03MB1503.namprd03.prod.outlook.com>

Hi Stephen/Liu,
       Any other comments or suggestions for this. If the below patch looks fine then please do suggest the next steps .

--
Regards,
Souvik

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Dey, Souvik
Sent: Wednesday, October 5, 2016 10:05 AM
To: Kavanagh, Mark B <mark.b.kavanagh@intel.com>; yuanhan.liu@linux.intel.com; stephen@networkplumber.org
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v7] net/virtio: add set_mtu in virtio

Yes Mark, I have modified the patch with the below comments.

drivers/net/virtio/virtio_ethdev.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 423c597..1dbfea6 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -653,12 +653,20 @@ virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)
                PMD_INIT_LOG(ERR, "Failed to disable allmulticast");  } 

+#define VLAN_TAG_LEN           4    /* 802.3ac tag (not DMA'd) */
+
+static int  virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) {
+	struct virtio_hw *hw = dev->data->dev_private;
+	uint32_t ether_hdr_len = ETHER_HDR_LEN + VLAN_TAG_LEN +
+		hw->vtnet_hdr_size;
+	uint32_t frame_size = mtu + ether_hdr_len;
+
+	if (mtu < ETHER_MIN_MTU || frame_size > VIRTIO_MAX_RX_PKTLEN) {
+		PMD_INIT_LOG(ERR, "MTU should be between %d and %d\n",
+			ETHER_MIN_MTU, (VIRTIO_MAX_RX_PKTLEN - ether_hdr_len));
+		return -EINVAL;
+	}
+	return 0;
+}

Let mem know if this looks good or we have few more comments. 

--
Regards,
Souvik

-----Original Message-----
From: Kavanagh, Mark B [mailto:mark.b.kavanagh@intel.com]
Sent: Wednesday, October 5, 2016 4:16 AM
To: Dey, Souvik <sodey@sonusnet.com>; yuanhan.liu@linux.intel.com; stephen@networkplumber.org
Cc: dev@dpdk.org
Subject: RE: [PATCH v7] net/virtio: add set_mtu in virtio

>Hi All,
>	Is there any further comments or modifications required for this 
>patch, or what next steps do you guys suggest here ?

Hi Souvik,

Some minor comments inline.

Thanks,
Mark

>
>--
>Regards,
>Souvik
>
>-----Original Message-----
>From: Dey, Souvik
>Sent: Saturday, October 1, 2016 10:09 AM
>To: mark.b.kavanagh@intel.com; yuanhan.liu@linux.intel.com; 
>stephen@networkplumber.org; dev@dpdk.org
>Subject: RE: [PATCH v7] net/virtio: add set_mtu in virtio
>
>Hi Liu/Stephen/Mark,
>
>	I have submitted Version 7 of this patch. Do let me know if this looks proper.
>
>--
>Regards,
>Souvik
>
>-----Original Message-----
>From: Dey, Souvik
>Sent: Thursday, September 29, 2016 4:32 PM
>To: mark.b.kavanagh@intel.com; yuanhan.liu@linux.intel.com; 
>stephen@networkplumber.org; dev@dpdk.org
>Cc: Dey, Souvik <sodey@sonusnet.com>
>Subject: [PATCH v7] net/virtio: add set_mtu in virtio
>
>
>Virtio interfaces do not currently allow the user to specify a 
>particular Maximum Transmission Unit (MTU).Consequently, the MTU of 
>Virtio interfaces is typically set to the Ethernet default value of 1500.
>This is problematic in the case of cloud deployments, in which a 
>specific (and potentially non-standard) MTU needs to be set by a DHCP 
>server, which needs to be honored by all interfaces across the traffic 
>path.To achieve this Virtio interfaces should support setting of MTU.
>In case when GRE/VXLAN tunneling is used for internal communication, 
>there will be an overhead added by the infrastructure in the packet 
>over and above the ETHER MTU of 1518. So to take care of this overhead 
>in these cases the DHCP server corrects the L3 MTU to 1454. But since 
>virtio interfaces was not having the MTU set functionality that MTU 
>sent by the DHCP server was ignored and the instance will still send 
>packets with 1500 MTU which after encapsulation will become more than
>1518 and eventually gets dropped in the infrastructure.
>By adding an additional 'set_mtu' function to the Virtio driver, we can 
>honor the MTU sent by the DHCP server. The dhcp server/controller can 
>then leverage this 'set_mtu' functionality to resolve the above 
>mentioned issue of packets getting dropped due to incorrect size.
>
>
>Signed-off-by: Souvik Dey <sodey@sonusnet.com>
>
>---
>Changes in v7:
>- Replaced the CRC_LEN with the merge rx buf header length.
>- Changed the frame_len max validation to VIRTIO_MAX_RX_PKTLEN.
>Changes in v6:
>- Description of change corrected
>- Corrected the identations
>- Corrected the subject line too
>- The From line was also not correct
>- Re-submitting as the below patch was not proper Changes in v5:
>- Fix log message for out-of-bounds MTU parameter in virtio_mtu_set
>- Calculate frame size, based on 'mtu' parameter
>- Corrected the upper bound and lower bound checks in virtio_mtu_set 
>Changes in v4: Incorporated review comments.
>Changes in v3: Corrected few style errors as reported by sys-stv.
>Changes in v2: Incorporated review comments.
>
> drivers/net/virtio/virtio_ethdev.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
>diff --git a/drivers/net/virtio/virtio_ethdev.c
>b/drivers/net/virtio/virtio_ethdev.c
>index 423c597..1dbfea6 100644
>--- a/drivers/net/virtio/virtio_ethdev.c
>+++ b/drivers/net/virtio/virtio_ethdev.c
>@@ -653,12 +653,20 @@ virtio_dev_allmulticast_disable(struct rte_eth_dev *dev)
>                PMD_INIT_LOG(ERR, "Failed to disable allmulticast");  }
>
>+#define VLAN_TAG_LEN           4    /* 802.3ac tag (not DMA'd) */

There should be a blank line between the #define and the function prototype beneath.

>+static int  virtio_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) {
>+	struct virtio_hw *hw = dev->data->dev_private;
>+	uint32_t ether_hdr_len = ETHER_HDR_LEN + VLAN_TAG_LEN +
>+		hw->vtnet_hdr_size;

I'll rely on Stephen and Yuanhan's judgment for this.

>+	uint32_t frame_size = mtu + ether_hdr_len;
>+
>+	if (mtu < ETHER_MIN_MTU || frame_size > VIRTIO_MAX_RX_PKTLEN) {
>+		PMD_INIT_LOG(ERR, "MTU should be between %d and %d\n",
>+			ETHER_MIN_MTU, VIRTIO_MAX_RX_PKTLEN);

Shouldn't last format print parameter should be (VIRTIO_MAX_RX_PKTLEN - ether_hdr_len)?
i.e PMD_INIT_LOG(ERR, "MTU should........%d\n",
          ETHER_MIN_MTU, (VIRTIO_MAX_RX_PKTLEN - ether_hdr_len));

>+		return -EINVAL;
>+	}
>+	return 0;
>+}
>
> /*
>  * dev_ops for virtio, bare necessities for basic operation
>  */
>@@ -677,7 +685,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
> 	.allmulticast_enable     = virtio_dev_allmulticast_enable,
> 	.allmulticast_disable    = virtio_dev_allmulticast_disable,
>+	.mtu_set                 = virtio_mtu_set,
> 	.dev_infos_get           = virtio_dev_info_get,
> 	.stats_get               = virtio_dev_stats_get,
> 	.xstats_get              = virtio_dev_xstats_get,
>--
>2.9.3.windows.1

^ permalink raw reply related

* Re: [PATCH v6 3/4] app/test: added tests for libcrypto PMD
From: Trahe, Fiona @ 2016-10-06 13:30 UTC (permalink / raw)
  To: Mrozowicz, SlawomirX, dev@dpdk.org
  Cc: Mrozowicz, SlawomirX, Azarewicz, PiotrX T, Kerlin, MarcinX,
	Mrzyglod, DanielX T, Trahe, Fiona
In-Reply-To: <1475593882-32364-4-git-send-email-slawomirx.mrozowicz@intel.com>

Hi Slawomir,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Slawomir Mrozowicz
> Sent: Tuesday, October 4, 2016 4:11 PM
> To: dev@dpdk.org
> Cc: Mrozowicz, SlawomirX <slawomirx.mrozowicz@intel.com>; Azarewicz,
> PiotrX T <piotrx.t.azarewicz@intel.com>; Kerlin, MarcinX
> <marcinx.kerlin@intel.com>; Mrzyglod, DanielX T
> <danielx.t.mrzyglod@intel.com>
> Subject: [dpdk-dev] [PATCH v6 3/4] app/test: added tests for libcrypto PMD
> 
> This patch contains unit tests for libcrypto PMD. User can
> use app/test application to check how to use this pmd and to
> verify crypto processing.
> 
> Test name is cryptodev_libcrypto_autotest.
> For performance test cryptodev_libcrypto_perftest can be used.
> 
> Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
> Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
> v2:
> - rename AES-named functions to blockcipher
> - replace different test cases with blockcipher functions pattern
> - add 3DES tests into QuickAssist PMD testsuite
> 
> v3:
> - add nagative verification tests
> - add big data test
> 
> v4:
> - move aes test rework to another patch
> - move big data test to another patch
> - checking if libcrypto pmd is available
> 
> v5:
> - add reduced big data test
> 
> v6:
> - fix checkpatch warnings

This patch breaks autotests for all PMDs, due to increasing the MBUF size to UNIT16_MAX.
USER1: Can't create CRYPTO_MBUFPOOL

It needs more than 500MBs in the MBUFPOOL to run this test.
Setting this back to MBUF_SIZE fixes the issue, but breaks 2 tests in libcrypto_autotest

TestCase create_gmac_operation() line 5060 failed: no room to append aad                         
 + TestCase [27] : test_AES_GMAC_authentication_test_case_4 failed                               
TestCase create_gmac_operation() line 5060 failed: no room to append aad                         
 + TestCase [28] : test_AES_GMAC_authentication_verify_test_case_4 failed    

Can you investigate if it's possible to run these 2 tests using a different smaller MBUFPOOL -  maybe with only a few large mbufs?

^ permalink raw reply

* Re: [PATCH] eal: fix compilation when optimization level is O1
From: Thomas Monjalon @ 2016-10-06 13:25 UTC (permalink / raw)
  To: Olivier Matz; +Cc: dev, sergio.gonzalez.monroy
In-Reply-To: <1474288011-17096-1-git-send-email-olivier.matz@6wind.com>

2016-09-19 14:26, Olivier Matz:
> When compiled with EXTRA_CFLAGS="-O1", the compiler is not
> able to detect that size is always initialized when used, and
> issues a wrong warning:
> 
>   eal_memory.c: In function ‘rte_eal_hugepage_attach’:
>   eal_memory.c:1684:3: error: ‘size’ may be used uninitialized in this
>                        function [-Werror=maybe-uninitialized]
>      munmap(hp, size);
>      ^
> 
> Workaround this issue by initializing size to 0.
> Seen on gcc (Debian 5.4.1-1) 5.4.1 20160803.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Applied, thanks

^ permalink raw reply

* Re: [PATCH v1 0/4] Generalize PCI specific EAL function/structures
From: Thomas Monjalon @ 2016-10-06 13:01 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: David Marchand, dev, Jan Viktorin
In-Reply-To: <1c349216-6ca6-5f40-d646-2ba59412d184@nxp.com>

2016-10-06 17:13, Shreyansh Jain:
> Hi Thomas,
> 
> On Monday 03 October 2016 07:06 PM, Thomas Monjalon wrote:
> > 2016-10-03 11:07, Shreyansh Jain:
> >> Hi David,
> >>
> >> On Friday 30 September 2016 09:01 PM, David Marchand wrote:
> >>> Those patches move linux specifics (binding pci devices using sysfs)
> >>> to common infrastucture.
> >>> We have no proper hotplug support on bsd, but if we had some common
> >>> code we should at least try to make the apis generic.
> >>>
> >>
> >> I am not sure if I understood your point well. Just to confirm - you are
> >> stating that the movement done in the patches might not suit BSD.
> >> Probably you are talking about (Patch 3/4 and 4/4).
> >> Is my understanding correct?
> >>
> >> So, movement to just Linux area is not enough?
> >> I am not well versed with BSD way of doing something similar so if
> >> someone can point it out, I can integrate that. (I will investigate it
> >> at my end as well).
> >>
> >> This patchset makes the PCI->EAL movement *only* for Linux for sysfs
> >> bind/unbind. (I should add this to cover letter, at the least).
> >
> > The concern is about function declarations in
> > 	lib/librte_eal/common/eal_private.h
> > We cannot be sure it can be applicable to something else than Linux.
> > As it is implemented in Linux only, it should not be in a common header.
> >
> 
> Ok. But, digging a little I found at least one more similar case.
> 'rte_eal_check_module()' which is present in the linuxapp/eal.c and has 
> existence in common, but no parallel implementation for BSD exists. This 
> function is accessing /sys/modules - which might be Linux specific.

Yes the BSD implementation is missing.
But the common function prototype makes sense as it can be called by an
application and could be implemented for BSD.

^ permalink raw reply

* Re: [PATCH v5 01/13] librte_ether: modify internal callback function
From: Thomas Monjalon @ 2016-10-06 12:56 UTC (permalink / raw)
  To: Bernard Iremonger; +Cc: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob
In-Reply-To: <1475753191-17391-2-git-send-email-bernard.iremonger@intel.com>

2016-10-06 12:26, Bernard Iremonger:
>  void
>  _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
> -	enum rte_eth_event_type event)
> +	enum rte_eth_event_type event, void *param)

You need to squash the patches updating the calls to this function.
Otherwise, this patch does not compile.

[...]
> +		if (param != NULL)
> +			dev_cb.cb_arg = (void *) param;

You are overriding the user parameter.
As it is only for a new event, it can be described in the register API
that the user param won't be returned for this event.
But a better design would be to add a new parameter to the callback.
However it will be an API breakage.

> +	RTE_ETH_EVENT_VF_MBOX,  /**< PF mailbox processing callback */

Sorry I do not parse well this line.
The event name is VF_MBOX and the comment is about the callback
processing this event on PF side?
I would suggest this kind of comment: "message from VF received by PF"

[...]
>   *  Pointer to struct rte_eth_dev.
>   * @param event
>   *  Eth device interrupt event type.
> + * @param param
> + *  Parameter to pass back to user application.
> + *  Allows the user application to decide if a particular function
> + *  is permitted.

In a more generic case, the parameter gives some details about the event.

^ permalink raw reply

* Re: [PATCH v1 0/4] Generalize PCI specific EAL function/structures
From: Shreyansh Jain @ 2016-10-06 11:43 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: David Marchand, dev, Jan Viktorin
In-Reply-To: <295101088.MT2WGLcZeq@xps13>

Hi Thomas,

On Monday 03 October 2016 07:06 PM, Thomas Monjalon wrote:
> 2016-10-03 11:07, Shreyansh Jain:
>> Hi David,
>>
>> On Friday 30 September 2016 09:01 PM, David Marchand wrote:
>>> On Tue, Sep 27, 2016 at 4:12 PM, Shreyansh Jain <shreyansh.jain@nxp.com> wrote:
>>>> (I rebased these over HEAD 7b3c4f3)
>>>>
>>>> These patches were initially part of Jan's original series on SoC
>>>> Framework ([1],[2]). An update to that series, without these patches,
>>>> was posted here [3].
>>>>
>>>> Main motivation for these is aim of introducing a non-PCI centric
>>>> subsystem in EAL. As of now the first usecase is SoC, but not limited to
>>>> it.
>>>>
>>>> 4 patches in this series are independent of each other, as well as SoC
>>>> framework. All these focus on generalizing some structure or functions
>>>> present with the PCI specific code to EAL Common area (or splitting a
>>>> function to be more userful).
>>>
>>> Those patches move linux specifics (binding pci devices using sysfs)
>>> to common infrastucture.
>>> We have no proper hotplug support on bsd, but if we had some common
>>> code we should at least try to make the apis generic.
>>>
>>
>> I am not sure if I understood your point well. Just to confirm - you are
>> stating that the movement done in the patches might not suit BSD.
>> Probably you are talking about (Patch 3/4 and 4/4).
>> Is my understanding correct?
>>
>> So, movement to just Linux area is not enough?
>> I am not well versed with BSD way of doing something similar so if
>> someone can point it out, I can integrate that. (I will investigate it
>> at my end as well).
>>
>> This patchset makes the PCI->EAL movement *only* for Linux for sysfs
>> bind/unbind. (I should add this to cover letter, at the least).
>
> The concern is about function declarations in
> 	lib/librte_eal/common/eal_private.h
> We cannot be sure it can be applicable to something else than Linux.
> As it is implemented in Linux only, it should not be in a common header.
>

Ok. But, digging a little I found at least one more similar case.
'rte_eal_check_module()' which is present in the linuxapp/eal.c and has 
existence in common, but no parallel implementation for BSD exists. This 
function is accessing /sys/modules - which might be Linux specific.

It seems to be a pretty old entry though (dating back to 2014).

-
Shreyansh

^ permalink raw reply

* [PATCH v5 13/13] net/enic: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/enic/enic_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 15a05b4..fb72491 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -436,7 +436,7 @@ enic_intr_handler(__rte_unused struct rte_intr_handle *handle,
 	vnic_intr_return_all_credits(&enic->intr);
 
 	enic_link_update(enic);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
 }
 
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 12/13] net/virtio: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index b4dfc0a..2f0065a 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -1103,7 +1103,7 @@ virtio_interrupt_handler(__rte_unused struct rte_intr_handle *handle,
 	if (isr & VIRTIO_PCI_ISR_CONFIG) {
 		if (virtio_dev_link_update(dev, 0) == 0)
 			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC);
+						      RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 }
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 11/13] net/vhost: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/vhost/rte_eth_vhost.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index 409e090..421cdba 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -559,7 +559,7 @@ new_device(int vid)
 
 	RTE_LOG(INFO, PMD, "New connection established\n");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC);
+	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	return 0;
 }
@@ -626,7 +626,7 @@ destroy_device(int vid)
 
 	RTE_LOG(INFO, PMD, "Connection closed\n");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC);
+	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
@@ -655,7 +655,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	RTE_LOG(INFO, PMD, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE);
+	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
 
 	return 0;
 }
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 10/13] net/thunderx: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/thunderx/nicvf_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index b758c9f..c61e171 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -108,7 +108,7 @@ nicvf_interrupt(void *arg)
 			nicvf_set_eth_link_status(nic,
 					&nic->eth_dev->data->dev_link);
 		_rte_eth_dev_callback_process(nic->eth_dev,
-				RTE_ETH_EVENT_INTR_LSC);
+				RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	rte_eal_alarm_set(NICVF_INTR_POLL_INTERVAL_MS * 1000,
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 09/13] net/nfp: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/nfp/nfp_net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index d526f34..a2b9056 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -1219,7 +1219,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
 	nfp_net_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	nfp_net_dev_link_status_print(dev);
 
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 08/13] net/mlx5: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/mlx5/mlx5_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index bf4232a..c76e754 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1069,7 +1069,7 @@ mlx5_dev_link_status_handler(void *arg)
 	ret = priv_dev_link_status_handler(priv, dev);
 	priv_unlock(priv);
 	if (ret)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 /**
@@ -1092,7 +1092,7 @@ mlx5_dev_interrupt_handler(struct rte_intr_handle *intr_handle, void *cb_arg)
 	ret = priv_dev_link_status_handler(priv, dev);
 	priv_unlock(priv);
 	if (ret)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 /**
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 07/13] net/mlx4: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/mlx4/mlx4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 1553b2e..3e57cca 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5448,7 +5448,7 @@ mlx4_dev_link_status_handler(void *arg)
 	ret = priv_dev_link_status_handler(priv, dev);
 	priv_unlock(priv);
 	if (ret)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 /**
@@ -5471,7 +5471,7 @@ mlx4_dev_interrupt_handler(struct rte_intr_handle *intr_handle, void *cb_arg)
 	ret = priv_dev_link_status_handler(priv, dev);
 	priv_unlock(priv);
 	if (ret)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 /**
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 06/13] net/i40e: update call to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 4 ++--
 drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 697800e..d947760 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -5510,7 +5510,7 @@ i40e_dev_interrupt_delayed_handler(void *param)
 
 	/* handle the link up interrupt in an alarm callback */
 	i40e_dev_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	i40e_pf_enable_irq0(hw);
 	rte_intr_enable(&(dev->pci_dev->intr_handle));
@@ -5594,7 +5594,7 @@ i40e_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle,
 			return;
 		else
 			_rte_eth_dev_callback_process(dev,
-				RTE_ETH_EVENT_INTR_LSC);
+				RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 done:
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 34eb274..bd89cd9 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1341,7 +1341,7 @@ i40evf_handle_pf_event(__rte_unused struct rte_eth_dev *dev,
 	switch (pf_msg->event) {
 	case I40E_VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event\n");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL);
 		break;
 	case I40E_VIRTCHNL_EVENT_LINK_CHANGE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event\n");
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 05/13] net/e1000: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/e1000/em_ethdev.c  | 2 +-
 drivers/net/e1000/igb_ethdev.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index f767e1c..e13e858 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -1599,7 +1599,7 @@ eth_em_interrupt_handler(__rte_unused struct rte_intr_handle *handle,
 
 	eth_em_interrupt_get_status(dev);
 	eth_em_interrupt_action(dev);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 5a1a83e..d9ab2df 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -2683,7 +2683,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev)
 		E1000_WRITE_REG(hw, E1000_TCTL, tctl);
 		E1000_WRITE_REG(hw, E1000_RCTL, rctl);
 		E1000_WRITE_FLUSH(hw);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	return 0;
@@ -2743,7 +2743,7 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
 
 	/* PF reset VF event */
 	if (in_msg == E1000_PF_CONTROL_MSG)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL);
 }
 
 static int
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 04/13] net/bonding: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 292086a..0913020 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1958,7 +1958,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 		return;
 
 	_rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
-			RTE_ETH_EVENT_INTR_LSC);
+			RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 void
@@ -2079,7 +2079,7 @@ bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
 						(void *)bonded_eth_dev);
 			else
 				_rte_eth_dev_callback_process(bonded_eth_dev,
-						RTE_ETH_EVENT_INTR_LSC);
+						RTE_ETH_EVENT_INTR_LSC, NULL);
 
 		} else {
 			if (internals->link_down_delay_ms > 0)
@@ -2088,7 +2088,7 @@ bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
 						(void *)bonded_eth_dev);
 			else
 				_rte_eth_dev_callback_process(bonded_eth_dev,
-						RTE_ETH_EVENT_INTR_LSC);
+						RTE_ETH_EVENT_INTR_LSC, NULL);
 		}
 	}
 }
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 03/13] app/test: add parameter to callback process function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to call of _rte_eth_dev_callback_process function

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 app/test/virtual_pmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 4831113..65b44c6 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -485,7 +485,7 @@ virtual_ethdev_simulate_link_status_interrupt(uint8_t port_id,
 
 	vrtl_eth_dev->data->dev_link.link_status = link_status;
 
-	_rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC);
+	_rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 int
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 02/13] net/ixgbe: add callback to user app on VF to PF mbox msg
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

call _rte_eth_dev_callback_process from ixgbe_rcv_msg_from_vf function.

The callback asks the user application if it is allowed to perform
the function.
If the cb_param.retval is RTE_PMD_IXGBE_MB_EVENT_PROCEED then continue,
if 0, do nothing and send ACK to VF
if > 1, do nothing and send NAK to VF.

Signed-off-by: Alex Zelezniak <az5157@att.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c  |  4 ++--
 drivers/net/ixgbe/ixgbe_pf.c      | 42 +++++++++++++++++++++++++++++++++------
 drivers/net/ixgbe/rte_pmd_ixgbe.h | 17 ++++++++++++++++
 3 files changed, 55 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 55a82d3..91db2c3 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -3559,7 +3559,7 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
 		ixgbe_dev_link_update(dev, 0);
 		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
 		ixgbe_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	PMD_DRV_LOG(DEBUG, "enable intr in delayed handler S[%08x]", eicr);
@@ -7525,7 +7525,7 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
 
 	/* PF reset VF event */
 	if (in_msg == IXGBE_PF_CONTROL_MSG)
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET);
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL);
 }
 
 static int
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 56393ff..2a177b8 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -51,6 +51,7 @@
 
 #include "base/ixgbe_common.h"
 #include "ixgbe_ethdev.h"
+#include "rte_pmd_ixgbe.h"
 
 #define IXGBE_MAX_VFTA     (128)
 #define IXGBE_VF_MSG_SIZE_DEFAULT 1
@@ -660,6 +661,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	struct ixgbe_vf_info *vfinfo =
 		*IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);
+	struct rte_pmd_ixgbe_mb_event_param cb_param;
 
 	retval = ixgbe_read_mbx(hw, msgbuf, mbx_size, vf);
 	if (retval) {
@@ -674,27 +676,54 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 	/* flush the ack before we write any messages back */
 	IXGBE_WRITE_FLUSH(hw);
 
+	/**
+	 * initialise structure to send to user application
+	 * will return response from user in retval field
+	 */
+	cb_param.retval = RTE_PMD_IXGBE_MB_EVENT_PROCEED;
+	cb_param.vfid = vf;
+	cb_param.msg_type = msgbuf[0] & 0xFFFF;
+	cb_param.userdata = (void *)msgbuf;
+
 	/* perform VF reset */
 	if (msgbuf[0] == IXGBE_VF_RESET) {
 		int ret = ixgbe_vf_reset(dev, vf, msgbuf);
 
 		vfinfo[vf].clear_to_send = true;
+
+		/* notify application about VF reset */
+		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &cb_param);
 		return ret;
 	}
 
+	/**
+	 * ask user application if we allowed to perform those functions
+	 * if we get cb_param.retval == RTE_PMD_IXGBE_MB_EVENT_PROCEED
+	 * then business as usual,
+	 * if 0, do nothing and send ACK to VF
+	 * if cb_param.retval > 1, do nothing and send NAK to VF
+	 */
+	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &cb_param);
+
+	retval = cb_param.retval;
+
 	/* check & process VF to PF mailbox message */
 	switch ((msgbuf[0] & 0xFFFF)) {
 	case IXGBE_VF_SET_MAC_ADDR:
-		retval = ixgbe_vf_set_mac_addr(dev, vf, msgbuf);
+		if (retval == RTE_PMD_IXGBE_MB_EVENT_PROCEED)
+			retval = ixgbe_vf_set_mac_addr(dev, vf, msgbuf);
 		break;
 	case IXGBE_VF_SET_MULTICAST:
-		retval = ixgbe_vf_set_multicast(dev, vf, msgbuf);
+		if (retval == RTE_PMD_IXGBE_MB_EVENT_PROCEED)
+			retval = ixgbe_vf_set_multicast(dev, vf, msgbuf);
 		break;
 	case IXGBE_VF_SET_LPE:
-		retval = ixgbe_set_vf_lpe(dev, vf, msgbuf);
+		if (retval == RTE_PMD_IXGBE_MB_EVENT_PROCEED)
+			retval = ixgbe_set_vf_lpe(dev, vf, msgbuf);
 		break;
 	case IXGBE_VF_SET_VLAN:
-		retval = ixgbe_vf_set_vlan(dev, vf, msgbuf);
+		if (retval == RTE_PMD_IXGBE_MB_EVENT_PROCEED)
+			retval = ixgbe_vf_set_vlan(dev, vf, msgbuf);
 		break;
 	case IXGBE_VF_API_NEGOTIATE:
 		retval = ixgbe_negotiate_vf_api(dev, vf, msgbuf);
@@ -704,7 +733,8 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 		msg_size = IXGBE_VF_GET_QUEUE_MSG_SIZE;
 		break;
 	case IXGBE_VF_UPDATE_XCAST_MODE:
-		retval = ixgbe_set_vf_mc_promisc(dev, vf, msgbuf);
+		if (retval == RTE_PMD_IXGBE_MB_EVENT_PROCEED)
+			retval = ixgbe_set_vf_mc_promisc(dev, vf, msgbuf);
 		break;
 	default:
 		PMD_DRV_LOG(DEBUG, "Unhandled Msg %8.8x", (unsigned)msgbuf[0]);
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 33b5b2d..2f6cf46 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -181,4 +181,21 @@ int rte_pmd_ixgbe_set_vf_split_drop_en(uint8_t port, uint16_t vf, uint8_t on);
  */
 int
 rte_pmd_ixgbe_set_vf_vlan_stripq(uint8_t port, uint16_t vf, uint8_t on);
+
+/**
+ * Response sent back to ixgbe driver from user app after callback
+ */
+enum rte_pmd_ixgbe_mb_event_rsp {
+	RTE_PMD_IXGBE_MB_EVENT_NOOP_ACK,  /**< skip mbox request and ACK */
+	RTE_PMD_IXGBE_MB_EVENT_NOOP_NACK, /**< skip mbox request and NACK */
+	RTE_PMD_IXGBE_MB_EVENT_PROCEED,  /**< proceed with mbox request  */
+	RTE_PMD_IXGBE_MB_EVENT_MAX       /**< max value of this enum */
+};
+
+struct rte_pmd_ixgbe_mb_event_param {
+	uint16_t vfid;
+	uint16_t msg_type;
+	uint16_t retval;
+	void *userdata;
+};
 #endif /* _PMD_IXGBE_H_ */
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 01/13] librte_ether: modify internal callback function
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

add parameter to the _rte_eth_dev_callback_process function.

Adding a parameter to this function allows passing information
to the application when an eth device event occurs such as
a VF to PF message.
This allows the application to decide if a particular function
is permitted.

Signed-off-by: Alex Zelezniak <az5157@att.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 5 ++++-
 lib/librte_ether/rte_ethdev.h | 7 ++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index c517e88..416ca77 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2508,7 +2508,7 @@ rte_eth_dev_callback_unregister(uint8_t port_id,
 
 void
 _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
-	enum rte_eth_event_type event)
+	enum rte_eth_event_type event, void *param)
 {
 	struct rte_eth_dev_callback *cb_lst;
 	struct rte_eth_dev_callback dev_cb;
@@ -2519,6 +2519,9 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 			continue;
 		dev_cb = *cb_lst;
 		cb_lst->active = 1;
+		if (param != NULL)
+			dev_cb.cb_arg = (void *) param;
+
 		rte_spinlock_unlock(&rte_eth_dev_cb_lock);
 		dev_cb.cb_fn(dev->data->port_id, dev_cb.event,
 						dev_cb.cb_arg);
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 7218b6f..9fb34ca 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -3026,6 +3026,7 @@ enum rte_eth_event_type {
 				/**< queue state event (enabled/disabled) */
 	RTE_ETH_EVENT_INTR_RESET,
 			/**< reset interrupt event, sent to VF on PF reset */
+	RTE_ETH_EVENT_VF_MBOX,  /**< PF mailbox processing callback */
 	RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };
 
@@ -3085,12 +3086,16 @@ int rte_eth_dev_callback_unregister(uint8_t port_id,
  *  Pointer to struct rte_eth_dev.
  * @param event
  *  Eth device interrupt event type.
+ * @param param
+ *  Parameter to pass back to user application.
+ *  Allows the user application to decide if a particular function
+ *  is permitted.
  *
  * @return
  *  void
  */
 void _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
-				enum rte_eth_event_type event);
+				enum rte_eth_event_type event, void *param);
 
 /**
  * When there is no rx packet coming in Rx Queue for a long time, we can
-- 
2.9.0

^ permalink raw reply related

* [PATCH v5 00/13]  modify callback for VF management
From: Bernard Iremonger @ 2016-10-06 11:26 UTC (permalink / raw)
  To: dev, rahul.r.shah, wenzhuo.lu, az5157, jerin.jacob; +Cc: Bernard Iremonger
In-Reply-To: <1475592734-22355-1-git-send-email-bernard.iremonger@intel.com>

This patchset modifies the callback function for VF management.

A third parameter has been added to the _rte_eth_dev_callback_process
function. All references to this function have been updated.
Changes have been made to the ixgbe_rcv_msg_from_vf function to
use the new callback parameter.

This patchset depends on the following patch.
http://dpdk.org/dev/patchwork/patch/16296/
[dpdk-dev,v6,1/2] net/ixgbe: add API's for VF management

These patches were part of the RFC PATCH v2 of the above patchset,
but were dropped from the v3 patchset.

Changes in v5:
Rebased to latest master.
Added parameter to the _rte_eth_dev_callback_process function
Removed two new callback functions which were added previously.
Updated all calls to the _rte_eth_dev_callback_process function.

Changes in v4:
Rebased to latest master.
Moved the callback parameter structure from the ethdev to the ixgbe PMD.

Changes in v3:
Rebased to latest master.
Submitted as a seperate patchset.
Moved the response enums from the ethdev to the ixgbe PMD.

Changes in v2:
Rebased to latest master.


















 

Bernard Iremonger (13):
  librte_ether: modify internal callback function
  net/ixgbe: add callback to user app on VF to PF mbox msg
  app/test: add parameter to callback process function
  net/bonding: add parameter to callback process function
  net/e1000: add parameter to callback process function
  net/i40e: update call to callback process function
  net/mlx4: add parameter to callback process function
  net/mlx5: add parameter to callback process function
  net/nfp: add parameter to callback process function
  net/thunderx: add parameter to callback process function
  net/vhost: add parameter to callback process function
  net/virtio: add parameter to callback process function
  net/enic: add parameter to callback process function

 app/test/virtual_pmd.c                 |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c |  6 ++---
 drivers/net/e1000/em_ethdev.c          |  2 +-
 drivers/net/e1000/igb_ethdev.c         |  4 ++--
 drivers/net/enic/enic_main.c           |  2 +-
 drivers/net/i40e/i40e_ethdev.c         |  4 ++--
 drivers/net/i40e/i40e_ethdev_vf.c      |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c       |  4 ++--
 drivers/net/ixgbe/ixgbe_pf.c           | 42 +++++++++++++++++++++++++++++-----
 drivers/net/ixgbe/rte_pmd_ixgbe.h      | 17 ++++++++++++++
 drivers/net/mlx4/mlx4.c                |  4 ++--
 drivers/net/mlx5/mlx5_ethdev.c         |  4 ++--
 drivers/net/nfp/nfp_net.c              |  2 +-
 drivers/net/thunderx/nicvf_ethdev.c    |  2 +-
 drivers/net/vhost/rte_eth_vhost.c      |  6 ++---
 drivers/net/virtio/virtio_ethdev.c     |  2 +-
 lib/librte_ether/rte_ethdev.c          |  5 +++-
 lib/librte_ether/rte_ethdev.h          |  7 +++++-
 18 files changed, 86 insertions(+), 31 deletions(-)

-- 
2.9.0

^ permalink raw reply

* [PATCH 1/1] doc: fix errors in pdump doc
From: Mark Kavanagh @ 2016-10-06 10:36 UTC (permalink / raw)
  To: dev

- Fix copy/paste error in description of how to capture both rx
  & tx traffic in a single pcap file
- Replace duplicate word with what original author presumably
  intended, such that description now makes sense

Signed-off-by: Mark Kavanagh <mark.b.kavanagh@intel.com>
---
 doc/guides/sample_app_ug/pdump.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/sample_app_ug/pdump.rst b/doc/guides/sample_app_ug/pdump.rst
index ac0e7c9..320c914 100644
--- a/doc/guides/sample_app_ug/pdump.rst
+++ b/doc/guides/sample_app_ug/pdump.rst
@@ -119,8 +119,8 @@ Can be either a pcap file name or any Linux iface.
       * To receive ingress and egress packets separately ``rx-dev`` and ``tx-dev``
         should both be passed with the different file names or the Linux iface names.
 
-      * To receive ingress and egress packets separately ``rx-dev`` and ``tx-dev``
-        should both be passed with the same file names or the the Linux iface names.
+      * To receive ingress and egress packets together, ``rx-dev`` and ``tx-dev``
+        should both be passed with the same file name or the same Linux iface name.
 
 ``ring-size``:
 Size of the ring. This value is used internally for ring creation. The ring will be used to enqueue the packets from
-- 
1.9.3

^ permalink raw reply related

* [PATCH 2/2] app/testpmd: use consistent vdev names
From: Thomas Monjalon @ 2016-10-06 10:34 UTC (permalink / raw)
  To: pablo.de.lara.guarch; +Cc: dev
In-Reply-To: <1475750063-16199-1-git-send-email-thomas.monjalon@6wind.com>

The vdev eth_bond has been renamed to net_bond.
testpmd is creating a bonding device with the old prefix.
It is changed for consistency.

The script test-null.sh was failing because using the old name
for the null vdev.

Fixes also the bonding and testpmd doc.

Fixes: 2f45703c17ac ("drivers: make driver names consistent")

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 app/test-pmd/cmdline.c                                   |  2 +-
 doc/guides/contributing/documentation.rst                |  4 ++--
 doc/guides/howto/lm_bond_virtio_sriov.rst                |  2 +-
 doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst | 14 +++++++-------
 doc/guides/testpmd_app_ug/run_app.rst                    |  2 +-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst              | 14 +++++++-------
 scripts/test-null.sh                                     |  2 +-
 7 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 17d238f..b3772ce 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -4391,7 +4391,7 @@ static void cmd_create_bonded_device_parsed(void *parsed_result,
 		return;
 	}
 
-	snprintf(ethdev_name, RTE_ETH_NAME_MAX_LEN, "eth_bond_testpmd_%d",
+	snprintf(ethdev_name, RTE_ETH_NAME_MAX_LEN, "net_bond_testpmd_%d",
 			bond_dev_num++);
 
 	/* Create a new bonded device. */
diff --git a/doc/guides/contributing/documentation.rst b/doc/guides/contributing/documentation.rst
index 6d4c277..2cfb1a2 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -458,8 +458,8 @@ Code and Literal block sections
   For long literal lines that exceed that limit try to wrap the text at sensible locations.
   For example a long command line could be documented like this and still work if copied directly from the docs::
 
-     build/app/testpmd -c7 -n3 --vdev=eth_pcap0,iface=eth0     \
-                               --vdev=eth_pcap1,iface=eth1     \
+     build/app/testpmd -c7 -n3 --vdev=net_pcap0,iface=eth0     \
+                               --vdev=net_pcap1,iface=eth1     \
                                -- -i --nb-cores=2 --nb-ports=2 \
                                   --total-num-mbufs=2048
 
diff --git a/doc/guides/howto/lm_bond_virtio_sriov.rst b/doc/guides/howto/lm_bond_virtio_sriov.rst
index 9bc3450..fe9803e 100644
--- a/doc/guides/howto/lm_bond_virtio_sriov.rst
+++ b/doc/guides/howto/lm_bond_virtio_sriov.rst
@@ -142,7 +142,7 @@ Bonding is port 2 (P2).
 .. code-block:: console
 
    testpmd> create bonded device 1 0
-   Created new bonded device eth_bond_testpmd_0 on (port 2).
+   Created new bonded device net_bond_testpmd_0 on (port 2).
    testpmd> add bonding slave 0 2
    testpmd> add bonding slave 1 2
    testpmd> show bonding config 2
diff --git a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
index 01ddcb9..65813c9 100644
--- a/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
+++ b/doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst
@@ -356,7 +356,7 @@ Using Link Bonding Devices from the EAL Command Line
 
 Link bonding devices can be created at application startup time using the
 ``--vdev`` EAL command line option. The device name must start with the
-eth_bond prefix followed by numbers or letters. The name must be unique for
+net_bond prefix followed by numbers or letters. The name must be unique for
 each device. Each device can have multiple options arranged in a comma
 separated list. Multiple devices definitions can be arranged by calling the
 ``--vdev`` option multiple times.
@@ -365,7 +365,7 @@ Device names and bonding options must be separated by commas as shown below:
 
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -c f -n 4 --vdev 'eth_bond0,bond_opt0=..,bond opt1=..'--vdev 'eth_bond1,bond _opt0=..,bond_opt1=..'
+    $RTE_TARGET/app/testpmd -c f -n 4 --vdev 'net_bond0,bond_opt0=..,bond opt1=..'--vdev 'net_bond1,bond _opt0=..,bond_opt1=..'
 
 Link Bonding EAL Options
 ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -373,7 +373,7 @@ Link Bonding EAL Options
 There are multiple ways of definitions that can be assessed and combined as
 long as the following two rules are respected:
 
-*   A unique device name, in the format of eth_bondX is provided,
+*   A unique device name, in the format of net_bondX is provided,
     where X can be any combination of numbers and/or letters,
     and the name is no greater than 32 characters long.
 
@@ -465,22 +465,22 @@ Create a bonded device in round robin mode with two slaves specified by their PC
 
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'eth_bond0,mode=0, slave=0000:00a:00.01,slave=0000:004:00.00' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'net_bond0,mode=0, slave=0000:00a:00.01,slave=0000:004:00.00' -- --port-topology=chained
 
 Create a bonded device in round robin mode with two slaves specified by their PCI address and an overriding MAC address:
 
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'eth_bond0,mode=0, slave=0000:00a:00.01,slave=0000:004:00.00,mac=00:1e:67:1d:fd:1d' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'net_bond0,mode=0, slave=0000:00a:00.01,slave=0000:004:00.00,mac=00:1e:67:1d:fd:1d' -- --port-topology=chained
 
 Create a bonded device in active backup mode with two slaves specified, and a primary slave specified by their PCI addresses:
 
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'eth_bond0,mode=1, slave=0000:00a:00.01,slave=0000:004:00.00,primary=0000:00a:00.01' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'net_bond0,mode=1, slave=0000:00a:00.01,slave=0000:004:00.00,primary=0000:00a:00.01' -- --port-topology=chained
 
 Create a bonded device in balance mode with two slaves specified by their PCI addresses, and a transmission policy of layer 3 + 4 forwarding:
 
 .. code-block:: console
 
-    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'eth_bond0,mode=2, slave=0000:00a:00.01,slave=0000:004:00.00,xmit_policy=l34' -- --port-topology=chained
+    $RTE_TARGET/app/testpmd -c '0xf' -n 4 --vdev 'net_bond0,mode=2, slave=0000:00a:00.01,slave=0000:004:00.00,xmit_policy=l34' -- --port-topology=chained
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 7712bd2..0e34f0b 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -130,7 +130,7 @@ See the DPDK Getting Started Guides for more information on these options.
 
     For example::
 
-       --vdev 'eth_pcap0,rx_pcap=input.pcap,tx_pcap=output.pcap'
+       --vdev 'net_pcap0,rx_pcap=input.pcap,tx_pcap=output.pcap'
 
 *   ``--base-virtaddr``
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index f87e0c2..5caca30 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -1041,14 +1041,14 @@ For example, to attach a port created by pcap PMD.
 
 .. code-block:: console
 
-   testpmd> port attach eth_pcap0
+   testpmd> port attach net_pcap0
    Attaching a new port...
-   PMD: Initializing pmd_pcap for eth_pcap0
+   PMD: Initializing pmd_pcap for net_pcap0
    PMD: Creating pcap-backed ethdev on numa socket 0
    Port 0 is attached. Now total ports is 1
    Done
 
-In this case, identifier is ``eth_pcap0``.
+In this case, identifier is ``net_pcap0``.
 This identifier format is the same as ``--vdev`` format of DPDK applications.
 
 For example, to re-attach a bonded port which has been previously detached,
@@ -1056,10 +1056,10 @@ the mode and slave parameters must be given.
 
 .. code-block:: console
 
-   testpmd> port attach eth_bond_0,mode=0,slave=1
+   testpmd> port attach net_bond_0,mode=0,slave=1
    Attaching a new port...
-   EAL: Initializing pmd_bond for eth_bond_0
-   EAL: Create bonded device eth_bond_0 on port 0 in mode 0 on socket 0.
+   EAL: Initializing pmd_bond for net_bond_0
+   EAL: Create bonded device net_bond_0 on port 0 in mode 0 on socket 0.
    Port 0 is attached. Now total ports is 1
    Done
 
@@ -1107,7 +1107,7 @@ For example, to detach a virtual device port 0.
    testpmd> port detach 0
    Detaching a port...
    PMD: Closing pcap ethdev on numa socket 0
-   Port 'eth_pcap0' is detached. Now total ports is 0
+   Port 'net_pcap0' is detached. Now total ports is 0
    Done
 
 To remove a pci device completely from the system, first detach the port from testpmd.
diff --git a/scripts/test-null.sh b/scripts/test-null.sh
index 32a47b1..30cd0b0 100755
--- a/scripts/test-null.sh
+++ b/scripts/test-null.sh
@@ -41,5 +41,5 @@ fi
 
 (sleep 1 && echo stop) |
 $build/app/testpmd -c $coremask -n 1 --no-huge \
-	$pmd --vdev eth_null1 --vdev eth_null2 -- \
+	$pmd --vdev net_null1 --vdev net_null2 -- \
 	--total-num-mbufs=2048 -ia
-- 
2.7.0

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox