Subject: Re: [PATCH net-next v6 2/6] net: libwx: Add sriov api for wangxun nics

From: Jakub Kicinski <[email-masked]>
Date: Tue, 14 Jan 2025 14:44:54 -0800

On Fri, 10 Jan 2025 18:27:01 +0800 Mengyuan Lou wrote:
> +static int wx_check_sriov_allowed(struct wx *wx, int num_vfs)
> +{
> +	u16 max_vfs;
> +
> +	max_vfs = (wx->mac.type == wx_mac_sp) ? 63 : 7;
> +	if (num_vfs > max_vfs)
> +		return -EPERM;

You should use pci_sriov_set_totalvfs() instead of checking 
the limit manually in the driver
-- 
pw-bot: cr