[PATCH v4 3/4] bus/cdx: add support for MSI

Gupta, Nipun Nipun.Gupta at amd.com
Wed May 24 19:06:05 CEST 2023


[AMD Official Use Only - General]

> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Wednesday, May 24, 2023 4:37 PM
> To: Gupta, Nipun <Nipun.Gupta at amd.com>
> Cc: dev at dpdk.org; david.marchand at redhat.com; Yigit, Ferruh
> <Ferruh.Yigit at amd.com>; Anand, Harpreet <harpreet.anand at amd.com>;
> Agarwal, Nikhil <nikhil.agarwal at amd.com>
> Subject: Re: [PATCH v4 3/4] bus/cdx: add support for MSI
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> 08/05/2023 13:18, Nipun Gupta:
> > MSI's are exposed to the devices using VFIO (vfio-cdx). This
> > patch uses the same to add support for MSI for the devices on
> > the cdx bus.
> >
> > A couple of API's have been introduced in the EAL interrupt
> > framework:
> > - rte_intr_irq_count_set: This API is used to set the total
> >     interrupts on the interrupt handle. This would be provided
> >     by VFIO (irq.count) for VFIO enabled devices.
> > - rte_intr_irq_count_get: This API returns the total number
> >     interrupts which were set.
> [...]
> > --- a/lib/eal/common/eal_interrupts.h
> > +++ b/lib/eal/common/eal_interrupts.h
> > @@ -16,6 +16,7 @@ struct rte_intr_handle {
> >       };
> >       uint32_t alloc_flags;   /**< flags passed at allocation */
> >       enum rte_intr_handle_type type;  /**< handle type */
> > +     uint32_t irq_count;             /**< IRQ count provided via VFIO */
>
> Why only via VFIO?

Though this represents total number of irq count, for VFIO it is returned by
VFIO_DEVICE_GET_IRQ_INFO ioctl call. I am not sure about UIO, so added
Comment w.r.t. VFIO only. I will make it generic in next spin.

>
> [...]
> > +/**
> > + * @internal
> > + * Set the irq count field of interrupt handle with user
> > + * provided irq count value.
> > + *
> > + * @param intr_handle
> > + *  pointer to the interrupt handle.
> > + * @param irq_count
> > + *  IRQ count
>
> Please write IRQ all uppercase consistently.
> Same for CDX.

Sure.

>
> > +     rte_intr_irq_count_get;
> > +     rte_intr_irq_count_set;
>
> Adding a new API in EAL deserves a separate commit with a different audience.
> It looks like it has been hidden from EAL reviewers eyes so far.

Will make a separate commit for this.

Thanks,
Nipun


More information about the dev mailing list