[dpdk-dev] [PATCH] kni: fix building on Ubuntu-hybrids
Alexander Guy
alexander at andern.org
Fri Oct 24 19:22:34 CEST 2014
On Oct 24, 2014, at 12:35 AM, Thomas Monjalon <thomas.monjalon at 6wind.com> wrote:
>
> Please, could explain what is the file /proc/version_signature and why
> it can be a check for Ubuntu kernel?
Ubuntu provides /proc/version_signature to help with determining kernel lineage; it doesn’t exist in upstream kernels:
https://wiki.ubuntu.com/Kernel/FAQ#Kernel.2BAC8-FAQ.2BAC8-GeneralVersionRunning.How_can_we_determine_the_version_of_the_running_kernel.3F
Commit a09b359d started gathering version information via version_signature in order to enable certain Ubuntu-specific kernel workarounds. If you have a kernel without this information (e.g. upstream Linux v3.13 with an Ubuntu userspace), kni fails to build:
CC [M] /home/alexander/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_82575.o
In file included from /home/alexander/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_osdep.h:41:0,
from /home/alexander/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_hw.h:31,
from /home/alexander/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/e1000_api.h:31,
from /home/alexander/dpdk/build/build/lib/librte_eal/linuxapp/kni/e1000_82575.c:38:
/home/alexander/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h:3864:8: error: macro "UBUNTU_KERNEL_VERSION" requires 5 arguments, but only 1 given
/home/alexander/dpdk/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h:3864:8: error: "UBUNTU_KERNEL_VERSION" is not defined [-Werror=undef]
My logic for the change is: if the build system is running in an environment that looks like Ubuntu, but can’t gather enough information to know if it should enable the kernel workarounds, it’s safe to not try to enable them at all.
Thanks.
Alexander
More information about the dev
mailing list