DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] app/test: fix multiprocess unit test when device is bound to uio
Date: Thu, 11 Dec 2014 13:50:35 +0000	[thread overview]
Message-ID: <1418305835-10031-1-git-send-email-pablo.de.lara.guarch@intel.com> (raw)

Since commit a155d4301 "support link bonding device initialization",
EAL probes drivers to the PCI devices in rte_eal_init,
then PCI resources are mapped if a device
is bound to igb_uio driver, for instance.
Therefore, test app probes all the devices and multiprocess unit test
tries to map resources twice in the secondary processes, and test fails,
caused by RTE_PCI_DRV_NEEDED_MAPPING flag in dummy pci driver my_driver2.

Test is fixed by setting the driver flags to 0.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test/test_pci.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/app/test/test_pci.c b/app/test/test_pci.c
index 4f0169a..747d8b7 100644
--- a/app/test/test_pci.c
+++ b/app/test/test_pci.c
@@ -64,11 +64,6 @@ static unsigned pci_dev_count;
 static int my_driver_init(struct rte_pci_driver *dr,
 			  struct rte_pci_device *dev);
 
-/*
- * To test cases where RTE_PCI_DRV_NEED_MAPPING is set, and isn't set, two
- * drivers are created (one with IGB devices, the other with IXGBE devices).
- */
-
 /* IXGBE NICS */
 struct rte_pci_id my_driver_id[] = {
 
@@ -92,7 +87,7 @@ struct rte_pci_driver my_driver = {
 	.name = "test_driver",
 	.devinit = my_driver_init,
 	.id_table = my_driver_id,
-	.drv_flags = RTE_PCI_DRV_NEED_MAPPING,
+	.drv_flags = 0,
 };
 
 struct rte_pci_driver my_driver2 = {
-- 
1.7.4.1

             reply	other threads:[~2014-12-11 13:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-11 13:50 Pablo de Lara [this message]
2014-12-17  0:11 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418305835-10031-1-git-send-email-pablo.de.lara.guarch@intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).