From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 233DFB0FE for ; Sun, 18 May 2014 16:14:38 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 18 May 2014 07:14:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,862,1392192000"; d="scan'208";a="533773019" Received: from shilc102.sh.intel.com ([10.239.39.44]) by fmsmga001.fm.intel.com with ESMTP; 18 May 2014 07:14:46 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shilc102.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s4IEEfo2010461; Sun, 18 May 2014 22:14:44 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s4IEEc34016432; Sun, 18 May 2014 22:14:40 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s4IEEcA1016428; Sun, 18 May 2014 22:14:38 +0800 From: HELIN ZHANG To: dev@dpdk.org Date: Sun, 18 May 2014 22:14:18 +0800 Message-Id: <1400422458-16322-1-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] kni: bug fix of compiling KNI kernel module on Linux kernel 3.6.10 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: Sun, 18 May 2014 14:14:39 -0000 Error of "implicit-function-declaration" can be seen when building KNI kernel module on Linux kernel 3.6.10 platform. The root cause is as follows. On Linux kernel 3.6.10, ETHTOOL_GEEE is defined in Linux header file of "linux/ethtool.h", while is not defined in most of other linux kernel versions. mmd_eee_cap_to_ethtool_sup_t(), mmd_eee_adv_to_ethtool_adv_t() and ethtool_adv_to_mmd_eee_adv_t() in kcompat.h are disabled by "#if !defined(ETHTOOL_GEEE) || (RHEL_RELEASE_CODE && RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(6,4))", while are called in igb_get_eee() in igb_ethtool.c which is enabled by "#ifdef ETHTOOL_GEEE". This patch is to fix the compile issue. Signed-off-by: HELIN ZHANG --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 19df483..54c2ac5 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3586,7 +3586,7 @@ static inline bool ether_addr_equal(const u8 *addr1, const u8 *addr2) #define ADVERTISED_40000baseLR4_Full (1 << 26) #endif -#if !defined(ETHTOOL_GEEE) || (RHEL_RELEASE_CODE && RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(6,4)) +#if defined(ETHTOOL_GEEE) || (RHEL_RELEASE_CODE && RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(6,4)) /** * mmd_eee_cap_to_ethtool_sup_t * @eee_cap: value of the MMD EEE Capability register -- 1.8.1.4