VFIO allows multiple MSI-X vector, others doesn't, but maybe will
allow it in the future.
Device drivers need to be aware of the capability.
It's better to avoid condition check on interrupt type (VFIO) everywhere,
instead a capability api is more flexible for the condition change.
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: David Marchand <david.marchand@6wind.com>
RTE_SET_USED(intr_handle);
return 1;
}
+
+int
+rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)
+{
+ RTE_SET_USED(intr_handle);
+ return 0;
+}
*/
int rte_intr_allow_others(struct rte_intr_handle *intr_handle);
+/**
+ * The multiple interrupt vector capability of interrupt handle instance.
+ * It returns zero if no multiple interrupt vector support.
+ *
+ * @param intr_handle
+ * Pointer to the interrupt handle.
+ */
+int
+rte_intr_cap_multiple(struct rte_intr_handle *intr_handle);
+
#endif /* _RTE_BSDAPP_INTERRUPTS_H_ */
rte_memzone_free;
} DPDK_2.0;
+
+DPDK_2.2 {
+ global:
+
+ rte_intr_cap_multiple;
+
+} DPDK_2.1;
\ No newline at end of file
else
return !!(intr_handle->max_intr - intr_handle->nb_efd);
}
+
+int
+rte_intr_cap_multiple(struct rte_intr_handle *intr_handle)
+{
+ if (intr_handle->type == RTE_INTR_HANDLE_VFIO_MSIX)
+ return 1;
+
+ return 0;
+}
int
rte_intr_allow_others(struct rte_intr_handle *intr_handle);
+/**
+ * The multiple interrupt vector capability of interrupt handle instance.
+ * It returns zero if no multiple interrupt vector support.
+ *
+ * @param intr_handle
+ * Pointer to the interrupt handle.
+ */
+int
+rte_intr_cap_multiple(struct rte_intr_handle *intr_handle);
+
#endif /* _RTE_LINUXAPP_INTERRUPTS_H_ */
rte_memzone_free;
} DPDK_2.0;
+
+DPDK_2.2 {
+ global:
+
+ rte_intr_cap_multiple;
+
+} DPDK_2.1;
\ No newline at end of file