> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf
> Of [email protected]
> Sent: Friday, August 22, 2025 1:40 AM
> To: [email protected]
> Cc: Kitszel, Przemyslaw <[email protected]>; Nguyen,
> Anthony L <[email protected]>; [email protected];
> Mohammad Heib <[email protected]>
> Subject: [Intel-wired-lan] [PATCH net] i40e: add devlink param to
> control VF MAC address limit
>
> From: Mohammad Heib <[email protected]>
>
> This patch introduces a new devlink runtime parameter to control
> whether the VF MAC filter limit feature is enabled or disabled.
>
> When the parameter is set to non-zero, the driver enforces the per-VF
> MAC filter limit calculated from the number of allocated VFs and
> ports.
> When the parameter is unset (zero), no limit is applied and behavior
> remains as before commit cfb1d572c986
> ("i40e: Add ensurance of MacVlan resources for every trusted VF").
>
> This implementation allows us to toggle the feature through devlink
> while preserving old behavior. In the future, the parameter can be
> extended to represent a configurable "max MACs per VF" value, but for
> now it acts as a simple on/off switch.
>
> Example command to enable per-vf mac limit:
> - devlink dev param set pci/0000:3b:00.0 name max_mac_per_vf \
> value 1 \
> cmode runtime
>
> Fixes: cfb1d572c986 ("i40e: Add ensurance of MacVlan resources for
> every trusted VF")
> Signed-off-by: Mohammad Heib <[email protected]>
Reviewed-by: Aleksandr Loktionov <[email protected]>
...
> diff --git a/drivers/net/ethernet/intel/i40e/i40e.h
> b/drivers/net/ethernet/intel/i40e/i40e.h
> index 49aa4497efce..4a4cb55b6ce8 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e.h
> +++ b/drivers/net/ethernet/intel/i40e/i40e.h
> @@ -574,6 +574,10 @@ struct i40e_pf {
> struct i40e_vf *vf;
> int num_alloc_vfs; /* actual number of VFs allocated */
> u32 vf_aq_requests;
> + /* If set to none-zero, the device reserves
“If set to none‑zero” → non‑zero, othervise fine for me.
...
> 2.50.1