[dpdk-dev] [PATCH] linux/igb_uio: add Makefile to build the kernel module

Ferruh Yigit ferruh.yigit at intel.com
Mon Oct 5 17:12:10 CEST 2020


On 10/5/2020 3:47 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
> 

Can you please highlight in the commit log that this is for the dpdk-kmods repo:
https://git.dpdk.org/dpdk-kmods/

> Signed-off-by: Hariprasad Govindharajan <hariprasad.govindharajan at 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..be39131
> --- /dev/null
> +++ b/linux/igb_uio/Makefile
> @@ -0,0 +1,8 @@
> +obj-m += igb_uio.o

I think we can drop this from this makefile, it is in Kbuild

> +DPDK_INSTALL=/usr/local/include

Can we use "?=" assignment to accept user provided value

Also since it points the header folder, what do you think about changing the 
macro name to highlight that it is for headers folder?

> +
> +all:
> +		make EXTRA_CFLAGS="-I $(DPDK_INSTALL)" -C /lib/modules/`uname -r`/build/ M=$(PWD)

Same for the kernel path, can you make it variable to user can override?

> +
> +clean:
> +	    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
> 



More information about the dev mailing list