From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by dpdk.org (Postfix) with ESMTP id CEDFD3237 for ; Thu, 28 May 2015 06:00:24 +0200 (CEST) Received: by ieczm2 with SMTP id zm2so29376744iec.1 for ; Wed, 27 May 2015 21:00:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=/wrYdiJXL1kshD+ZlTVt54K8R/iWTotVgha6Sown00I=; b=bzeTS8ajU2YnD1KRh4hRmnFBesK07fi9fNLWK0iAM4LPQqBF1Rvz+7hkzsyOEhdm2B qGofsxqwU6fYvk1ZEdphXPD2z1EbFB9CYjXiFD16jwfCiD1dxDQPINQ0nZlJdk9mQOYO DLCHEPKXKvwlU490vWvVXFW5NqSY36WlMyXUkmDbCAivUT05yGTNjWNXhCbne6Q2z3tS qaOYGq3dJ4hsKAYZ3HFVX+0VpuK0ktPmp1Amoh7cN8JXklBZeRihQ9TQj/5RixrbF7A8 RK/lrRCjkZYkWHMcTgFFhtunq13cvU1PysBe5fIifgTa4n3ATDIBEB28Dt86AFIjHnio 7lSQ== X-Gm-Message-State: ALoCoQnE/tz/QrJqjXyTal9iX50s6e/Vuf1x9MRHry0wju+txQ4Mbe6W36ax8WhDSXqRRLSnJXij MIME-Version: 1.0 X-Received: by 10.50.13.67 with SMTP id f3mr41267501igc.12.1432785623259; Wed, 27 May 2015 21:00:23 -0700 (PDT) Received: by 10.64.9.237 with HTTP; Wed, 27 May 2015 21:00:23 -0700 (PDT) In-Reply-To: <20150527134524.5f107cac@miho> References: <20150527134524.5f107cac@miho> Date: Wed, 27 May 2015 21:00:23 -0700 Message-ID: From: Stephen Hemminger To: Simon Kagstrom Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] 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: Thu, 28 May 2015 04:00:25 -0000 This ugly and fast becoming unmaintainable and ridiculous. KNI needs to get out of being a bunch of out of tree code chasing the kernel API tail lights and become something stable and submitted upstream. On Wed, May 27, 2015 at 4:45 AM, Simon Kagstrom < simon.kagstrom@netinsight.net> wrote: > /proc/version_signature is the version for the host machine, but in > e.g., chroots, this does not need to match that DPDK is built for. Use > utsrelease.h from the kernel sources instead and fake the upload > version. > > Signed-off-by: Simon Kagstrom > Signed-off-by: Johan Faltstrom > --- > 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 > > -- > 1.9.1 > >