[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200310144334.3fcbd4a8@kicinski-fedora-PC1C0HJN>
Date: Tue, 10 Mar 2020 14:43:34 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: sunil.kovvuri@...il.com
Cc: netdev@...r.kernel.org, davem@...emloft.net,
Sunil Goutham <sgoutham@...vell.com>,
Tomasz Duszynski <tduszynski@...vell.com>,
Subbaraya Sundeep <sbhatta@...vell.com>,
Christina Jacob <cjacob@...vell.com>
Subject: Re: [PATCH net-next 1/6] octeontx2-pf: Enable SRIOV and added VF
mbox handling
On Wed, 11 Mar 2020 00:17:20 +0530 sunil.kovvuri@...il.com wrote:
> @@ -1313,6 +1701,61 @@ static int otx2_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> return err;
> }
>
> +static int otx2_sriov_enable(struct pci_dev *pdev, int numvfs)
> +{
> + struct net_device *netdev = pci_get_drvdata(pdev);
> + struct otx2_nic *pf = netdev_priv(netdev);
> + int ret;
> +
> + if (numvfs > pf->total_vfs)
> + numvfs = pf->total_vfs;
Core should do this kind of checking for you, please remove.
Powered by blists - more mailing lists