Conversation
33c1468 to
9d69bb0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #253 +/- ##
==========================================
+ Coverage 99.14% 99.16% +0.02%
==========================================
Files 60 61 +1
Lines 10511 10818 +307
==========================================
+ Hits 10421 10728 +307
Misses 90 90 ☔ View full report in Codecov by Sentry. |
e836b9c to
46ab0ba
Compare
13d9f33 to
1ba1e1c
Compare
bbb49e2 to
3e73abb
Compare
3e73abb to
fba8f88
Compare
9f1cdb6 to
8db3301
Compare
|
We got some positive feedback from Canonical's OpenStack team about the new functionality, especially that the VF LAG (bonding of SR-IOV physical functions) is working as expected. |
|
schopin-pro
left a comment
There was a problem hiding this comment.
This PR is in great shape, and the code looks overall solid 🙂
I have a few items, most of them non-blocking, but there's one in particular regarding potential ABI break that needs answering before merging.
| YAML_STRING(def, event, emitter, "link", def->sriov_link->id); | ||
| YAML_UINT_DEFAULT(def, event, emitter, "virtual-function-count", def->sriov_explicit_vf_count, G_MAXUINT); | ||
| YAML_STRING(def, event, emitter, "embedded-switch-mode", def->embedded_switch_mode); | ||
| YAML_BOOL_TRUE(def, event, emitter, "delay-virtual-functions-rebind", |
There was a problem hiding this comment.
thought (later-pr): the YAML_BOOL_TRUE name has the opposite semantics to YAML_UINT_0. I should fix that, I guess?
…F/VF mocks dynamically
Taking lots of (especially the PCIDevice class) from: https://github.com/openstack-charmers/mlnx-switchdev-mode/blob/master/mlnx_switchdev_mode/sriovify.py V2: update copyright notice in comment of PCIDevice class
V2: avoid "# pragma: nocover" by having relevant test cases
8db3301 to
9c99162
Compare
|
Integration tests are still good, even if the CI is doing funny things by skipping most (all?) tests, due to some package dependency issue. I re-ran it locally: |
schopin-pro
left a comment
There was a problem hiding this comment.
LGTM!
I have a small suggestion for the new API, but feel free to merge if you don't want to pick it up.
V2: * simplify self.assert_sriov() in generator/base.py * add new netplan_state_finish_sriov_write() and netplan_sriov_cleanup() API * move SR-IOV rebind service generation into netplan_state_finish_sriov_write() V3: * move 'any_sriov' udev rules logic into netplan_state_finish_sriov_write()
9c99162 to
34c4da9
Compare
|
Thanks for the re-review! Turned out the I will be merging this. |
|
Thanks a lot for this, this is a much needed feature to utilize SR-IOV 👍 In case setting num_vfs needs to be done via systemd in the future, there was some recent work on that too: |
Nice! That's good to know. We should probably switch to that upstream solution in the future, once it lands in stable series (maybe in parallel to our manual way of doing it). |
Description
Certain types of network cards/SmartNICs allow toggling their low-level (
devlink) embedded switch mode PCI setting in order to utilize the full hardware offloading capabilities. With this PR we're exposing this functionality to the netplan YAML schema:embedded-switch-mode: [switchdev|legacy]delay-virtual-functions-rebind: [false|true]Example:
This PR builds upon the new libnetplan YAML parser (#250) for accessing the new settings.
Checklist
make checksuccessfully.make check-coverage).