[v4,3/4] pci: add req handler field to generic pci device
Checks
Commit Message
There are some extended interrupt types in vfio pci device except from the
existing interrupts, such as err and req notifier, they 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>
---
v4->v3:
no change.
---
drivers/bus/pci/rte_bus_pci.h | 1 +
1 file changed, 1 insertion(+)
Comments
04/10/2018 08:44, Jeff Guo:
> There are some extended interrupt types in vfio pci device except from the
> existing interrupts, such as err and req notifier, they 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>
> --- 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 */
We had intr_handle, should we name this one req_notifier_handle?
May we improve the comment to better explain? (and add a space before)
Maybe we need to update the comment of the other handle?
struct rte_intr_handle intr_handle; /**< Interrupt handle */
15/10/2018 11:12, Thomas Monjalon:
> 04/10/2018 08:44, Jeff Guo:
> > There are some extended interrupt types in vfio pci device except from the
> > existing interrupts, such as err and req notifier, they 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>
>
> > --- 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 */
>
> We had intr_handle, should we name this one req_notifier_handle?
> May we improve the comment to better explain? (and add a space before)
On IRC, we agreed on this name/comment:
struct rte_intr_handle vfio_req_intr_handle; /**< Handler of VFIO request interrupt */
> Maybe we need to update the comment of the other handle?
> struct rte_intr_handle intr_handle; /**< Interrupt handle */
OK to keep this one as-is.
@@ -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 */
};
/**