Skip to content

sriov: add support to configure the NIC's eswitch settings via Devlink

Íñigo Huguet requested to merge ih/eswitch_mode into main

Summary

Add support to configure the NIC's eswitch settings via Devlink.

Purpose

Add 3 new parameters to the sriov setting that allow to configure the NIC's eswitch parameters mode, inline-mode and encap-mode as you can do with devlink dev eswitch set .... Mainly, this allows to switch between "legacy SR-IOV" and "switchdev" mode.

An important thing to note is that all the current hardware implements one eswitch per PF. However, devlink has been designed to support the possibility to have one eswitch for various PFs of one NIC. As there is no hardware that supports that yet and it is not clear how would we implement that in NetworkManager, for the moment add support only for the "one eswitch per PF" model.

NetworkManager-ci!1618 (closed)

Resolves: https://issues.redhat.com/browse/RHEL-1441

Note: I have built this MR on top of !1861 (merged). I will rebase when that one is merged.

Checklist

Please read https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/CONTRIBUTING.md before opening the merge request. In particular, check that:

  • the subject for all commits is concise and explicative
  • the message for all commits explains the reason for the change
  • the source is properly formatted
  • any relevant documentation is up to date
  • you have added unit tests if applicable
Edited by Íñigo Huguet

Merge request reports