summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2013-07-29 10:42:17 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-09-16 15:04:39 +0200
commitd1574d50ac622ce9b7c1645963b715bf9e1e6c79 (patch)
tree0d5da3ed6a58f314afabb6fb27e2a80d5ec085f5
parent2277949ecf48831267a0693ab134858e6462cf70 (diff)
downloaddpdk-d1574d50ac622ce9b7c1645963b715bf9e1e6c79.zip
dpdk-d1574d50ac622ce9b7c1645963b715bf9e1e6c79.tar.gz
dpdk-d1574d50ac622ce9b7c1645963b715bf9e1e6c79.tar.xz
kni: fix build with kernel 3.8
- timecompare (used for hardware timestamping) has been removed. (see Linux commit 65f8f9a1c1db831e5159e3e3e50912d1f214cd0c) Simply disable HW_TIME_STAMP feature because it is not used by KNI. For this purpose, kcompat.h must be included before testing for HAVE_HW_TIME_STAMP. - annotations __devinit and __devexit have been removed. (see Linux commit 54b956b903607f8f8878754dd4352da6a54a1da2) Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Tested-by: David Nyström <david.c.nystrom@gmail.com> Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
-rw-r--r--lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h5
-rw-r--r--lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h23
2 files changed, 25 insertions, 3 deletions
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
index 3cebff5..5567a6c 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
@@ -30,6 +30,8 @@
#ifndef _IGB_H_
#define _IGB_H_
+#include "kcompat.h"
+
#include <linux/kobject.h>
#ifndef IGB_NO_LRO
@@ -63,9 +65,6 @@ struct igb_adapter;
#undef IGB_PER_PKT_TIMESTAMP
#endif
-
-#include "kcompat.h"
-
#ifdef HAVE_SCTP
#include <linux/sctp.h>
#endif
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
index a2aa361..f6e82c1 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h
@@ -3040,4 +3040,27 @@ typedef netdev_features_t kni_netdev_features_t;
#else
#define HAVE_FDB_OPS
#endif /* < 3.5.0 */
+
+/*****************************************************************************/
+/* 3.8 */
+
+/* timecompare has been removed and HW_TIME_STAMP is not used by KNI ethtool */
+#undef HAVE_HW_TIME_STAMP
+
+#ifndef __devinit
+#define __devinit
+#endif
+
+#ifndef __devinitdata
+#define __devinitdata
+#endif
+
+#ifndef __devexit
+#define __devexit
+#endif
+
+#ifndef __devexit_p
+#define __devexit_p
+#endif
+
#endif /* _KCOMPAT_H_ */