From: Jakub Kicinski <kuba@kernel.org>
To: Mengyuan Lou <mengyuanlou@net-swift.com>
Cc: netdev@vger.kernel.org, helgaas@kernel.org,
jiawenwu@trustnetic.com, duanqiangwen@net-swift.com
Subject: Re: [PATCH net-next v6 2/6] net: libwx: Add sriov api for wangxun nics
Date: Tue, 14 Jan 2025 14:44:54 -0800 [thread overview]
Message-ID: <20250114144454.16bc139e@kernel.org> (raw)
In-Reply-To: <20250110102705.21846-3-mengyuanlou@net-swift.com>
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
next prev parent reply other threads:[~2025-01-14 22:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-10 10:26 [PATCH net-next v6 0/6] add sriov support for wangxun NICs Mengyuan Lou
2025-01-10 10:27 ` [PATCH net-next v6 1/6] net: libwx: Add malibox api for wangxun pf drivers Mengyuan Lou
2025-01-10 22:06 ` Bjorn Helgaas
2025-01-10 10:27 ` [PATCH net-next v6 2/6] net: libwx: Add sriov api for wangxun nics Mengyuan Lou
2025-01-14 22:44 ` Jakub Kicinski [this message]
2025-01-16 9:37 ` mengyuanlou
2025-01-10 10:27 ` [PATCH net-next v6 3/6] net: libwx: Redesign flow when sriov is enabled Mengyuan Lou
2025-01-10 10:27 ` [PATCH net-next v6 4/6] net: libwx: Add msg task func Mengyuan Lou
2025-01-10 10:27 ` [PATCH net-next v6 5/6] net: ngbe: add sriov function support Mengyuan Lou
2025-01-10 10:27 ` [PATCH net-next v6 6/6] net: txgbe: " Mengyuan Lou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250114144454.16bc139e@kernel.org \
--to=kuba@kernel.org \
--cc=duanqiangwen@net-swift.com \
--cc=helgaas@kernel.org \
--cc=jiawenwu@trustnetic.com \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.