Extend devlink for port trust setting
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 39 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | devlink: Add support to set port function as trustedDocumentation/ include/ include/ +1 more | +82 | 39 replies | |
| 2/2 | net/mlx5: SF/VF, Port function trust set supportdrivers/ drivers/ drivers/ +3 more | +162 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Parav Pandit | Jiri Pirko | Saeed Mahameed | Mark Bloch |
|---|---|---|---|---|
| 1/2 | R-b | R-b | ||
| 2/2 | R-b | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH net-next 0/2] Extend devlink for port trust setting
Currently a function (VF/SF) is always untrusted by default. Such a function does not have the privilege to perform steering database update as what a switchdev device can do.
In a use case where, a trusted application wants to modify/update the device steering database through a VF or a SF, add a user knob through which administrator can mark the function trusted; thereby it can update the steering database.
This patchset introduces a knob to mark a function trusted. Function restores to its untrusted state when either user marks it as untrusted or the function is deleted (SR-IOV disablement or SF port deletion).
Patch Summary:
patch1: extends devlink to get/set trust state
patch2: extends mlx5 driver to get/set trust state setting
example config sequence:
Add SF Port:
$ devlink port add pci/0000:08:00.0 flavour pcisf pfnum 0 sfnum 88
pci/0000:08:00.0/32768: type eth netdev eth6 flavour pcisf controller 0 pfnum 0 sfnum 88 splittable false
function:
hw_addr 00:00:00:00:00:00 state inactive opstate detached trusted falseSet SF trust setting:
$ devlink port function set pci/0000:08:00.0/32768 trusted true
Query SF settings:
$ devlink port show pci/0000:08:00.0/32768
pci/0000:08:00.0/32768: type eth netdev eth6 flavour pcisf controller 0 pfnum 0 sfnum 88 splittable false
function:
hw_addr 00:00:00:00:00:00 state inactive opstate detached trusted trueSunil Rani (2):
devlink: Add support to set port function as trusted net/mlx5: SF/VF, Port function trust set support
.../networking/devlink/devlink-port.rst | 4 + .../net/ethernet/mellanox/mlx5/core/devlink.c | 2 + .../net/ethernet/mellanox/mlx5/core/eswitch.c | 24 ++++ .../net/ethernet/mellanox/mlx5/core/eswitch.h | 11 +- .../mellanox/mlx5/core/eswitch_offloads.c | 116 ++++++++++++++++++ include/linux/mlx5/driver.h | 1 + include/linux/mlx5/mlx5_ifc.h | 10 +- include/net/devlink.h | 22 ++++ include/uapi/linux/devlink.h | 1 + net/core/devlink.c | 55 +++++++++ 10 files changed, 244 insertions(+), 2 deletions(-)
Signature · 1 line
2.26.2