[dpdk-dev,v15,08/13] eal/bsd: dummy for new intr definition
Commit Message
To make bsd compiling happy with new intr changes.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
---
v15 changes
- remove ifdef RTE_NEXT_ABI from header file
v14 changes
- per-patch basis ABI compatibility rework
v13 changes
- version map cleanup for v2.1
v12 changes
- fix unused variables compiling warning
v8 changes
- add stub for new function
v7 changes
- remove stub 'linux only' function from source file
lib/librte_eal/bsdapp/eal/eal_interrupts.c | 42 +++++++++++++
.../bsdapp/eal/include/exec-env/rte_interrupts.h | 68 ++++++++++++++++++++++
lib/librte_eal/bsdapp/eal/rte_eal_version.map | 5 ++
3 files changed, 115 insertions(+)
Comments
2015-07-20 11:02, Cunming Liang:
> To make bsd compiling happy with new intr changes.
>
> Signed-off-by: Cunming Liang <cunming.liang@intel.com>
The dummy BSD functions must be added along the Linux ones to avoid
breaking BSD build in the middle of the series.
@@ -68,3 +68,45 @@ rte_eal_intr_init(void)
{
return 0;
}
+
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+ int epfd, int op, unsigned int vec, void *data)
+{
+ RTE_SET_USED(intr_handle);
+ RTE_SET_USED(epfd);
+ RTE_SET_USED(op);
+ RTE_SET_USED(vec);
+ RTE_SET_USED(data);
+
+ return -ENOTSUP;
+}
+
+int
+rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd)
+{
+ RTE_SET_USED(intr_handle);
+ RTE_SET_USED(nb_efd);
+
+ return 0;
+}
+
+void
+rte_intr_efd_disable(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+}
+
+int
+rte_intr_dp_is_en(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+ return 0;
+}
+
+int
+rte_intr_allow_others(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+ return 1;
+}
@@ -50,6 +50,74 @@ struct rte_intr_handle {
int fd; /**< file descriptor */
int uio_cfg_fd; /**< UIO config file descriptor */
enum rte_intr_handle_type type; /**< handle type */
+#ifdef RTE_NEXT_ABI
+ int max_intr; /**< max interrupt requested */
+ uint32_t nb_efd; /**< number of available efds */
+ int *intr_vec; /**< intr vector number array */
+#endif
};
+/**
+ * @param intr_handle
+ * Pointer to the interrupt handle.
+ * @param epfd
+ * Epoll instance fd which the intr vector associated to.
+ * @param op
+ * The operation be performed for the vector.
+ * Operation type of {ADD, DEL}.
+ * @param vec
+ * RX intr vector number added to the epoll instance wait list.
+ * @param data
+ * User raw data.
+ * @return
+ * - On success, zero.
+ * - On failure, a negative value.
+ */
+int
+rte_intr_rx_ctl(struct rte_intr_handle *intr_handle,
+ int epfd, int op, unsigned int vec, void *data);
+
+/**
+ * It enables the fastpath event fds if it's necessary.
+ * It creates event fds when multi-vectors allowed,
+ * otherwise it multiplexes the single event fds.
+ *
+ * @param intr_handle
+ * Pointer to the interrupt handle.
+ * @param nb_vec
+ * Number of interrupt vector trying to enable.
+ * @return
+ * - On success, zero.
+ * - On failure, a negative value.
+ */
+int
+rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd);
+
+/**
+ * It disable the fastpath event fds.
+ * It deletes registered eventfds and closes the open fds.
+ *
+ * @param intr_handle
+ * Pointer to the interrupt handle.
+ */
+void
+rte_intr_efd_disable(struct rte_intr_handle *intr_handle);
+
+/**
+ * The fastpath interrupt is enabled or not.
+ *
+ * @param intr_handle
+ * Pointer to the interrupt handle.
+ */
+int rte_intr_dp_is_en(struct rte_intr_handle *intr_handle);
+
+/**
+ * The interrupt handle instance allows other cause or not.
+ * Other cause stands for none fastpath interrupt.
+ *
+ * @param intr_handle
+ * Pointer to the interrupt handle.
+ */
+int rte_intr_allow_others(struct rte_intr_handle *intr_handle);
+
#endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */
@@ -116,6 +116,11 @@ DPDK_2.1 {
global:
rte_eal_pci_detach;
+ rte_intr_allow_others;
+ rte_intr_dp_is_en;
+ rte_intr_efd_enable;
+ rte_intr_efd_disable;
+ rte_intr_rx_ctl;
rte_memzone_free;
} DPDK_2.0;