DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed
@ 2017-04-18 11:39 Pablo de Lara
  2017-04-18 11:39 ` [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name Pablo de Lara
  2017-04-18 11:41 ` [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed De Lara Guarch, Pablo
  0 siblings, 2 replies; 6+ messages in thread
From: Pablo de Lara @ 2017-04-18 11:39 UTC (permalink / raw)
  To: dev; +Cc: zbigniew.bodek, jerin.jacob, declan.doherty, Pablo de Lara

Instead of creating two virtual devices per PMD, if they have not
been initialized from EAL already, create only one, as only the
first device is used for the crypto tests.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 test/test/test_cryptodev.c      | 144 ++++++++++++++++++----------------------
 test/test/test_cryptodev_perf.c |  94 ++++++++++++--------------
 2 files changed, 106 insertions(+), 132 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 63d71c0..ca7d6df 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -209,7 +209,7 @@ testsuite_setup(void)
 		return TEST_FAILED;
 	}
 
-	/* Create 2 AESNI MB devices if required */
+	/* Create an AESNI MB device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_AESNI_MB_PMD) {
 #ifndef RTE_LIBRTE_PMD_AESNI_MB
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_MB must be"
@@ -218,20 +218,18 @@ testsuite_setup(void)
 #endif
 		nb_devs = rte_cryptodev_count_devtype(
 				RTE_CRYPTODEV_AESNI_MB_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
-
-				TEST_ASSERT(ret == 0,
-					"Failed to create instance %u of"
-					" pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
+
+			TEST_ASSERT(ret == 0,
+				"Failed to create instance of"
+				" pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
 		}
 	}
 
-	/* Create 2 AESNI GCM devices if required */
+	/* Create an AESNI GCM device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_AESNI_GCM_PMD) {
 #ifndef RTE_LIBRTE_PMD_AESNI_GCM
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_GCM must be"
@@ -240,18 +238,16 @@ testsuite_setup(void)
 #endif
 		nb_devs = rte_cryptodev_count_devtype(
 				RTE_CRYPTODEV_AESNI_GCM_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL),
-					"Failed to create instance %u of"
-					" pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
-			}
+		if (nb_devs < 1) {
+			TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL),
+				"Failed to create instance of"
+				" pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
 		}
 	}
 
-	/* Create 2 SNOW 3G devices if required */
+	/* Create a SNOW 3G device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_SNOW3G_PMD) {
 #ifndef RTE_LIBRTE_PMD_SNOW3G
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_SNOW3G must be"
@@ -259,18 +255,16 @@ testsuite_setup(void)
 		return TEST_FAILED;
 #endif
 		nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL),
-					"Failed to create instance %u of"
-					" pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
-			}
+		if (nb_devs < 1) {
+			TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL),
+				"Failed to create instance of"
+				" pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
 		}
 	}
 
-	/* Create 2 KASUMI devices if required */
+	/* Create a KASUMI device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_KASUMI_PMD) {
 #ifndef RTE_LIBRTE_PMD_KASUMI
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_KASUMI must be"
@@ -278,18 +272,16 @@ testsuite_setup(void)
 		return TEST_FAILED;
 #endif
 		nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_KASUMI_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), NULL),
-					"Failed to create instance %u of"
-					" pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));
-			}
+		if (nb_devs < 1) {
+			TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_KASUMI_PMD), NULL),
+				"Failed to create instance of"
+				" pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_KASUMI_PMD));
 		}
 	}
 
-	/* Create 2 ZUC devices if required */
+	/* Create a ZUC device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_ZUC_PMD) {
 #ifndef RTE_LIBRTE_PMD_ZUC
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_ZUC must be"
@@ -297,18 +289,16 @@ testsuite_setup(void)
 		return TEST_FAILED;
 #endif
 		nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_ZUC_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_ZUC_PMD), NULL),
-					"Failed to create instance %u of"
-					" pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_ZUC_PMD));
-			}
+		if (nb_devs < 1) {
+			TEST_ASSERT_SUCCESS(rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_ZUC_PMD), NULL),
+				"Failed to create instance of"
+				" pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_ZUC_PMD));
 		}
 	}
 
-	/* Create 2 NULL devices if required */
+	/* Create a NULL device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_NULL_PMD) {
 #ifndef RTE_LIBRTE_PMD_NULL_CRYPTO
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO must be"
@@ -317,20 +307,18 @@ testsuite_setup(void)
 #endif
 		nb_devs = rte_cryptodev_count_devtype(
 				RTE_CRYPTODEV_NULL_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				int dev_id = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_NULL_PMD), NULL);
-
-				TEST_ASSERT(dev_id >= 0,
-					"Failed to create instance %u of"
-					" pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_NULL_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_NULL_PMD), NULL);
+
+			TEST_ASSERT(ret == 0,
+				"Failed to create instance of"
+				" pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_NULL_PMD));
 		}
 	}
 
-	/* Create 2 OPENSSL devices if required */
+	/* Create an OPENSSL device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_OPENSSL_PMD) {
 #ifndef RTE_LIBRTE_PMD_OPENSSL
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_OPENSSL must be"
@@ -339,20 +327,18 @@ testsuite_setup(void)
 #endif
 		nb_devs = rte_cryptodev_count_devtype(
 				RTE_CRYPTODEV_OPENSSL_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD),
-					NULL);
-
-				TEST_ASSERT(ret == 0, "Failed to create "
-					"instance %u of pmd : %s", i,
-					RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD),
+				NULL);
+
+			TEST_ASSERT(ret == 0, "Failed to create "
+				"instance of pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD));
 		}
 	}
 
-	/* Create 2 ARMv8 devices if required */
+	/* Create a ARMv8 device if required */
 	if (gbl_cryptodev_type == RTE_CRYPTODEV_ARMV8_PMD) {
 #ifndef RTE_LIBRTE_PMD_ARMV8_CRYPTO
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO must be"
@@ -361,16 +347,14 @@ testsuite_setup(void)
 #endif
 		nb_devs = rte_cryptodev_count_devtype(
 				RTE_CRYPTODEV_ARMV8_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),
-					NULL);
-
-				TEST_ASSERT(ret == 0, "Failed to create "
-					"instance %u of pmd : %s", i,
-					RTE_STR(CRYPTODEV_NAME_ARMV8_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),
+				NULL);
+
+			TEST_ASSERT(ret == 0, "Failed to create "
+				"instance of pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_ARMV8_PMD));
 		}
 	}
 
