From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C137A3237 for ; Thu, 28 May 2015 05:30:09 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 27 May 2015 20:30:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,510,1427785200"; d="scan'208";a="499220436" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by FMSMGA003.fm.intel.com with ESMTP; 27 May 2015 20:30:06 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by PGSMSX103.gar.corp.intel.com (10.221.44.82) with Microsoft SMTP Server (TLS) id 14.3.224.2; Thu, 28 May 2015 11:30:05 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.94]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.180]) with mapi id 14.03.0224.002; Thu, 28 May 2015 11:30:03 +0800 From: "Zhang, Helin" To: Alexander Guy , Julien Cretin , "Buriez, Patrice" , "Wodkowski, PawelX" Thread-Topic: [PATCH] kni: Use utsrelease.h to determine Ubuntu kernel version Thread-Index: AQHQmHK3TaOjN/WKtEqtxyFt9WCyoZ2Qu1Lw Date: Thu, 28 May 2015 03:30:03 +0000 Message-ID: References: <20150527134524.5f107cac@miho> In-Reply-To: <20150527134524.5f107cac@miho> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 03:30:10 -0000 Hi guys Could you help to review the code changes where you modified before? Regards, Helin > -----Original Message----- > From: Simon Kagstrom [mailto:simon.kagstrom@netinsight.net] > Sent: Wednesday, May 27, 2015 7:45 PM > To: dev@dpdk.org; Zhang, Helin > Subject: [PATCH] kni: Use utsrelease.h to determine Ubuntu kernel version >=20 > /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. >=20 > Signed-off-by: Simon Kagstrom > Signed-off-by: Johan Faltstrom > --- > lib/librte_eal/linuxapp/kni/Makefile | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > 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 +=3D -I$(RTE_OUTPUT)/include > -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/e MODULE_CFLAGS +=3D -include > $(RTE_OUTPUT)/include/rte_config.h > MODULE_CFLAGS +=3D -Wall -Werror >=20 > -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 +=3D -DUBUNTU_RELEASE_CODE=3D$(shell lsb_release -sr | tr = -d .) > -UBUNTU_KERNEL_CODE :=3D $(shell cut -d' ' -f2 /proc/version_signature | = \ > - cut -d'~' -f1 | cut -d- -f1,2 | tr .- $(comma)) > +UBUNTU_KERNEL_CODE :=3D $(shell echo `grep UTS_RELEASE > $(RTE_KERNELDIR)/include/generated/utsrelease.h \ > + | cut -d '"' -f2 | cut -d- -f1,2 | tr .- $(comma)`,1) > MODULE_CFLAGS +=3D > -D"UBUNTU_KERNEL_CODE=3DUBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_C > ODE))" > endif >=20 > -- > 1.9.1