summaryrefslogtreecommitdiff
path: root/net/devlink/param.c
diff options
context:
space:
mode:
authorMohammad Heib <mheib@redhat.com>2025-10-25 16:08:58 +0300
committerTony Nguyen <anthony.l.nguyen@intel.com>2025-11-06 12:57:31 -0800
commit9352d40c8bcd2ef29366d2c38b163c0b115039ed (patch)
tree71f1b7cb925f67b73e1e4e90af2f223d3909edcb /net/devlink/param.c
parent13068e9d57264d0a86b8195817a01155ba33d230 (diff)
devlink: Add new "max_mac_per_vf" generic device param
Add a new device generic parameter to controls the maximum number of MAC filters allowed per VF. For example, to limit a VF to 3 MAC addresses: $ devlink dev param set pci/0000:3b:00.0 name max_mac_per_vf \ value 3 \ cmode runtime Signed-off-by: Mohammad Heib <mheib@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
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 70e69523412c..6b233b13b69a 100644
--- a/net/devlink/param.c
+++ b/net/devlink/param.c
@@ -112,6 +112,11 @@ static const struct devlink_param devlink_param_generic[] = {
.name = DEVLINK_PARAM_GENERIC_NUM_DOORBELLS_NAME,
.type = DEVLINK_PARAM_GENERIC_NUM_DOORBELLS_TYPE,
},
+ {
+ .id = DEVLINK_PARAM_GENERIC_ID_MAX_MAC_PER_VF,
+ .name = DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_NAME,
+ .type = DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_TYPE,
+ },
};
static int devlink_param_generic_verify(const struct devlink_param *param)