[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250114144454.16bc139e@kernel.org>
Date: Tue, 14 Jan 2025 14:44:54 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Mengyuan Lou <mengyuanlou@...-swift.com>
Cc: netdev@...r.kernel.org, helgaas@...nel.org, jiawenwu@...stnetic.com,
duanqiangwen@...-swift.com
Subject: Re: [PATCH net-next v6 2/6] net: libwx: Add sriov api for wangxun
nics
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
Powered by blists - more mailing lists