From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 043DAB371 for ; Thu, 24 Jul 2014 17:18:44 +0200 (CEST) Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6OFKCCI022245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 24 Jul 2014 11:20:12 -0400 Received: from x220.localdomain (ovpn-113-145.phx2.redhat.com [10.3.113.145]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id s6OFKBnh003598; Thu, 24 Jul 2014 11:20:12 -0400 Date: Thu, 24 Jul 2014 08:20:11 -0700 From: Chris Wright To: Pablo de Lara Message-ID: <20140724152011.GB18804@x220.localdomain> References: <1406212131-22314-1-git-send-email-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1406212131-22314-1-git-send-email-pablo.de.lara.guarch@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Cc: dev@dpdk.org, Patrice Buriez Subject: Re: [dpdk-dev] [PATCH] kni: fixed compilation error on Ubuntu 14.04 LTS (kernel 3.13.0-30.54) 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, 24 Jul 2014 15:18:45 -0000 * Pablo de Lara (pablo.de.lara.guarch@intel.com) wrote: > Signed-off-by: Patrice Buriez Just a mechanical nitpick on DCO. Pablo, this patch appears to be written by Patrice. If so, it should begin with "From: Patrice Buriez " and should include your own Signed-off-by. thanks, -chris > --- > lib/librte_eal/linuxapp/kni/Makefile | 9 +++++++++ > lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 16 ++++++++++++++++ > 2 files changed, 25 insertions(+), 0 deletions(-) > > diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile > index fb9462f..725d3e7 100644 > --- a/lib/librte_eal/linuxapp/kni/Makefile > +++ b/lib/librte_eal/linuxapp/kni/Makefile > @@ -44,6 +44,15 @@ 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 type lsb_release >/dev/null 2>&1 && lsb_release -si),Ubuntu) > +MODULE_CFLAGS += -DUBUNTU_RELEASE_CODE=$(subst .,,$(shell lsb_release -sr)) > +UBUNTU_KERNEL_CODE := $(shell cut -d' ' -f2 /proc/version_signature |cut -d- -f1,2) > +UBUNTU_KERNEL_CODE := $(subst -,$(comma),$(UBUNTU_KERNEL_CODE)) > +UBUNTU_KERNEL_CODE := $(subst .,$(comma),$(UBUNTU_KERNEL_CODE)) > +MODULE_CFLAGS += -D"UBUNTU_KERNEL_CODE=UBUNTU_KERNEL_VERSION($(UBUNTU_KERNEL_CODE))" > +endif > + > + > # this lib needs main eal > DEPDIRS-y += lib/librte_eal/linuxapp/eal > > diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h > index 521a35d..5a06383 100644 > --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h > +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h > @@ -713,6 +713,20 @@ struct _kc_ethtool_pauseparam { > #define SLE_VERSION_CODE 0 > #endif /* SLE_VERSION_CODE */ > > +/* Ubuntu release and kernel codes must be specified from Makefile */ > +#ifndef UBUNTU_RELEASE_VERSION > +#define UBUNTU_RELEASE_VERSION(a,b) (((a) * 100) + (b)) > +#endif > +#ifndef UBUNTU_KERNEL_VERSION > +#define UBUNTU_KERNEL_VERSION(a,b,c,abi,upload) (((a) << 40) + ((b) << 32) + ((c) << 24) + ((abi) << 8) + (upload)) > +#endif > +#ifndef UBUNTU_RELEASE_CODE > +#define UBUNTU_RELEASE_CODE 0 > +#endif > +#ifndef UBUNTU_KERNEL_CODE > +#define UBUNTU_KERNEL_CODE 0 > +#endif > + > #ifdef __KLOCWORK__ > #ifdef ARRAY_SIZE > #undef ARRAY_SIZE > @@ -3847,6 +3861,7 @@ static inline struct sk_buff *__kc__vlan_hwaccel_put_tag(struct sk_buff *skb, > > #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) ) > #if (!(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,0))) > +#if (!(UBUNTU_RELEASE_CODE == UBUNTU_RELEASE_VERSION(14,4) && UBUNTU_KERNEL_CODE >= UBUNTU_KERNEL_VERSION(3,13,0,30,54))) > #ifdef NETIF_F_RXHASH > #define PKT_HASH_TYPE_L3 0 > static inline void > @@ -3855,6 +3870,7 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) > skb->rxhash = hash; > } > #endif /* NETIF_F_RXHASH */ > +#endif /* < 3.13.0-30.54 (Ubuntu 14.04) */ > #endif /* < RHEL7 */ > #endif /* < 3.14.0 */ > > -- > 1.7.0.7 >