Thread (91 messages) flat view 91 messages, 7 authors, 2017-04-14

Re: [PATCH 3/7] eal: move virtual device probing into a bus

From: Shreyansh Jain <hidden>
Date: 2017-02-15 14:28:09

-----Original Message-----
From: Wiles, Keith [mailto:keith.wiles@intel.com]
Sent: Wednesday, February 15, 2017 7:53 PM
To: Shreyansh Jain <redacted>
Cc: Jan Blunck <redacted>; dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 3/7] eal: move virtual device probing into a
bus

quoted
On Feb 15, 2017, at 8:15 AM, Shreyansh Jain [off-list ref] wrote:

On Wednesday 15 February 2017 07:41 PM, Shreyansh Jain wrote:
quoted
On Wednesday 15 February 2017 03:32 PM, Jan Blunck wrote:
quoted
This is a refactoring of the virtual device probing which moves into into
a proper bus structure.

Signed-off-by: Jan Blunck <redacted>
---
lib/librte_eal/common/eal_common_dev.c  | 22 -----------------
lib/librte_eal/common/eal_common_vdev.c | 44
+++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 22 deletions(-)
[...]
quoted
diff --git a/lib/librte_eal/common/eal_common_vdev.c
b/lib/librte_eal/common/eal_common_vdev.c
index 7d6e54f..523a3d6 100644
--- a/lib/librte_eal/common/eal_common_vdev.c
+++ b/lib/librte_eal/common/eal_common_vdev.c
@@ -37,8 +37,10 @@
#include <stdint.h>
#include <sys/queue.h>
[...]
quoted
+
+static struct rte_bus rte_vdev_bus = {
+    .scan = vdev_scan,
+    .probe = vdev_probe,
+};
+
+RTE_REGISTER_BUS_LATE(virtual, rte_vdev_bus);
Does it matter if VDEV buses are registered before or after other
buses? Either way, the callbacks would be called in the order specified
in EAL.
Just ignore this comment - I am misunderstood something.

But another question: Is there specific reason VDEV should be
registered/scanned *after* other devices? Is there some specific problem if
we do otherwise? (I think this is should be done, but I don't have a specific
reason).

Does the bonding driver which uses physical devices need to be registered
after physical ones? In Pktgen I noticed the vdev after the physical ports
and I could not blacklist them as the bonding driver needed them, which
caused the bonding ports to have a greater port number. In the case of pktgen
the bonding ports were up around 8 or 10 and caused the display to not show
the bonding ports. This is really just a usability problem for the developer
using Pktgen. I would like to see the vdev devices first, but as long as the
drivers (like bonding) are fine with them being first.
Ah, now I remember - there was a patch from Jerin for this.
Probably he is the best person to comment here.
(I don't have much insight here). 
Regards,
Keith
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help