summaryrefslogtreecommitdiff
path: root/net/devlink/param.c
diff options
context:
space:
mode:
authorVlad Dumitrescu <vdumitrescu@nvidia.com>2025-09-06 18:29:43 -0700
committerJakub Kicinski <kuba@kernel.org>2025-09-09 19:14:23 -0700
commitce0b015e2619ae64b7d33fb24a6b6cadcd70c317 (patch)
tree6253b7ba2d19791182b5e1227e29a277ada354a6 /net/devlink/param.c
parentb90c7ca4f9185c0d31ebbe252a448c42a5983483 (diff)
devlink: Add 'total_vfs' generic device param
NICs are typically configured with total_vfs=0, forcing users to rely on external tools to enable SR-IOV (a widely used and essential feature). Add total_vfs parameter to devlink for SR-IOV max VF configurability. Enables standard kernel tools to manage SR-IOV, addressing the need for flexible VF configuration. Signed-off-by: Vlad Dumitrescu <vdumitrescu@nvidia.com> Tested-by: Kamal Heib <kheib@redhat.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20250907012953.301746-2-saeed@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/devlink/param.c')
-rw-r--r--net/devlink/param.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/devlink/param.c b/net/devlink/param.c
index 41dcc86cfd94..33134940c266 100644
--- a/net/devlink/param.c
+++ b/net/devlink/param.c
@@ -102,6 +102,11 @@ static const struct devlink_param devlink_param_generic[] = {
.name = DEVLINK_PARAM_GENERIC_CLOCK_ID_NAME,
.type = DEVLINK_PARAM_GENERIC_CLOCK_ID_TYPE,
},
+ {
+ .id = DEVLINK_PARAM_GENERIC_ID_TOTAL_VFS,
+ .name = DEVLINK_PARAM_GENERIC_TOTAL_VFS_NAME,
+ .type = DEVLINK_PARAM_GENERIC_TOTAL_VFS_TYPE,
+ },
};
static int devlink_param_generic_verify(const struct devlink_param *param)