[v1,4/5] pci: add req handler field to generic pci device

Message ID 1534503091-31910-5-git-send-email-jia.guo@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Enable hotplug in vfio |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Guo, Jia Aug. 17, 2018, 10:51 a.m. UTC
  There are some extended interrupt types in vfio pci device except from the
existing interrupts, such as err and req notifier, it could be useful for
device error monitoring. And these corresponding interrupt handler is
different from the other interrupt handler that register in PMDs, so a new
interrupt handler should be added. This patch will add specific req handler
in generic pci device.

Signed-off-by: Jeff Guo <jia.guo@intel.com>
---
 drivers/bus/pci/rte_bus_pci.h | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Burakov, Anatoly Sept. 26, 2018, 12:22 p.m. UTC | #1
On 17-Aug-18 11:51 AM, Jeff Guo wrote:
> There are some extended interrupt types in vfio pci device except from the
> existing interrupts, such as err and req notifier, it could be useful for
> device error monitoring. And these corresponding interrupt handler is
> different from the other interrupt handler that register in PMDs, so a new
> interrupt handler should be added. This patch will add specific req handler
> in generic pci device.
> 
> Signed-off-by: Jeff Guo <jia.guo@intel.com>
> ---
>   drivers/bus/pci/rte_bus_pci.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h
> index 0d1955f..c45a820 100644
> --- a/drivers/bus/pci/rte_bus_pci.h
> +++ b/drivers/bus/pci/rte_bus_pci.h
> @@ -66,6 +66,7 @@ struct rte_pci_device {
>   	uint16_t max_vfs;                   /**< sriov enable if not zero */
>   	enum rte_kernel_driver kdrv;        /**< Kernel driver passthrough */
>   	char name[PCI_PRI_STR_SIZE+1];      /**< PCI location (ASCII) */
> +	struct rte_intr_handle req_notifier_handler;/**< Req notifier handle */
>   };
>   
>   /**
> 

Does this break ABI?
  
Guo, Jia Sept. 29, 2018, 6:15 a.m. UTC | #2
On 9/26/2018 8:22 PM, Burakov, Anatoly wrote:
> On 17-Aug-18 11:51 AM, Jeff Guo wrote:
>> There are some extended interrupt types in vfio pci device except 
>> from the
>> existing interrupts, such as err and req notifier, it could be useful 
>> for
>> device error monitoring. And these corresponding interrupt handler is
>> different from the other interrupt handler that register in PMDs, so 
>> a new
>> interrupt handler should be added. This patch will add specific req 
>> handler
>> in generic pci device.
>>
>> Signed-off-by: Jeff Guo <jia.guo@intel.com>
>> ---
>>   drivers/bus/pci/rte_bus_pci.h | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/bus/pci/rte_bus_pci.h 
>> b/drivers/bus/pci/rte_bus_pci.h
>> index 0d1955f..c45a820 100644
>> --- a/drivers/bus/pci/rte_bus_pci.h
>> +++ b/drivers/bus/pci/rte_bus_pci.h
>> @@ -66,6 +66,7 @@ struct rte_pci_device {
>>       uint16_t max_vfs;                   /**< sriov enable if not 
>> zero */
>>       enum rte_kernel_driver kdrv;        /**< Kernel driver 
>> passthrough */
>>       char name[PCI_PRI_STR_SIZE+1];      /**< PCI location (ASCII) */
>> +    struct rte_intr_handle req_notifier_handler;/**< Req notifier 
>> handle */
>>   };
>>     /**
>>
>
> Does this break ABI?
>

If add a variable in struct would break ABI, it does.
  
Burakov, Anatoly Oct. 1, 2018, 7:51 a.m. UTC | #3
On 29-Sep-18 7:15 AM, Jeff Guo wrote:
> 
> On 9/26/2018 8:22 PM, Burakov, Anatoly wrote:
>> On 17-Aug-18 11:51 AM, Jeff Guo wrote:
>>> There are some extended interrupt types in vfio pci device except 
>>> from the
>>> existing interrupts, such as err and req notifier, it could be useful 
>>> for
>>> device error monitoring. And these corresponding interrupt handler is
>>> different from the other interrupt handler that register in PMDs, so 
>>> a new
>>> interrupt handler should be added. This patch will add specific req 
>>> handler
>>> in generic pci device.
>>>
>>> Signed-off-by: Jeff Guo <jia.guo@intel.com>
>>> ---
>>>   drivers/bus/pci/rte_bus_pci.h | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/bus/pci/rte_bus_pci.h 
>>> b/drivers/bus/pci/rte_bus_pci.h
>>> index 0d1955f..c45a820 100644
>>> --- a/drivers/bus/pci/rte_bus_pci.h
>>> +++ b/drivers/bus/pci/rte_bus_pci.h
>>> @@ -66,6 +66,7 @@ struct rte_pci_device {
>>>       uint16_t max_vfs;                   /**< sriov enable if not 
>>> zero */
>>>       enum rte_kernel_driver kdrv;        /**< Kernel driver 
>>> passthrough */
>>>       char name[PCI_PRI_STR_SIZE+1];      /**< PCI location (ASCII) */
>>> +    struct rte_intr_handle req_notifier_handler;/**< Req notifier 
>>> handle */
>>>   };
>>>     /**
>>>
>>
>> Does this break ABI?
>>
> 
> If add a variable in struct would break ABI, it does.
> 
> 

Then it probably does. So, should probably bump PCI driver ABI version?
  

Patch

diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h
index 0d1955f..c45a820 100644
--- a/drivers/bus/pci/rte_bus_pci.h
+++ b/drivers/bus/pci/rte_bus_pci.h
@@ -66,6 +66,7 @@  struct rte_pci_device {
 	uint16_t max_vfs;                   /**< sriov enable if not zero */
 	enum rte_kernel_driver kdrv;        /**< Kernel driver passthrough */
 	char name[PCI_PRI_STR_SIZE+1];      /**< PCI location (ASCII) */
+	struct rte_intr_handle req_notifier_handler;/**< Req notifier handle */
 };
 
 /**