DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] kni: bug fix of compiling KNI kernel module on Linux kernel 3.6.10
@ 2014-05-18 14:14 HELIN ZHANG
  2014-05-20  9:16 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: HELIN ZHANG @ 2014-05-18 14:14 UTC (permalink / raw)
  To: dev

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 <helin.zhang@intel.com>
---
 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] kni: bug fix of compiling KNI kernel module on Linux kernel 3.6.10
  2014-05-18 14:14 [dpdk-dev] [PATCH] kni: bug fix of compiling KNI kernel module on Linux kernel 3.6.10 HELIN ZHANG
@ 2014-05-20  9:16 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2014-05-20  9:16 UTC (permalink / raw)
  To: HELIN ZHANG; +Cc: dev

2014-05-18 22:14, HELIN ZHANG:
> Error of "implicit-function-declaration" can be seen when building
> KNI kernel module on Linux kernel 3.6.10 platform.

Please show the error message in the commit log.

> 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".

The title is about Linux 3.6.10 but is seems more related to a RedHat version.
Could you fix title and commit log, please?

Is it related to this error?
	http://dpdk.org/ml/archives/dev/2014-May/002457.html
Neil made an interesting comment about it:
	http://dpdk.org/ml/archives/dev/2014-May/002351.html

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-20  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-18 14:14 [dpdk-dev] [PATCH] kni: bug fix of compiling KNI kernel module on Linux kernel 3.6.10 HELIN ZHANG
2014-05-20  9:16 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).