diff --git a/test/test/test_cryptodev_perf.c b/test/test/test_cryptodev_perf.c
index 7f1adf8..f4406dc 100644
--- a/test/test/test_cryptodev_perf.c
+++ b/test/test/test_cryptodev_perf.c
@@ -321,7 +321,7 @@ testsuite_setup(void)
 			return TEST_FAILED;
 		}
 
-	/* Create 2 AESNI MB devices if required */
+	/* Create an AESNI MB device if required */
 	if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_AESNI_MB_PMD) {
 #ifndef RTE_LIBRTE_PMD_AESNI_MB
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_MB must be"
@@ -329,19 +329,17 @@ testsuite_setup(void)
 		return TEST_FAILED;
 #endif
 		nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_MB_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
-
-				TEST_ASSERT(ret == 0,
-					"Failed to create instance %u of pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
+
+			TEST_ASSERT(ret == 0,
+				"Failed to create instance of pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD));
 		}
 	}
 
-	/* Create 2 AESNI GCM devices if required */
+	/* Create an AESNI GCM device if required */
 	if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_AESNI_GCM_PMD) {
 #ifndef RTE_LIBRTE_PMD_AESNI_GCM
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_AESNI_GCM must be"
@@ -349,19 +347,17 @@ testsuite_setup(void)
 		return TEST_FAILED;
 #endif
 		nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_AESNI_GCM_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL);
-
-				TEST_ASSERT(ret == 0,
-					"Failed to create instance %u of pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD), NULL);
+
+			TEST_ASSERT(ret == 0,
+				"Failed to create instance of pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_AESNI_GCM_PMD));
 		}
 	}
 
-	/* Create 2 SNOW3G devices if required */
+	/* Create a SNOW3G device if required */
 	if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_SNOW3G_PMD) {
 #ifndef RTE_LIBRTE_PMD_SNOW3G
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_SNOW3G must be"
@@ -369,19 +365,17 @@ testsuite_setup(void)
 		return TEST_FAILED;
 #endif
 		nb_devs = rte_cryptodev_count_devtype(RTE_CRYPTODEV_SNOW3G_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL);
-
-				TEST_ASSERT(ret == 0,
-					"Failed to create instance %u of pmd : %s",
-					i, RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD), NULL);
+
+			TEST_ASSERT(ret == 0,
+				"Failed to create instance of pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_SNOW3G_PMD));
 		}
 	}
 
