lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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