[dpdk-dev] [prefix=DPDK_KMODS v6 1/2] linux/igb_uio: remove DPDK dependency for building igb_uio

Hariprasad Govindharajan hariprasad.govindharajan at intel.com
Thu Oct 29 21:10:50 CET 2020


The igb_uio source code requires interrupt modes defined as
MACROS and enums in the header file rte_pci_dev_features.h.
Now, the definitions are moved to the igb_uio.c file so that
this module can be built without building DPDK

Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan at intel.com>
---
 linux/igb_uio/igb_uio.c | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
index 039f5a5..84c3071 100644
--- a/linux/igb_uio/igb_uio.c
+++ b/linux/igb_uio/igb_uio.c
@@ -15,7 +15,25 @@
 #include <linux/version.h>
 #include <linux/slab.h>
 
-#include <rte_pci_dev_features.h>
+/**
+ * These enums and MACRO definitions are copied from the
+ * file rte_pci_dev_features.h
+ */
+
+/* interrupt mode */
+
+enum rte_intr_mode {
+	RTE_INTR_MODE_NONE = 0,
+	RTE_INTR_MODE_LEGACY,
+	RTE_INTR_MODE_MSI,
+	RTE_INTR_MODE_MSIX
+};
+
+#define RTE_INTR_MODE_NONE_NAME "none"
+#define RTE_INTR_MODE_LEGACY_NAME "legacy"
+#define RTE_INTR_MODE_MSI_NAME "msi"
+#define RTE_INTR_MODE_MSIX_NAME "msix"
+
 
 #include "compat.h"
 
-- 
2.7.4



More information about the dev mailing list