[dpdk-dev,v13,01/14] eal/linux: add interrupt vectors support in intr_handle
Commit Message
The patch adds interrupt vectors support in rte_intr_handle.
'vec_en' is set when interrupt vectors are detected and associated event fds are set.
Those event fds are stored in efds[].
'intr_vec' is reserved for device driver to initialize the vector mapping table.
Signed-off-by: Danny Zhou <danny.zhou@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
---
v7 changes:
- add eptrs[], it's used to store the register rte_epoll_event instances.
- add vec_en, to log the vector capability status.
v6 changes:
- add mapping table between irq vector number and queue id.
v5 changes:
- Create this new patch file for changed struct rte_intr_handle that
other patches depend on, to avoid breaking git bisect.
lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h | 6 ++++++
1 file changed, 6 insertions(+)
Comments
2015-06-19 12:00, Cunming Liang:
> @@ -58,6 +60,10 @@ struct rte_intr_handle {
> };
> int fd; /**< interrupt event file descriptor */
> enum rte_intr_handle_type type; /**< handle type */
> + uint32_t max_intr; /**< max interrupt requested */
> + uint32_t nb_efd; /**< number of available efds */
> + int efds[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vectors/efds mapping */
efd is not defined in these comments.
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, July 14, 2015 12:41 AM
> To: Liang, Cunming
> Cc: dev@dpdk.org; shemming@brocade.com; david.marchand@6wind.com;
> Zhou, Danny; Wang, Liang-min; Richardson, Bruce; Liu, Yong;
> nhorman@tuxdriver.com
> Subject: Re: [PATCH v13 01/14] eal/linux: add interrupt vectors support in
> intr_handle
>
> 2015-06-19 12:00, Cunming Liang:
> > @@ -58,6 +60,10 @@ struct rte_intr_handle {
> > };
> > int fd; /**< interrupt event file descriptor */
> > enum rte_intr_handle_type type; /**< handle type */
> > + uint32_t max_intr; /**< max interrupt requested */
> > + uint32_t nb_efd; /**< number of available efds */
> > + int efds[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vectors/efds mapping
> */
>
> efd is not defined in these comments.
>
Will expand abbreviation in comments, thanks.
@@ -38,6 +38,8 @@
#ifndef _RTE_LINUXAPP_INTERRUPTS_H_
#define _RTE_LINUXAPP_INTERRUPTS_H_
+#define RTE_MAX_RXTX_INTR_VEC_ID 32
+
enum rte_intr_handle_type {
RTE_INTR_HANDLE_UNKNOWN = 0,
RTE_INTR_HANDLE_UIO, /**< uio device handle */
@@ -58,6 +60,10 @@ struct rte_intr_handle {
};
int fd; /**< interrupt event file descriptor */
enum rte_intr_handle_type type; /**< handle type */
+ uint32_t max_intr; /**< max interrupt requested */
+ uint32_t nb_efd; /**< number of available efds */
+ int efds[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vectors/efds mapping */
+ int *intr_vec; /**< intr vector number array */
};
#endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */