projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
659586e
)
datapath: Add dev_get_stats compatibility function.
author
Jesse Gross
<jesse@nicira.com>
Tue, 6 Apr 2010 02:38:31 +0000
(22:38 -0400)
committer
Jesse Gross
<jesse@nicira.com>
Mon, 19 Apr 2010 13:11:56 +0000
(09:11 -0400)
The dev_get_stats function wasn't added until 2.6.29 so provide
a replacement for it.
datapath/linux-2.6/compat-2.6/include/linux/netdevice.h
patch
|
blob
|
history
diff --git
a/datapath/linux-2.6/compat-2.6/include/linux/netdevice.h
b/datapath/linux-2.6/compat-2.6/include/linux/netdevice.h
index 924dc0d3eb8e518776b20d1d4d36f6707bfbf948..7080d0128a68d924a2202d9d840e4bdc5fd44c42 100644
(file)
--- a/
datapath/linux-2.6/compat-2.6/include/linux/netdevice.h
+++ b/
datapath/linux-2.6/compat-2.6/include/linux/netdevice.h
@@
-77,4
+77,12
@@
extern void unregister_netdevice_many(struct list_head *head);
extern void dev_disable_lro(struct net_device *dev);
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+static inline const struct net_device_stats *
+dev_get_stats(struct net_device *dev)
+{
+ return dev->get_stats(dev);
+}
+#endif
+
#endif