vif-plug-representor: Add support for PF plugging#17
vif-plug-representor: Add support for PF plugging#17dshcherb wants to merge 3 commits intoovn-org:mainfrom
Conversation
* Implement support for PF and PF representor plugging * If vf num is not present, we are plugging a PF * Unit tests for various cases
fnordahl
left a comment
There was a problem hiding this comment.
Hello @dshcherb, thanks a lot for working on this! The contribution is much welcome and I'll ensure we set aside some time to review it.
Your proposal continues the original intent of allowing plugging of PFs, which we never had time for in the initial implementation, so it is in line with the intent of the project and a welcome change.
I really appreciate the added test coverage.
Note that this is a first round of review and have not read through all of it yet, but I think there are some things to start on as is.
The change appears to do multiple distinct things:
- add support for plugging of the PF for the DPU use case.
- add support for plugging of PHYSICAL for non-DPU use case.
It would be easier to review if the latter use case was broken out into a separate commit with some context in the commit message for the use case.
|
Hi @fnordahl, thanks a lot for the quick review!
I'll address the comments and break it up. I wanted to have both PF and PF representor code in the same change originally because of the limitations of netdevsim w.r.t. to creating PF representors. But I ended up functionally testing on a physical DPU. One idea that I haven't yet included in the change is tracking ownership of plugged ports: in order to avoid conflicts between netplan (or other network config management tools), different instances of ovn-controller and manual operator changes, it would be good to store some indication of ownership in ovsdb. |
We at some point attempted to create a netdevsim based CI too, but quickly ran into similar issues. I did make an attempt at posting an update to it upstream [1] which was shot down quickly, and I have later found documentation suggesting that they only prioritize their own selftests and have no intention of adhering to kernel uAPI [2]. You're welcome to another attempt to convince them otherwise, but I think it is safe to assume that actual hardware is required for now.
The vif-plug infrastructure in the ovn-controller maintains an external-id for the ports it touches [3]. While not a formal ownership contract, it may cover part of this requirement? 1: https://lore.kernel.org/netdev/20211124081106.1768660-1-frode.nordahl@canonical.com/ |
One possible direction is PCIe device emulation. It would require some development and it's not easy to emulate an mlx5-compatible device but having a compatible PCIe test device model would be interesting to have. A device doesn't have to be mlx5-compatible but then the question is which driver to bind. As an alternative, I also thought of including functional tests for physical hardware that would not gate ovn-vif commits but would allow manual testing on DPUs prior to change submission.
I think we need something like this stored as well: Quoting ovn-controller's man:
That would allow ovn-vif to identify ownership if present in ovsdb. The case that wouldn't be covered, however, would be the one where the port is used outside of OVS but there's no indication for that in ovsdb. |
Let's simplify the change and focus on the DPU-only case with PF representors.
The main use-case is bare metal instances where PFs need to be plugged into OVS bridges programmatically via OVN.