[ofa-general] [PATCH ofed-1.3] IB/IPoIB: Restore support for interface statistics

Moni Shoua monis at voltaire.com
Tue Nov 27 23:20:44 PST 2007


While moving to kernel 2.6.24 in OFED, the function for getting interface 
statistics got lost. This is a backport patch to re-enable net device 
statistics for kernels that do not have the struct net_device_stats 
in struct netdevice.

This patch fixes bug 790.

Signed-off-by: Moni Shoua <monis at voltaire.com>
---
diff --git a/kernel_patches/backport/2.6.11/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.11/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.11/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.11_FC4/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.11_FC4/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.11_FC4/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.12/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.12/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.12/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.13/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.13/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.13/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.13_suse10_0_u/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.13_suse10_0_u/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.13_suse10_0_u/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.14/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.14/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.14/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.15/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.15/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.15/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.15_ubuntu606/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.15_ubuntu606/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.15_ubuntu606/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.16/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.16/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.16/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.16_sles10/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.16_sles10/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.16_sles10/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.17/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.17/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.17/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.18-EL5.1/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.18-EL5.1/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.18-EL5.1/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.18/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.18/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.18/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.18_FC6/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.18_FC6/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.18_FC6/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.18_suse10_2/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.18_suse10_2/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.18_suse10_2/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.19/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.19/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.19/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.20/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.20/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.20/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.9_U4/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.9_U4/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;
diff --git a/kernel_patches/backport/2.6.9_U5/ipoib_0110_restore_get_stats.patch b/kernel_patches/backport/2.6.9_U5/ipoib_0110_restore_get_stats.patch
new file mode 100644
index 0000000..62359a8
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/ipoib_0110_restore_get_stats.patch
@@ -0,0 +1,26 @@
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:16:06.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c	2007-11-27 15:27:59.401366315 +0200
+@@ -790,6 +790,13 @@ out:
+ 	return NETDEV_TX_OK;
+ }
+ 
++static struct net_device_stats *ipoib_get_stats(struct net_device *dev)
++{
++	struct ipoib_dev_priv *priv = netdev_priv(dev);
++
++	return &priv->stats;
++}
++
+ static void ipoib_timeout(struct net_device *dev)
+ {
+ 	struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1015,6 +1022,7 @@ static void ipoib_setup(struct net_devic
+ 	dev->stop 		 = ipoib_stop;
+ 	dev->change_mtu 	 = ipoib_change_mtu;
+ 	dev->hard_start_xmit 	 = ipoib_start_xmit;
++	dev->get_stats 		 = ipoib_get_stats;
+ 	dev->tx_timeout 	 = ipoib_timeout;
+ 	dev->hard_header         = ipoib_hard_header;
+ 	dev->set_multicast_list  = ipoib_set_mcast_list;




More information about the general mailing list