Add --sriov-whitelist argument to allow selecting specific SR-IOV devices (instead of enabling all found devices)#1
Conversation
abbb5a8 to
7c83864
Compare
|
Do you have a config for an autoformatting tool like clang-tidy which ensures I don't violate the coding style guide? |
9bbc0ec to
89e2270
Compare
|
I've put at least a clang-format file online: https://l4re.org/devel/clang-format.html |
|
Thanks Benedikt, this is a tough one. Seems we definitely have to enable SR-IOV on request only. We were just wondering whether via cmdline is the way to go (like you did) or more in the config, or both. Thanks for figuring this out! |
I have tested your clang-format file, but unfortunately the diff caused by that is huge. I am a big fan of automated formatting (to prevent discussions about style preferences on individual code locations) and strict formatting checks in CI pipelines (to not waste a human's time on checking whether something is up to standard), so if you establish that config file as the L4Re standard I will gladly use it.
It is indeed just a small band-aid hotfix to enable the usage of the SR-IOV feature on stubborn hardware configurations. In the long-term future it would be great if io could receive SR-IOV activation requests at runtime (if that's possible), which would also solve the negative effects of the blanket activation. |
This clang-format file implements the L4Re style as much as it can.
As a stop-gap, your proposed way is good. Please call it "--enable-sriov" and only enable devices when specified, i.e., no auto-enablement for if no such option is given. Thanks. |
89e2270 to
697a5fb
Compare
As of now, CONFIG_L4IO_PCI_SRIOV enables the SR-IOV capability for every device found on the bus. This breaks drivers of certain devices and causes io to deadlock when it encounters certain devices. To avoid such issues, this commit requires the user to specify a "--enable-sriov $vendor_id:$device_id" argument. Change-Id: Ie80bcb87155a3435531e3c5f82b448bfafe4f655 Signed-off-by: Benedikt Radtke <benediktradtke@gmail.com>
697a5fb to
1f751cf
Compare
If the mountain will not go to Mahomet, let Mahomet go to the mountain :P I never heard of clang format's git integration before, but it sounds super useful and I will check it out if I make another non-trivial contribution.
Fair point, automatic checks/conversion should exclude third party code.
Done, and I have amended my commit message to reflect the changes! |
|
Should I also open a PR for your documentation at https://github.com/L4Re/l4re.org or should this wait until a final design has emerged? Is there a public repo for the stuff behind https://l4re.org/doc/io.html ? |
As of now,
CONFIG_L4IO_PCI_SRIOVenables the SR-IOV capability for every device found on the bus. This breaks drivers of certain devices and causes io to deadlock when it encounters certain devices. To avoid such issues, this commit allows the user to specify multiple--sriov-whitelist $vendor_id:$device_idoptions.If zero
--sriov-whitelistoptions are specified, io continues to enable SR-IOV for all capable devices. This ensures backwards compatibility, but I would be very open to breaking backwards compatiblity and only loading explicitly whitelisted devices.Examples of broken devices
This integrated graphics controller deadlocks io
This NIC cannot get its interface up