[v2] linux/igb_uio: add Makefile to build the kernel module

Message ID 1601914708-27552-1-git-send-email-hariprasad.govindharajan@intel.com (mailing list archive)
State Superseded, archived
Headers
Series [v2] linux/igb_uio: add Makefile to build the kernel module |

Checks

Context Check Description
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Hariprasad Govindharajan Oct. 5, 2020, 4:18 p.m. UTC
  With DPDK 20.11 release, the igb_uio module is no more part of DPDK.
There are use cases where this module is required, for example while
testing the virtual ports in OvS, the virtual ports are bound to
igb_uio module inside a VM. So, this patch provides a Makefile
which can be used to build this module and use as needed.

Before building this module, the user is expected to build the
DPDK using meson build system and make sure that the required
libraries are installed in the path /usr/local

The source code for igb_uio module is available in this git repository
https://git.dpdk.org/dpdk-kmods/. Once this repository is cloned, the
module can be built using this Makefile

Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
---
 linux/igb_uio/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 linux/igb_uio/Makefile
  

Comments

Ferruh Yigit Oct. 5, 2020, 4:26 p.m. UTC | #1
On 10/5/2020 5:18 PM, Hariprasad Govindharajan wrote:
> With DPDK 20.11 release, the igb_uio module is no more part of DPDK.
> There are use cases where this module is required, for example while
> testing the virtual ports in OvS, the virtual ports are bound to
> igb_uio module inside a VM. So, this patch provides a Makefile
> which can be used to build this module and use as needed.
> 
> Before building this module, the user is expected to build the
> DPDK using meson build system and make sure that the required
> libraries are installed in the path /usr/local
> 
> The source code for igb_uio module is available in this git repository
> https://git.dpdk.org/dpdk-kmods/. Once this repository is cloned, the
> module can be built using this Makefile

Can you update patch title as [DPDK-KMOD PATCH v#] to highlight the target repo 
is different?

> 
> Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan@intel.com>
> ---
>   linux/igb_uio/Makefile | 8 ++++++++
>   1 file changed, 8 insertions(+)
>   create mode 100644 linux/igb_uio/Makefile
> 
> diff --git a/linux/igb_uio/Makefile b/linux/igb_uio/Makefile
> new file mode 100644
> index 0000000..fc5cefc
> --- /dev/null
> +++ b/linux/igb_uio/Makefile
> @@ -0,0 +1,8 @@
> +DPDK_HEADERS ?= /usr/local/include
> +RTE_KERNELDIR ?= `uname -r`

Can you please use the variable for full path, so that the user can set a custom 
path for kernel directory. Like:

RTE_KERNELDIR ?= /lib/modules/$(RTE_KERNELDIR)/build/

make EXTRA_CFLAGS="-I $(DPDK_HEADERS)" -C $(RTE_KERNELDIR) M=$(PWD)

> +
> +all:
> +		make EXTRA_CFLAGS="-I $(DPDK_HEADERS)" -C /lib/modules/$(RTE_KERNELDIR)/build/ M=$(PWD)
> +
> +clean:
> +	    make -C /lib/modules/$(RTE_KERNELDIR)/build M=$(PWD) clean
>
  
Stephen Hemminger Oct. 5, 2020, 6:27 p.m. UTC | #2
On Mon,  5 Oct 2020 17:18:28 +0100
Hariprasad Govindharajan <hariprasad.govindharajan@intel.com> wrote:

> With DPDK 20.11 release, the igb_uio module is no more part of DPDK.
> There are use cases where this module is required, for example while
> testing the virtual ports in OvS, the virtual ports are bound to
> igb_uio module inside a VM. So, this patch provides a Makefile
> which can be used to build this module and use as needed.

Why can't vfio noiommu mode be used for this OvS case?
  

Patch

diff --git a/linux/igb_uio/Makefile b/linux/igb_uio/Makefile
new file mode 100644
index 0000000..fc5cefc
--- /dev/null
+++ b/linux/igb_uio/Makefile
@@ -0,0 +1,8 @@ 
+DPDK_HEADERS ?= /usr/local/include
+RTE_KERNELDIR ?= `uname -r`
+
+all:
+		make EXTRA_CFLAGS="-I $(DPDK_HEADERS)" -C /lib/modules/$(RTE_KERNELDIR)/build/ M=$(PWD)
+
+clean:
+	    make -C /lib/modules/$(RTE_KERNELDIR)/build M=$(PWD) clean