8000 port: allow attaching already probed devices by rjarry · Pull Request #210 · DPDK/grout · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

port: allow attaching already probed devices #210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged

Conversation

rjarry
Copy link
Collaborator
@rjarry rjarry commented May 3, 2025

At startup, we pass -a 0000:00:00.0 to rte_eal_init() to disable automatic PCI probing. However, this only affects the PCI bus devices. Other buses (e.g. FSMLC) are not affected by this argument and are always probed in rte_eal_init().

When configuring a port with such a device, we get an error from the API saying that the port is already attached to another interface:

grout# add interface port dpni2 devargs fslmc:dpni.2
error: File exists

Instead of iterating over the DPDK probed devices, look at grout ports to determine whether a port matching this devargs value is already configured.

If we cannot find one, check if the device has already been probed and only probe it if it was not.

At startup, we pass -a 0000:00:00.0 to rte_eal_init() to disable
automatic PCI probing. However, this only affects the PCI bus devices.
Other buses (e.g. FSMLC) are not affected by this argument and are
always probed in rte_eal_init().

When configuring a port with such a device, we get an error from the API
saying that the port is already attached to another interface:

	grout# add interface port dpni2 devargs fslmc:dpni.2
	error: File exists

Instead of iterating over the DPDK probed devices, look at grout ports
to determine whether a port matching this devargs value is already
configured.

If we cannot find one, check if the device has already been probed and
only probe it if it was not.

Signed-off-by: Robin Jarry <robin@jarry.cc>
@vjardin
Copy link
Contributor
vjardin commented May 3, 2025

Tested with:

ls-delete dpni.2
ls-delete dpni.3
/usr/sbin/qoriq-dpdk/dpaa2/dynamic_dpl.sh dpmac.1 dpmac.2
DPRC=dprc.2 grout -v --log-level="eal.*,debug" --log-level="pmd.*,debug" --log-level="bus.fslmc,debug"
$ grcli
Welcome to the graph router CLI version custom.
Use ? for help and <tab> for command completion.
grout# add interface port dpni2 devargs fslmc:dpni.2 up mode l3
Created interface 1

grout# show interface
NAME   ID  FLAGS       MODE  DOMAIN  TYPE  INFO
dpni2  1   up running  L3    0       port  devargs=fslmc:dpni.2 mac=00:04:9f:05:79:e0
DEBUG: GROUT: listen_cb: new connection fd=203
DEBUG: GROUT: read_cb: fd=203 id=1 req_type=0xcafe1981 len=128
DEBUG: GROUT: send_response: fd=203 for_id=1 len=0 status=0 Success
DEBUG: GROUT: read_cb: fd=203 id=2 req_type=0xacdc0001 len=332
DEBUG: DPAA2_NET: dpaa2_dev_info_get(): >>
DEBUG: GROUT: gr_pktmbuf_pool_get: allocate mempool mbuf_0:0 reserved 16383 (size 65535)
DEBUG: DPAA2_NET: dpaa2_dev_info_get(): >>
DEBUG: DPAA2_NET: dpaa2_eth_dev_configure(): >>

@rjarry rjarry merged commit 9ca9336 into DPDK:main May 3, 2025
8 checks passed
@rjarry rjarry deleted the autoprobe branch May 3, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0