Thread (126 messages) 126 messages, 11 authors, 2021-10-03

Re: [dpdk-dev] [PATCH v5 5/5] devargs: parse global device syntax

From: Xueming(Steven) Li <hidden>
Date: 2021-10-03 10:51:49

On Tue, 2021-09-28 at 11:04 +0200, Thomas Monjalon wrote:
28/09/2021 10:29, David Marchand:
quoted
On Tue, Apr 13, 2021 at 5:15 AM Xueming Li [off-list ref] wrote:
quoted
When parsing a devargs, try to parse using the global device syntax
first. Fallback on legacy syntax on error.

Example of new global device syntax:
 -a bus=pci,addr=82:00.0/class=eth/driver=mlx5,dv_flow_en=1

Signed-off-by: Xueming Li <redacted>
Reviewed-by: Gaetan Rivet <redacted>
Starting with a virtio user port, I get a warning:

# dpdk-testpmd --vdev
net_virtio_user0,iface=test,path=/dev/vhost-net,queues=1
--log-level=pmd.net.virtio.*:debug -- -i
...
EAL: Unrecognized layer dev/vhost-net,queues=1
...

Am I doing something wrong?
If not, could you have a look?
The new global syntax is using the slash / as separator.
We should detect legit use of slash in a path.
Here, the value starts with a slash so it should be easy to ignore.
Another way is to consider slash only if followed by "class=" or "driver="
There is an assumption in the function rte_devargs_layers_parse():
		 * The last layer is free-form.
		 * The "driver" key is not required (but accepted).
For some case like "bus=x,k1=v1/class=y,k2=/some/path/k3=v3", "k3"
belongs to driver layer, this will confuse parser.


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help