Re: [SR-IOV driver example 2/3] PF driver: integrate with SR-IOV core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 27, 2008 at 01:54:27AM +0800, Chris Wright wrote:
> * Greg KH (greg@xxxxxxxxx) 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-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux