All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/2] Extend devlink for port trust setting
@ 2021-11-22 14:43 Sunil Rani
  2021-11-22 14:43 ` [PATCH net-next 1/2] devlink: Add support to set port function as trusted Sunil Rani
  2021-11-22 14:43 ` [PATCH net-next 2/2] net/mlx5: SF/VF, Port function trust set support Sunil Rani
  0 siblings, 2 replies; 42+ messages in thread
From: Sunil Rani @ 2021-11-22 14:43 UTC (permalink / raw)
  To: netdev, davem, kuba; +Cc: parav, jiri, saeedm, Sunil Rani

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 false

Set 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 true

Sunil 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(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2022-02-09  5:09 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-22 14:43 [PATCH net-next 0/2] Extend devlink for port trust setting Sunil Rani
2021-11-22 14:43 ` [PATCH net-next 1/2] devlink: Add support to set port function as trusted Sunil Rani
2021-11-23  1:22   ` Jakub Kicinski
2021-11-30 22:17     ` Sunil Sudhakar Rani
2021-12-01  3:12       ` Jakub Kicinski
2021-12-01  7:07         ` Saeed Mahameed
2021-12-02 17:31           ` Jakub Kicinski
2021-12-02 19:06             ` Saeed Mahameed
2021-12-15 18:19             ` Saeed Mahameed
2021-12-15 19:22               ` Jakub Kicinski
2021-12-15 22:15                 ` Saeed Mahameed
2021-12-15 23:04                   ` Jakub Kicinski
2021-12-16 16:17                     ` Sunil Sudhakar Rani
2021-12-16 16:28                       ` Jakub Kicinski
2022-01-11 16:57                         ` Parav Pandit
2022-01-11 18:20                           ` Jakub Kicinski
2022-01-11 18:26                             ` Parav Pandit
2022-01-11 19:24                               ` Jakub Kicinski
2022-01-11 19:39                                 ` Parav Pandit
2022-01-11 19:57                                   ` Jakub Kicinski
2022-01-12  4:40                                     ` Parav Pandit
2022-01-13  0:35                                       ` Jakub Kicinski
2022-01-13  3:37                                         ` Parav Pandit
2022-01-14  4:42                                           ` Jakub Kicinski
2022-01-14  4:52                                             ` Parav Pandit
2022-01-15  2:34                                               ` Jakub Kicinski
2022-01-15  6:15                                                 ` Saeed Mahameed
2022-01-18 18:02                                                   ` Jakub Kicinski
2022-01-18 22:33                                                     ` Saeed Mahameed
2022-01-19  0:16                                                       ` Jakub Kicinski
2022-01-19  5:49                                                         ` Parav Pandit
2022-01-20  0:40                                                           ` Saeed Mahameed
2022-01-20  4:52                                                             ` Parav Pandit
2022-01-20  6:03                                                               ` Saeed Mahameed
2022-01-20  6:19                                                                 ` Parav Pandit
2022-02-03 18:35                                                             ` Parav Pandit
2022-02-03 19:16                                                               ` Saeed Mahameed
2022-02-07 14:45                                                                 ` Parav Pandit
2022-02-09  4:21                                                                   ` Parav Pandit
2022-01-14  9:15                             ` Jiri Pirko
2022-01-15  2:10                               ` Jakub Kicinski
2021-11-22 14:43 ` [PATCH net-next 2/2] net/mlx5: SF/VF, Port function trust set support Sunil Rani

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.