]> git.ipfire.org Git - thirdparty/iproute2.git/commit
devlink: Support setting port function roce cap
authorShay Drory <shayd@nvidia.com>
Sun, 11 Dec 2022 11:58:47 +0000 (13:58 +0200)
committerDavid Ahern <dsahern@kernel.org>
Wed, 14 Dec 2022 15:55:10 +0000 (08:55 -0700)
commitbb2eea918be757b899c9bb8beba992281a51f8f0
tree37eaad632bb8c6d3ffda6b3b1db3285a71e19375
parent3f1e064ea454885432e197a47973d361e60d30b7
devlink: Support setting port function roce cap

Support port function commands to enable / disable RoCE, this is used to
control the port RoCE device capabilities.

When RoCE is disabled for a function of the port, function cannot create
any RoCE specific resources (e.g GID table).
It also saves system memory utilization. For example disabling RoCE
enable a VF/SF to save 1 Mbytes of system memory per function.

Example of a PCI VF port which supports a port function:

$ devlink port show pci/0000:06:00.0/2
    pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum
    0 vfnum 1
      function:
        hw_addr 00:00:00:00:00:00 roce enabled

$ devlink port function set pci/0000:06:00.0/2 roce disable

$ devlink port show pci/0000:06:00.0/2
    pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum
    0 vfnum 1
      function:
        hw_addr 00:00:00:00:00:00 roce disabled

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
devlink/devlink.c