From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [195.130.132.52]) by dpdk.org (Postfix) with ESMTP id AA07B5A53 for ; Tue, 13 Oct 2015 15:06:27 +0200 (CEST) Received: from excentis.com ([81.82.202.121]) by xavier.telenet-ops.be with bizsmtp id Ud6T1r00G2dfk1M01d6Tp0; Tue, 13 Oct 2015 15:06:27 +0200 Received: (qmail 4068 invoked from network); 13 Oct 2015 13:06:26 -0000 Received: from laptop-012.excentis.com (10.5.5.133) by styx.netsys.excentis.com with ESMTPS (AES128-SHA encrypted); 13 Oct 2015 13:06:26 -0000 Message-ID: <1444741586.19184.14.camel@excentis.com> From: Tom Ghyselinck To: dev@dpdk.org Date: Tue, 13 Oct 2015 15:06:26 +0200 In-Reply-To: <20151013145052.0a74d297@miho> References: <20150820085106.32188573@miho> <20151013145052.0a74d297@miho> Organization: Excentis N.V. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5 (3.16.5-3.fc22) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2] kni: Use utsrelease.h to determine Ubuntu kernel version X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 13:06:27 -0000 Hi Simon, I'm looking forward to this patch since we also build the DPDK for kernel versions which differ from the host kernel. IMHO, the check for "Ubuntu" also needs change since this is also a "host system" check instead of "target system" check. I.e. A user may want to build for Ubuntu on a non-Ubuntu system and vice versa. With best regards, Tom. -- Tom Ghyselinck Excentis N.V. On di, 2015-10-13 at 14:50 +0200, Simon Kagstrom wrote: > Ping? > > // Simon > > On Thu, 20 Aug 2015 08:51:06 +0200 > Simon Kagstrom wrote: > > > /proc/version_signature is the version for the host machine, but in > > e.g., chroots, this does not necessarily match that DPDK is built > > for. DPDK will then build for the wrong kernel version - that of > > the > > server, and not that installed in the (build) chroot. > > > > The patch uses utsrelease.h from the kernel sources instead and > > fakes > > the upload version. > > > > Tested on a server with Ubuntu 12.04, building in a chroot for > > Ubuntu > > 14.04. > > > > Signed-off-by: Simon Kagstrom > > Signed-off-by: Johan Faltstrom > > --- > > ChangeLog: > > > > v2: Improve description and motivation for the patch. > > > > lib/librte_eal/linuxapp/kni/Makefile | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/lib/librte_eal/linuxapp/kni/Makefile > > b/lib/librte_eal/linuxapp/kni/Makefile > > index fb673d9..ac99d3f 100644 > > --- a/lib/librte_eal/linuxapp/kni/Makefile > > +++ b/lib/librte_eal/linuxapp/kni/Makefile > > @@ -44,10 +44,10 @@ MODULE_CFLAGS += -I$(RTE_OUTPUT)/include > > -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/e > > MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h > > MODULE_CFLAGS += -Wall -Werror > > > > -ifeq ($(shell test -f /proc/version_signature && lsb_release -si > > 2>/dev/null),Ubuntu) > > +ifeq ($(shell lsb_release -si 2>/dev/null),Ubuntu) > > MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(shell lsb_release -sr | > > tr -d .) > > -UBUNTU_KERNEL_CODE := $(shell cut -d' ' -f2 > > /proc/version_signature | \ > > - cut -d'~' -f1 | cut -d- -f1,2 | tr .- > > $(comma)) > > +UBUNTU_KERNEL_CODE := $(shell echo `grep UTS_RELEASE > > $(RTE_KERNELDIR)/include/generated/utsrelease.h \ > > + | cut -d '"' -f2 | cut -d- -f1,2 | tr .- $(comma)`,1) > > MODULE_CFLAGS += > > -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))" > > endif > > >