Re: [PATCH] PCI: handle pci_sriov_set_totalvfs(dev, 0)

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

 



On 31/07/14 18:55, Alexander Duyck wrote:
> It sounds reasonable.  My only real concern is the fact that the error
> reported when attempting to enable the interface will be a ERANGE when
> really a more appropriate error return might be something like a EBUSY
> since it is the vswitch that is occupied.
>
> You might want to take a look at modifying sriov_numvfs_store so that if
> the only option is 0 you return EBUSY for all non-zero values requested.
>  This way it will be more in sync with how we handle the case of
> attempting to update the number of VFs when SR-IOV is already enabled.
Seems mostly reasonable for sfc, but I wonder if EBUSY would necessarily
be appropriate for all devices.  Other devices might have other reasons
why their driver_max_VFs is zero.
So I think it's best to leave it as ERANGE - the proximate reason why
numvfs can't be set is because totalvfs is 0; for the reason why
totalvfs is 0, user can look at the logs.
But I'm open to being persuaded otherwise.

-Edward
The information contained in this message is confidential and is intended for the addressee(s) only. If you have received this message in error, please notify the sender immediately and delete the message. Unless you are an addressee (or authorized to receive for an addressee), you may not use, copy or disclose to anyone this message or any information contained in this message. The unauthorized use, disclosure, copying or alteration of this message is strictly prohibited.
--
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