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 12:58:59AM +0800, Greg KH wrote:
> On Wed, Nov 26, 2008 at 10:21:56PM +0800, Yu Zhao wrote:
> > +			my_mac_addr[5] = (unsigned char)i;
> > +			igb_set_vf_mac(netdev, i, my_mac_addr);
> > +			igb_set_vf_vmolr(adapter, i);
> > +		}
> > +	} else
> > +		printk(KERN_INFO "SR-IOV is disabled\n");
> 
> Is that really true?  (oh, use dev_info as well.)  What happens if you
> had called this with "5" and then later with "0", you never destroyed
> those existing virtual functions, yet the code does:
> 
> > +	adapter->vfs_allocated_count = nr_virtfn;
> 
> Which makes the driver think they are not present.  What happens when
> the driver later goes to shut down?  Are those resources freed up
> properly?

For now we hard-code the tx/rx queues allocation so this doesn't
matter. Eventually this will become dynamic allocation: when number
of VFs changes the corresponding resources need to be freed.

I'll put more comments here.

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