[dpdk-dev] [PATCH] Fix KNI compilation under Wind River Linux 6.0 recent RCPLs.

Stephen Hemminger stephen at networkplumber.org
Wed Mar 30 23:50:42 CEST 2016


On Wed, 30 Mar 2016 12:13:35 -0600
Lee Roberts <lee.roberts at hpe.com> wrote:

> skb_set_hash() has been backported to recent Wind River Linux 6.0 RCPLs.
> As a result, the corresponding stanza in kcompat.h must be removed.
> Similar patches have already been applied for RHEL, SLES and Ubuntu.
> 
> Wind River Linux does not provide convenient macros for kernel version
> identification.  Add macros to Makefile to identify the Wind River Linux
> version.
> 
> Signed-off-by: Lee Roberts <lee.roberts at hpe.com>
> ---
>  lib/librte_eal/linuxapp/kni/Makefile              |  8 ++++++++
>  lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 13 +++++++++++++
>  2 files changed, 21 insertions(+)
> 
> diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile
> index ac99d3f..6310615 100644
> --- a/lib/librte_eal/linuxapp/kni/Makefile
> +++ b/lib/librte_eal/linuxapp/kni/Makefile
> @@ -51,6 +51,14 @@ UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE $(RTE_KERNELDIR)/include/ge
>  MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))"
>  endif
>  
> +ifeq ($(shell lsb_release -si 2>/dev/null),wrlinux)
> +WRLINUX_MAJOR := $(shell lsb_release -sr | cut -d. -f1)
> +WRLINUX_MINOR := $(shell lsb_release -sr | cut -d. -f2)
> +WRLINUX_RCPL  := $(shell lsb_release -sr | cut -d. -f4)
> +MODULE_CFLAGS += -D"WRLINUX_RELEASE_CODE=WRLINUX_RELEASE_VERSION($(WRLINUX_MAJOR),$(WRLINUX_MINOR))"
> +MODULE_CFLAGS += -D"WRLINUX_RCPL=$(WRLINUX_RCPL)"
> +endif
> +

Do we want to require DPDK to work in the face of every weird vendor
kernel backport. This is a road to nowhere...

One more reason to get kernel drivers upstream.


More information about the dev mailing list