Thread (123 messages) read the whole thread 123 messages, 7 authors, 2017-07-08

Re: [PATCH 7/9] bus: add helper to find a bus from a device name

From: Jan Blunck <hidden>
Date: 2017-06-10 08:50:14

On Thu, Jun 8, 2017 at 2:51 PM, Gaëtan Rivet [off-list ref] wrote:
On Thu, Jun 08, 2017 at 01:40:46PM +0200, Jan Blunck wrote:
quoted
On Thu, Jun 8, 2017 at 1:36 PM, Gaëtan Rivet [off-list ref] wrote:
quoted
On Thu, Jun 08, 2017 at 12:45:17PM +0200, Jan Blunck wrote:
quoted
On Wed, Jun 7, 2017 at 10:03 PM, Gaëtan Rivet [off-list ref] wrote:
quoted
On Wed, Jun 07, 2017 at 07:28:07PM +0200, Jan Blunck wrote:
quoted
On Wed, May 24, 2017 at 5:12 PM, Gaetan Rivet [off-list ref] wrote:
quoted
Find which bus should be able to parse this device name into an internal
device representation.
No, please don't add this. One should know to what bus a device
belongs to before plugging it. Artificially encoding the parent bus
into the device name is not the right thing to do. Please keep those
things separate.
When plugging a device the users know about:
- bus name
- device name

Its not the case that the users invent the device names out of thin
air. The EAL shouldn't codify what the users of the EAL already know
about.
Yes, but in that case the user is forced to explicitly name the bus used
for a device.

I think it might be sufficient to have this as a private function to the
EAL, as it is currently only used within the rte_devargs parsing.
Applications could use this helper to recognize a bus from a device
name, but this is contrived.
Just remove it. Putting the knowledge of what bus a device name could
be for into code has failed before (e.g. biosdevname etc.). If the
application doesn't know what bus the device is living on we have a
different problem.
This means that devices will be declared as follows:

  -w PCI:00:02.0 -w virtual:net_ring0

Without a way to keep the legacy behavior.
Do you agree with it?
This adds ':' as another character not usable in identifiers for buses.

I wouldn't touch the meaning of -w at all and instead use it as an alias for

--dev 00:02.0,bus=pci  --bus pci,whitelist

This would clearly separate the device arguments from the bus arguments.

What do you think? Does this make sense?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help