-
Notifications
You must be signed in to change notification settings - Fork 21
port: do not unplug static ports #217
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
base: main
Are you sure you want to change the base?
Conversation
|
@vjardin @maxime-leroy could you have a try with this patch? |
If some port is available since grout startup, don't try to remove the underlying device. This is to accommodate with buses that do not properly implement device hotplug. Signed-off-by: David Marchand <[email protected]>
vjardin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a very good idea to add a hotplug capability but see the comment, it is not enough.
Moreover, can you display this capability on the show interface ?
See david-marchand#1
| if ((ret = rte_eth_dev_close(port->port_id)) < 0) | ||
| LOG(ERR, "rte_eth_dev_close: %s", rte_strerror(-ret)); | ||
| if (info.device != NULL && (ret = rte_dev_remove(info.device)) < 0) | ||
| if (port->hotplugged && info.device != NULL && (ret = rte_dev_remove(info.device)) < 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is nok, you need to prevent the call to rte_eth_dev_close() too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you describe why the rte_eth_dev_close() is problematic? The life of a rte_device should be separated from the rte_eth_dev object.
|
I don't see great value in including the "hot-plugged" information in the API. It is more for debugging purposes than anything. |
@rjarry > what would be the proper mean to get the internals of the grout structures if they are not reported thru the API ? Just logs ? |
Probably |
I am in a world where OK, let's focus on the hotplug topic, and let's forget this gdb/show option. It should be another thread but not this pull request. |
|
I don't mind adding DEBUG logs for such cases by the way. Or if you really think that hotplug information is useful in the long run for end users, we could add it in the API. |
|
@vjardin where are we for this patch? Did you get more info about why |
nope, I could not analyze it yet ; I am on another topic and I won't be able to be back on it next week neither. |
|
@vjardin any update? |
|
With vincent workaround: ok good Without vincent failed as expected: With david fixes: |
|
Minimal changes on David patches:: rte_eth_dev_close is not working properly on dpaa2 driver. |
|
static int It means that: rte_dpaa2_remove is never called. So in iface_port_init: But rte_dev_probe will probably do nothing as fslmc_bus_plug do nothing to ! |
If some port is available since grout startup, don't try to remove the underlying device. This is to accomodate with buses that do not properly implement device hotplug.