[dpdk-dev,v14,01/13] eal/linux: add interrupt vectors support in intr_handle

Message ID 1437113775-32199-2-git-send-email-cunming.liang@intel.com (mailing list archive)
State Changes Requested, archived
Headers

Commit Message

Cunming Liang July 17, 2015, 6:16 a.m. UTC
  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>
---
v14 changes
 - per-patch basis ABI compatibility rework

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.

 .../linuxapp/eal/include/exec-env/rte_interrupts.h          | 13 +++++++++++++
 1 file changed, 13 insertions(+)
  

Comments

Thomas Monjalon July 19, 2015, 11:31 p.m. UTC | #1
2015-07-17 14:16, Cunming Liang:
> +#ifdef RTE_NEXT_ABI
> +	/**
> +	 * RTE_NEXT_ABI will be removed from v2.2.
> +	 * It's only used to avoid ABI(unannounced) broken in v2.1.
> +	 * Make sure being aware of the impact before turning on the feature.
> +	 */

We are not going to put this comment each time NEXT_ABI is used with ifdef.
  
Cunming Liang July 20, 2015, 2:02 a.m. UTC | #2
On 7/20/2015 7:31 AM, Thomas Monjalon wrote:
> 2015-07-17 14:16, Cunming Liang:
>> +#ifdef RTE_NEXT_ABI
>> +	/**
>> +	 * RTE_NEXT_ABI will be removed from v2.2.
>> +	 * It's only used to avoid ABI(unannounced) broken in v2.1.
>> +	 * Make sure being aware of the impact before turning on the feature.
>> +	 */
> We are not going to put this comment each time NEXT_ABI is used with ifdef.
Ok, will remove the comment.
  

Patch

diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h
index bdeb3fc..12b33c9 100644
--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h
+++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h
@@ -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,17 @@  struct rte_intr_handle {
 	};
 	int fd;	 /**< interrupt event file descriptor */
 	enum rte_intr_handle_type type;  /**< handle type */
+#ifdef RTE_NEXT_ABI
+	/**
+	 * RTE_NEXT_ABI will be removed from v2.2.
+	 * It's only used to avoid ABI(unannounced) broken in v2.1.
+	 * Make sure being aware of the impact before turning on the feature.
+	 */
+	uint32_t max_intr;             /**< max interrupt requested */
+	uint32_t nb_efd;               /**< number of available efd(event fd) */
+	int efds[RTE_MAX_RXTX_INTR_VEC_ID];  /**< intr vectors/efds mapping */
+	int *intr_vec;                 /**< intr vector number array */
+#endif
 };
 
 #endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */