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  linux-cve-announce  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]
Message-ID: <20081201164622.GC1464@yzhao12-linux.sh.intel.com>
Date:	Tue, 2 Dec 2008 00:46:22 +0800
From:	Yu Zhao <yu.zhao@...el.com>
To:	Chris Wright <chrisw@...s-sol.org>
Cc:	Greg KH <greg@...ah.com>,
	"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"matthew@....cx" <matthew@....cx>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"virtualization@...ts.linux-foundation.org" 
	<virtualization@...ts.linux-foundation.org>
Subject: Re: [SR-IOV driver example 2/3] PF driver: integrate with SR-IOV
	core

On Thu, Nov 27, 2008 at 01:54:27AM +0800, Chris Wright wrote:
> * Greg KH (greg@...ah.com) wrote:
> > > +static	int
> > > +igb_virtual(struct pci_dev *pdev, int nr_virtfn)
> > > +{
> > > +	unsigned char my_mac_addr[6] = {0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0xFF};
> > > +	struct net_device *netdev = pci_get_drvdata(pdev);
> > > +	struct igb_adapter *adapter = netdev_priv(netdev);
> > > +	int i;
> > > +
> > > +	if (nr_virtfn > 7)
> > > +		return -EINVAL;
> > 
> > Why the check for 7?  Is that the max virtual functions for this card?
> > Shouldn't that be a define somewhere so it's easier to fix in future
> > versions of this hardware?  :)
> 
> IIRC it's 8 for the card, 1 reserved for PF.  I think both notions
> should be captured w/ commented constants.

You remember correctly! I'll put some comments there as suggested.

Thanks,
Yu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