diff mbox series

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

Message ID 1604002251-43812-1-git-send-email-hariprasad.govindharajan@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series [prefix=DPDK_KMODS,v6,1/2] linux/igb_uio: remove DPDK dependency for building igb_uio | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hariprasad Govindharajan Oct. 29, 2020, 8:10 p.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 | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

Comments

Ferruh Yigit Oct. 29, 2020, 8:17 p.m. UTC | #1
On 10/29/2020 8:10 PM, 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>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon Oct. 29, 2020, 9:14 p.m. UTC | #2
29/10/2020 21:10, Hariprasad Govindharajan:
> 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 | 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

s/These/This/
s/MACRO/macro/

> + * file rte_pci_dev_features.h
> + */
> +
> +/* interrupt mode */

Useless comment, creating a barrier between previous comment
and definitions. Please remove.

> +
> +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"

I would remove the above blank lines to make clear what is from rte_pci_dev_features.h.
David Marchand Oct. 29, 2020, 9:28 p.m. UTC | #3
On Thu, Oct 29, 2020 at 9:11 PM Hariprasad Govindharajan
<hariprasad.govindharajan@intel.com> 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>

Could we agree on a prefix for dpdk kmods patches?

Something like:
$ git format-patch --subject-prefix 'PATCH dpdk-kmods' ?

This is for my mail filters O:-).
Thanks.
Thomas Monjalon Oct. 29, 2020, 9:42 p.m. UTC | #4
29/10/2020 22:28, David Marchand:
> On Thu, Oct 29, 2020 at 9:11 PM Hariprasad Govindharajan
> <hariprasad.govindharajan@intel.com> 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>
> 
> Could we agree on a prefix for dpdk kmods patches?
> 
> Something like:
> $ git format-patch --subject-prefix 'PATCH dpdk-kmods' ?

I agree with this syntax.
We can document it but I am afraid it will be hard
to make sure contributors use it.
Thomas Monjalon Oct. 30, 2020, 10:10 a.m. UTC | #5
29/10/2020 22:14, Thomas Monjalon:
> 29/10/2020 21:10, Hariprasad Govindharajan:
> > + * These enums and MACRO definitions are copied from the
> 
> s/These/This/
> s/MACRO/macro/

Sorry, after a second read in your last version,
I think "These" was good because we have enum and macros.
But maybe "enums" should be "enum" because there is only one.
diff mbox series

Patch

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"