> -----Original Message-----
> From: Zhang, Tianfei <[email protected]>
> Sent: Friday, August 2, 2019 3:36 PM
> To: Jerin Jacob Kollanukkaran <[email protected]>; Xu, Rosen
> <[email protected]>; [email protected]
> Cc: Yigit, Ferruh <[email protected]>; Pei, Andy <[email protected]>;
> Lomartire, David <[email protected]>; Zhang, Qi Z
> <[email protected]>; Ye, Xiaolong <[email protected]>
> Subject: [EXT] RE: [dpdk-dev] [PATCH v2 02/12] raw/ifpga_rawdev/base: add
> irq support
>
> > > +
> > > +/* only support msix for now*/
> > > +static int vfio_msix_enable_block(s32 vfio_dev_fd, unsigned int
> vec_start,
> > > + unsigned int count, s32 *fds)
> >
> > Isn't better to use generic EAL function for the same?
>
> In our PAC N3000 Card, we have 6 PCIe MSI-X vectors, for example:
> 0~3 for AFU
> 4 for Port
> 6 for FME
>
> FME (FPGA Management Engine ) will manage all resources in FPGA, like
> partition reconfiguration, Power manager, thermal, Error reporting.
> Port is a bridge between FME and AFU.
> AFU is the accelerator unit which for customers logic.
>
> So, we reserve some MSI-X vectors for end-user/customers to use the AFU,
> and end-user/customers can use the AFU for networking acceleration or
> other acceleration.
>
> The DPDK existing API like rte_intr_enable()->vfio_enable_msix() will bind all
> of the vectors at the same time and those vectors will register into one
> evenfd and one interrupt handler function.
> That cannot satisfy our design. we hope that, each MSI-X vector bind into
> VFIO and register the interrupt handler function separately. Because the
> reserve vectors like
> 0~3 vectors for AFU, we don't know what exact usage for the end-
> user/customers in AFU logic, so it had better let them bind VFIO and register
> interrupt handler themselves.
>
> One suggestion is we expand the vfio_enable_msix() function, let the caller
> to specify the start vector and the numbers of vectors to bind the VFIO.
Yes, Probably have two variants, vfio_enable_msix() alias to count of 1
> static int
> vfio_enable_msix(const struct rte_intr_handle *intr_handle, int start, int
> count) {
> ...
> irq_set->count = count;
> irq_set->start = start;
> ...
> return 0;
> }
>