[dpdk-kmods,v8,1/2] linux/igb_uio: remove DPDK dependency for building igb_uio

Message ID 1604055169-47580-1-git-send-email-hariprasad.govindharajan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [dpdk-kmods,v8,1/2] linux/igb_uio: remove DPDK dependency for building igb_uio |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hariprasad Govindharajan Oct. 30, 2020, 10:52 a.m. UTC
  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@intel.com>
---
 linux/igb_uio/igb_uio.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit Oct. 30, 2020, 11:03 a.m. UTC | #1
On 10/30/2020 10:52 AM, Hariprasad Govindharajan wrote:
> 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@intel.com>

For series,
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Thomas Monjalon Oct. 30, 2020, 11:28 a.m. UTC | #2
30/10/2020 12:03, Ferruh Yigit:
> On 10/30/2020 10:52 AM, Hariprasad Govindharajan wrote:
> > 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@intel.com>
> 
> For series,
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks

Now we can remove the file
lib/librte_eal/include/rte_pci_dev_features.h
which was used only by igb_uio.

Candidate for the patch?
  

Patch

diff --git a/linux/igb_uio/igb_uio.c b/linux/igb_uio/igb_uio.c
index 3cf394b..fe7039c 100644
--- a/linux/igb_uio/igb_uio.c
+++ b/linux/igb_uio/igb_uio.c
@@ -15,7 +15,21 @@ 
 #include <linux/version.h>
 #include <linux/slab.h>
 
-#include <rte_pci_dev_features.h>
+/**
+ * These enum and macro definitions are copied from the
+ * file rte_pci_dev_features.h
+ */
+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"