Patchwork [3/5] PCI: add set_max_vfs in pci_driver ops

login
register
mail settings
Submitter Yinghai Lu
Date Oct. 3, 2012, 5:51 p.m.
Message ID <1349286695-26713-4-git-send-email-yinghai@kernel.org>
Download mbox | patch
Permalink /patch/188880/
State Superseded
Headers show

Comments

Yinghai Lu - Oct. 3, 2012, 5:51 p.m.
Will use it enable sriov for pci devices.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
 include/linux/pci.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Don Dutile - Oct. 3, 2012, 6:55 p.m.
On 10/03/2012 01:51 PM, Yinghai Lu wrote:
> Will use it enable sriov for pci devices.
>
> Signed-off-by: Yinghai Lu<yinghai@kernel.org>
> ---
>   include/linux/pci.h |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index be1de01..7d70a5e 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -590,6 +590,7 @@ struct pci_driver {
>   	const struct pci_device_id *id_table;	/* must be non-NULL for probe to be called */
>   	int  (*probe)  (struct pci_dev *dev, const struct pci_device_id *id);	/* New device inserted */
>   	void (*remove) (struct pci_dev *dev);	/* Device removed (NULL if not a hot-plug capable driver) */
> +	void (*set_max_vfs) (struct pci_dev *dev); /* enable sriov */
>   	int  (*suspend) (struct pci_dev *dev, pm_message_t state);	/* Device suspended */
>   	int  (*suspend_late) (struct pci_dev *dev, pm_message_t state);
>   	int  (*resume_early) (struct pci_dev *dev);

I thought I stated the following in your earlier patch set....

(a) don't use 'set_max_vfs' ;  it is not changing the max; the max
     is whatever the device supports. This kind of terminology confuses
     what is being done, and not descripting what is being done.
(b) this is equiv to the sriov_enable_vfs in the RFC set I sent.
     -- in this set, it prevents the user trying to do more than one enable,
        and that check should be done, and reject the request, which solves one
        of the complaints Alexander had.

I'll try to mind-meld your sysfs attr creation patches to mind later today
and post a new series tonight or tomorrow.  Sorry, stuck in mtgs today (and right now!),
thus the delay.

- Don

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yinghai Lu - Oct. 3, 2012, 8:41 p.m.
On Wed, Oct 3, 2012 at 11:55 AM, Don Dutile <ddutile@redhat.com> wrote:
> On 10/03/2012 01:51 PM, Yinghai Lu wrote:
>>
>> Will use it enable sriov for pci devices.
>>
>> Signed-off-by: Yinghai Lu<yinghai@kernel.org>
>> ---
>>   include/linux/pci.h |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/linux/pci.h b/include/linux/pci.h
>> index be1de01..7d70a5e 100644
>> --- a/include/linux/pci.h
>> +++ b/include/linux/pci.h
>> @@ -590,6 +590,7 @@ struct pci_driver {
>>         const struct pci_device_id *id_table;   /* must be non-NULL for
>> probe to be called */
>>         int  (*probe)  (struct pci_dev *dev, const struct pci_device_id
>> *id);   /* New device inserted */
>>         void (*remove) (struct pci_dev *dev);   /* Device removed (NULL if
>> not a hot-plug capable driver) */
>> +       void (*set_max_vfs) (struct pci_dev *dev); /* enable sriov */
>>         int  (*suspend) (struct pci_dev *dev, pm_message_t state);      /*
>> Device suspended */
>>         int  (*suspend_late) (struct pci_dev *dev, pm_message_t state);
>>         int  (*resume_early) (struct pci_dev *dev);
>
>
> I thought I stated the following in your earlier patch set....
>
> (a) don't use 'set_max_vfs' ;  it is not changing the max; the max
>     is whatever the device supports. This kind of terminology confuses
>     what is being done, and not descripting what is being done.
> (b) this is equiv to the sriov_enable_vfs in the RFC set I sent.
>     -- in this set, it prevents the user trying to do more than one enable,
>        and that check should be done, and reject the request, which solves
> one
>        of the complaints Alexander had.
>
> I'll try to mind-meld your sysfs attr creation patches to mind later today
> and post a new series tonight or tomorrow.  Sorry, stuck in mtgs today (and
> right now!),
> thus the delay.

Sure. please update 3, 4 as your like, and ask greg.rose work on patch 5.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Don Dutile - Oct. 3, 2012, 9:02 p.m.
On 10/03/2012 04:41 PM, Yinghai Lu wrote:
> On Wed, Oct 3, 2012 at 11:55 AM, Don Dutile<ddutile@redhat.com>  wrote:
>> On 10/03/2012 01:51 PM, Yinghai Lu wrote:
>>>
>>> Will use it enable sriov for pci devices.
>>>
>>> Signed-off-by: Yinghai Lu<yinghai@kernel.org>
>>> ---
>>>    include/linux/pci.h |    1 +
>>>    1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/include/linux/pci.h b/include/linux/pci.h
>>> index be1de01..7d70a5e 100644
>>> --- a/include/linux/pci.h
>>> +++ b/include/linux/pci.h
>>> @@ -590,6 +590,7 @@ struct pci_driver {
>>>          const struct pci_device_id *id_table;   /* must be non-NULL for
>>> probe to be called */
>>>          int  (*probe)  (struct pci_dev *dev, const struct pci_device_id
>>> *id);   /* New device inserted */
>>>          void (*remove) (struct pci_dev *dev);   /* Device removed (NULL if
>>> not a hot-plug capable driver) */
>>> +       void (*set_max_vfs) (struct pci_dev *dev); /* enable sriov */
>>>          int  (*suspend) (struct pci_dev *dev, pm_message_t state);      /*
>>> Device suspended */
>>>          int  (*suspend_late) (struct pci_dev *dev, pm_message_t state);
>>>          int  (*resume_early) (struct pci_dev *dev);
>>
>>
>> I thought I stated the following in your earlier patch set....
>>
>> (a) don't use 'set_max_vfs' ;  it is not changing the max; the max
>>      is whatever the device supports. This kind of terminology confuses
>>      what is being done, and not descripting what is being done.
>> (b) this is equiv to the sriov_enable_vfs in the RFC set I sent.
>>      -- in this set, it prevents the user trying to do more than one enable,
>>         and that check should be done, and reject the request, which solves
>> one
>>         of the complaints Alexander had.
>>
>> I'll try to mind-meld your sysfs attr creation patches to mind later today
>> and post a new series tonight or tomorrow.  Sorry, stuck in mtgs today (and
>> right now!),
>> thus the delay.
>
> Sure. please update 3, 4 as your like, and ask greg.rose work on patch 5.
>
Exactly what I'm doing now.
Thanks for the initial patch split of 1 & 2.
I *think* I understand how the generic framework works for
visible/invisible attributes now works! :)

> Thanks
>
> Yinghai
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index be1de01..7d70a5e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -590,6 +590,7 @@  struct pci_driver {
 	const struct pci_device_id *id_table;	/* must be non-NULL for probe to be called */
 	int  (*probe)  (struct pci_dev *dev, const struct pci_device_id *id);	/* New device inserted */
 	void (*remove) (struct pci_dev *dev);	/* Device removed (NULL if not a hot-plug capable driver) */
+	void (*set_max_vfs) (struct pci_dev *dev); /* enable sriov */
 	int  (*suspend) (struct pci_dev *dev, pm_message_t state);	/* Device suspended */
 	int  (*suspend_late) (struct pci_dev *dev, pm_message_t state);
 	int  (*resume_early) (struct pci_dev *dev);