[dpdk-dev] [PATCH v2 1/4] kni: fix build with kernel 3.8
Thomas Monjalon
thomas.monjalon at 6wind.com
Fri Sep 13 16:14:27 CEST 2013
- 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 at 6wind.com>
Tested-by: David Nyström <david.c.nystrom at gmail.com>
---
lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h | 5 ++---
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 23 +++++++++++++++++++++
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_ */
--
1.7.10.4
More information about the dev
mailing list