-	/* Create 2 OPENSSL devices if required */
+	/* Create an OPENSSL device if required */
 	if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_OPENSSL_PMD) {
 #ifndef RTE_LIBRTE_PMD_OPENSSL
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_OPENSSL must be"
@@ -390,20 +384,18 @@ testsuite_setup(void)
 #endif
 		nb_devs = rte_cryptodev_count_devtype(
 				RTE_CRYPTODEV_OPENSSL_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD),
-					NULL);
-
-				TEST_ASSERT(ret == 0, "Failed to create "
-					"instance %u of pmd : %s", i,
-					RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD),
+				NULL);
+
+			TEST_ASSERT(ret == 0, "Failed to create "
+				"instance of pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_OPENSSL_PMD));
 		}
 	}
 
-	/* Create 2 ARMv8 devices if required */
+	/* Create an ARMv8 device if required */
 	if (gbl_cryptodev_perftest_devtype == RTE_CRYPTODEV_ARMV8_PMD) {
 #ifndef RTE_LIBRTE_PMD_ARMV8_CRYPTO
 		RTE_LOG(ERR, USER1, "CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO must be"
@@ -412,16 +404,14 @@ testsuite_setup(void)
 #endif
 		nb_devs = rte_cryptodev_count_devtype(
 				RTE_CRYPTODEV_ARMV8_PMD);
-		if (nb_devs < 2) {
-			for (i = nb_devs; i < 2; i++) {
-				ret = rte_eal_vdev_init(
-					RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),
-					NULL);
-
-				TEST_ASSERT(ret == 0, "Failed to create "
-					"instance %u of pmd : %s", i,
-					RTE_STR(CRYPTODEV_NAME_ARMV8_PMD));
-			}
+		if (nb_devs < 1) {
+			ret = rte_eal_vdev_init(
+				RTE_STR(CRYPTODEV_NAME_ARMV8_PMD),
+				NULL);
+
+			TEST_ASSERT(ret == 0, "Failed to create "
+				"instance of pmd : %s",
+				RTE_STR(CRYPTODEV_NAME_ARMV8_PMD));
 		}
 	}
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name
  2017-04-18 11:39 [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed Pablo de Lara
@ 2017-04-18 11:39 ` Pablo de Lara
  2017-04-18 13:12   ` Zhang, Roy Fan
  2017-04-18 11:41 ` [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed De Lara Guarch, Pablo
  1 sibling, 1 reply; 6+ messages in thread
From: Pablo de Lara @ 2017-04-18 11:39 UTC (permalink / raw)
  To: dev; +Cc: zbigniew.bodek, jerin.jacob, declan.doherty, Pablo de Lara

Since commit <dda987315ca2> ("vdev: make virtual bus use
its device struct"), rte_eal_vdev_init cannot be called
with same name twice.

If several devices with the same driver are needed
(as in the crypto scheduler test), then driver name argument
has to be unique, concatenating the driver name and an index.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

---

I have tested all PMDs expect for the ARMv8 one, but I assume
it should work as well. Let me know if you see a problem.
---
 test/test/test_cryptodev.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index ca7d6df..9f13171 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -7751,14 +7751,17 @@ test_scheduler_attach_slave_op(void)
 	uint8_t sched_id = ts_params->valid_devs[0];
 	uint32_t nb_devs, i, nb_devs_attached = 0;
 	int ret;
+	char vdev_name[32];
 
 	/* create 2 AESNI_MB if necessary */
 	nb_devs = rte_cryptodev_count_devtype(
 			RTE_CRYPTODEV_AESNI_MB_PMD);
 	if (nb_devs < 2) {
 		for (i = nb_devs; i < 2; i++) {
-			ret = rte_eal_vdev_init(
-				RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD), NULL);
+			snprintf(vdev_name, sizeof(vdev_name), "%s_%u",
+					RTE_STR(CRYPTODEV_NAME_AESNI_MB_PMD),
+					i);
+			ret = rte_eal_vdev_init(vdev_name, NULL);
 
 			TEST_ASSERT(ret == 0,
 				"Failed to create instance %u of"
-- 
2.7.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed
  2017-04-18 11:39 [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed Pablo de Lara
  2017-04-18 11:39 ` [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name Pablo de Lara
@ 2017-04-18 11:41 ` De Lara Guarch, Pablo
  2017-04-18 15:46   ` De Lara Guarch, Pablo
  1 sibling, 1 reply; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-18 11:41 UTC (permalink / raw)
  To: dev; +Cc: zbigniew.bodek, jerin.jacob, Doherty, Declan



> -----Original Message-----
> From: De Lara Guarch, Pablo
> Sent: Tuesday, April 18, 2017 12:40 PM
> To: dev@dpdk.org
> Cc: zbigniew.bodek@caviumnetworks.com;
> jerin.jacob@caviumnetworks.com; Doherty, Declan; De Lara Guarch, Pablo
> Subject: [PATCH 1/2] test/crypto: create only one virtual device if needed
> 
> Instead of creating two virtual devices per PMD, if they have not
> been initialized from EAL already, create only one, as only the
> first device is used for the crypto tests.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

I have tested this change on all PMDs but ARMv8, but I assume that it will work well.
Let me know if you see any issues.

Thanks,
Pablo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name
  2017-04-18 11:39 ` [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name Pablo de Lara
@ 2017-04-18 13:12   ` Zhang, Roy Fan
  2017-04-18 15:46     ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Roy Fan @ 2017-04-18 13:12 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev
  Cc: zbigniew.bodek, jerin.jacob, Doherty, Declan, De Lara Guarch, Pablo

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Tuesday, April 18, 2017 12:40 PM
> To: dev@dpdk.org
> Cc: zbigniew.bodek@caviumnetworks.com;
> jerin.jacob@caviumnetworks.com; Doherty, Declan
> <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name
> 
> Since commit <dda987315ca2> ("vdev: make virtual bus use its device struct"),
> rte_eal_vdev_init cannot be called with same name twice.
> 
> If several devices with the same driver are needed (as in the crypto
> scheduler test), then driver name argument has to be unique, concatenating
> the driver name and an index.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed
  2017-04-18 11:41 ` [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed De Lara Guarch, Pablo
@ 2017-04-18 15:46   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-18 15:46 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev; +Cc: zbigniew.bodek, jerin.jacob, Doherty, Declan



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Tuesday, April 18, 2017 12:41 PM
> To: dev@dpdk.org
> Cc: zbigniew.bodek@caviumnetworks.com;
> jerin.jacob@caviumnetworks.com; Doherty, Declan
> Subject: Re: [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual
> device if needed
> 
> 
> 
> > -----Original Message-----
> > From: De Lara Guarch, Pablo
> > Sent: Tuesday, April 18, 2017 12:40 PM
> > To: dev@dpdk.org
> > Cc: zbigniew.bodek@caviumnetworks.com;
> > jerin.jacob@caviumnetworks.com; Doherty, Declan; De Lara Guarch, Pablo
> > Subject: [PATCH 1/2] test/crypto: create only one virtual device if needed
> >
> > Instead of creating two virtual devices per PMD, if they have not
> > been initialized from EAL already, create only one, as only the
> > first device is used for the crypto tests.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> I have tested this change on all PMDs but ARMv8, but I assume that it will
> work well.
> Let me know if you see any issues.

Applied to dpdk-next-crypto.

Pablo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name
  2017-04-18 13:12   ` Zhang, Roy Fan
@ 2017-04-18 15:46     ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 6+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-18 15:46 UTC (permalink / raw)
  To: Zhang, Roy Fan, dev; +Cc: zbigniew.bodek, jerin.jacob, Doherty, Declan



> -----Original Message-----
> From: Zhang, Roy Fan
> Sent: Tuesday, April 18, 2017 2:12 PM
> To: De Lara Guarch, Pablo; dev@dpdk.org
> Cc: zbigniew.bodek@caviumnetworks.com;
> jerin.jacob@caviumnetworks.com; Doherty, Declan; De Lara Guarch, Pablo
> Subject: RE: [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > Sent: Tuesday, April 18, 2017 12:40 PM
> > To: dev@dpdk.org
> > Cc: zbigniew.bodek@caviumnetworks.com;
> > jerin.jacob@caviumnetworks.com; Doherty, Declan
> > <declan.doherty@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>
> > Subject: [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name
> >
> > Since commit <dda987315ca2> ("vdev: make virtual bus use its device
> struct"),
> > rte_eal_vdev_init cannot be called with same name twice.
> >
> > If several devices with the same driver are needed (as in the crypto
> > scheduler test), then driver name argument has to be unique,
> concatenating
> > the driver name and an index.
> >
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

Applied to dpdk-next-crypto.

Pablo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-18 15:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 11:39 [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed Pablo de Lara
2017-04-18 11:39 ` [dpdk-dev] [PATCH 2/2] test/crypto: create unique driver name Pablo de Lara
2017-04-18 13:12   ` Zhang, Roy Fan
2017-04-18 15:46     ` De Lara Guarch, Pablo
2017-04-18 11:41 ` [dpdk-dev] [PATCH 1/2] test/crypto: create only one virtual device if needed De Lara Guarch, Pablo
2017-04-18 15:46   ` De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).