[ewg] [PATCH for OFED 1.3] IB/ipoib: enable IGMP for userpsace multicast IB apps
Or Gerlitz
ogerlitz at voltaire.com
Wed Oct 10 04:05:57 PDT 2007
Hi Vlad,
Please apply the patches to OFED 1.3 tree, kernel_patches/fixes/zzz_ipoib_allow_umcast.ofed.1.3.patch
was accepted by Roland to 2.6.24 and hence will be pulled automatically into OFED 1.3 once 2.6.24-rc1
is adopted, however, I don't want to rely on that. So lets first have this in and then see.
I have prepared a git tree from where you can pull it -
git://git.openfabrics.org/~ogerlitz/linux-2.6.git ofed-kernel
However, it seems there are some problems with the openfabrics server now and I
really want it to be merged this week.
Or.
>From 46a54ea1426db88b5057e0c720a30ef361895413 Mon Sep 17 00:00:00 2001
From: Or Gerlitz <ogerlitz at voltaire.com>
Date: Tue, 9 Oct 2007 15:37:47 +0200
Subject: [PATCH 1/1] added patches for allowing user mode IP multicast interoperability the new files are
kernel_patches/fixes/zzz_ipoib_allow_umcast.ofed.1.3.patch and
kernel_patches/backport/*/ipoib_class_device_to_2_6_20_umcast.patch where * stands for the same
directories containing ipoib_class_device_to_2_6_20.patch
Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
---
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../ipoib_class_device_to_2_6_20_umcast.patch | 51 +++++++
.../fixes/zzz_ipoib_allow_umcast.ofed.1.3.patch | 138 ++++++++++++++++++++
22 files changed, 1209 insertions(+), 0 deletions(-)
create mode 100644 kernel_patches/backport/2.6.11/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.11_FC4/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.12/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.13/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.14/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.15/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.15_ubuntu606/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.16/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.16_sles10/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.16_sles10_sp1/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.17/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.18/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.18_FC6/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.18_suse10_2/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.19/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.20/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.5_sles9_sp3/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.9_U2/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.9_U3/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.9_U4/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/backport/2.6.9_U5/ipoib_class_device_to_2_6_20_umcast.patch
create mode 100644 kernel_patches/fixes/zzz_ipoib_allow_umcast.ofed.1.3.patch
diff --git a/kernel_patches/backport/2.6.11/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.11/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.11/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.11_FC4/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.11_FC4/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.11_FC4/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.12/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.12/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.12/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.13/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.13/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.13/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.14/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.14/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.14/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.15/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.15/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.15/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.15_ubuntu606/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.15_ubuntu606/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.15_ubuntu606/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.16/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.16/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.16/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.16_sles10/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.16_sles10/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.16_sles10/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.16_sles10_sp1/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.17/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.17/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.17/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.18/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.18/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.18/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.18_FC6/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.18_FC6/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.18_FC6/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.18_suse10_2/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.18_suse10_2/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.18_suse10_2/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.19/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.19/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.19/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.20/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.20/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.20/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.5_sles9_sp3/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.5_sles9_sp3/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.5_sles9_sp3/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.9_U2/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.9_U2/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U2/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.9_U3/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.9_U3/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U3/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.9_U4/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.9_U4/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U4/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/backport/2.6.9_U5/ipoib_class_device_to_2_6_20_umcast.patch b/kernel_patches/backport/2.6.9_U5/ipoib_class_device_to_2_6_20_umcast.patch
new file mode 100644
index 0000000..e282e98
--- /dev/null
+++ b/kernel_patches/backport/2.6.9_U5/ipoib_class_device_to_2_6_20_umcast.patch
@@ -0,0 +1,51 @@
+This patch is the buddy of ipoib_class_device_to_2_6_20.patch, namely it handles
+the same issue in the same method for the /sys/class/net/$dev/umcast sysfs entry
+
+Hence it needs to go to all the directories under kernel_patches/backport that
+contain the ipoib_class_device_to_2_6_20.patch
+
+---
+
+backport kernel_patches/fixes/zzz_ipoib_allow_umcast.patch to older kernels
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c
+===================================================================
+--- ofa_kernel-1.3-work.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 19:54:15.000000000 +0200
++++ ofa_kernel-1.3-work/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-09-25 20:01:32.000000000 +0200
+@@ -1160,8 +1160,7 @@ int ipoib_add_pkey_attr(struct net_devic
+ &class_device_attr_pkey);
+ }
+
+-static ssize_t show_umcast(struct device *dev,
+- struct device_attribute *attr, char *buf)
++static ssize_t show_umcast(struct class_device *dev, char *buf)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+
+@@ -1171,8 +1170,7 @@ static ssize_t show_umcast(struct device
+ return sprintf(buf, "0\n");
+ }
+
+-static ssize_t set_umcast(struct device *dev,
+- struct device_attribute *attr,
++static ssize_t set_umcast(struct class_device *dev,
+ const char *buf, size_t count)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
+@@ -1191,11 +1189,12 @@ static ssize_t set_umcast(struct device
+
+ return -EINVAL;
+ }
+-static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++static CLASS_DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
+
+ int ipoib_add_umcast_attr(struct net_device *dev)
+ {
+- return device_create_file(&dev->dev, &dev_attr_umcast);
++ return class_device_create_file(&dev->class_dev,
++ &class_device_attr_umcast);
+ }
+
+ static void set_tx_csum(struct net_device *dev)
diff --git a/kernel_patches/fixes/zzz_ipoib_allow_umcast.ofed.1.3.patch b/kernel_patches/fixes/zzz_ipoib_allow_umcast.ofed.1.3.patch
new file mode 100644
index 0000000..010f998
--- /dev/null
+++ b/kernel_patches/fixes/zzz_ipoib_allow_umcast.ofed.1.3.patch
@@ -0,0 +1,138 @@
+The kernel IB stack allows (through the RDMA CM) user space multicast applications
+to interoperate with IP based apps optionally running at a different IP subnet.
+
+To support this inter-op for the case where the receiving party resides at
+the IB side, there is a need to handle IGMP (reports/queries) else the local
+IP router would not forward multicast traffic towards the IB network.
+
+This patch does a lookup on the database used for multicast reference counting and
+enhances IPoIB to ignore multicast group which is already handled by user space, all
+this under a per device policy flag. That is when the policy flag allows it, IPoIB
+will not join and attach its QP to a multicast group which has an entry on the database.
+
+For each IPoIB device, the /sys/class/net/$dev/umcast attribute controls the
+policy flag where the default value is being off (zero). The flag can be read
+and set/unset through sysfs.
+
+Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
+
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2007-09-25 20:36:12.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_multicast.c 2007-09-25 20:36:17.000000000 +0200
+@@ -783,6 +783,7 @@ void ipoib_mcast_restart_task(struct wor
+ struct ipoib_mcast *mcast, *tmcast;
+ LIST_HEAD(remove_list);
+ unsigned long flags;
++ struct ib_sa_mcmember_rec rec;
+
+ ipoib_dbg_mcast(priv, "restarting multicast task\n");
+
+@@ -816,6 +817,15 @@ void ipoib_mcast_restart_task(struct wor
+ if (!mcast || test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) {
+ struct ipoib_mcast *nmcast;
+
++ /* ignore group which is directly joined by user space */
++ if (test_bit(IPOIB_FLAG_ADMIN_UMCAST_ALLOWED, &priv->flags) &&
++ !ib_sa_get_mcmember_rec(priv->ca, priv->port, &mgid, &rec))
++ {
++ ipoib_dbg_mcast(priv, "ignoring multicast entry for mgid "
++ IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid));
++ continue;
++ }
++
+ /* Not found or send-only group, let's add a new entry */
+ ipoib_dbg_mcast(priv, "adding multicast entry for mgid "
+ IPOIB_GID_FMT "\n", IPOIB_GID_ARG(mgid));
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib.h
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib.h 2007-09-25 20:36:16.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib.h 2007-10-07 19:14:31.000000000 +0200
+@@ -88,6 +88,7 @@ enum {
+ IPOIB_FLAG_ADMIN_CM = 10,
+ IPOIB_FLAG_HW_CSUM = 11,
+ IPOIB_FLAG_RX_CSUM = 12,
++ IPOIB_FLAG_ADMIN_UMCAST_ALLOWED = 13,
+
+ IPOIB_MAX_BACKOFF_SECONDS = 16,
+
+@@ -470,6 +471,7 @@ static inline void ipoib_put_ah(struct i
+
+ int ipoib_open(struct net_device *dev);
+ int ipoib_add_pkey_attr(struct net_device *dev);
++int ipoib_add_umcast_attr(struct net_device *dev);
+
+ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
+ struct ipoib_ah *address, u32 qpn);
+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-09-25 20:36:16.000000000 +0200
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-10-07 19:17:08.000000000 +0200
+@@ -1124,6 +1124,45 @@ int ipoib_add_pkey_attr(struct net_devic
+ return device_create_file(&dev->dev, &dev_attr_pkey);
+ }
+
++static ssize_t show_umcast(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
++
++ if (test_bit(IPOIB_FLAG_ADMIN_UMCAST_ALLOWED, &priv->flags))
++ return sprintf(buf, "1\n");
++ else
++ return sprintf(buf, "0\n");
++}
++
++static ssize_t set_umcast(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct ipoib_dev_priv *priv = netdev_priv(to_net_dev(dev));
++ unsigned long umcast_val = simple_strtoul(buf, NULL, 0);
++
++ if (umcast_val > 0) {
++ set_bit(IPOIB_FLAG_ADMIN_UMCAST_ALLOWED, &priv->flags);
++ ipoib_warn(priv, "ignoring multicast groups joined directly "
++ "by user space\n");
++ return count;
++ }
++
++ if (!umcast_val) {
++ clear_bit(IPOIB_FLAG_ADMIN_UMCAST_ALLOWED, &priv->flags);
++ return count;
++ }
++
++ return -EINVAL;
++}
++static DEVICE_ATTR(umcast, S_IWUSR | S_IRUGO, show_umcast, set_umcast);
++
++int ipoib_add_umcast_attr(struct net_device *dev)
++{
++ return device_create_file(&dev->dev, &dev_attr_umcast);
++}
++
+ static void set_tx_csum(struct net_device *dev)
+ {
+ struct ipoib_dev_priv *priv = netdev_priv(dev);
+@@ -1227,6 +1266,8 @@ static struct net_device *ipoib_add_port
+ goto sysfs_failed;
+ if (ipoib_add_pkey_attr(priv->dev))
+ goto sysfs_failed;
++ if (ipoib_add_umcast_attr(priv->dev))
++ goto sysfs_failed;
+ if (device_create_file(&priv->dev->dev, &dev_attr_create_child))
+ goto sysfs_failed;
+ if (device_create_file(&priv->dev->dev, &dev_attr_delete_child))
+Index: ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
+===================================================================
+--- ofa_kernel-1.3.orig/drivers/infiniband/ulp/ipoib/ipoib_vlan.c 2007-09-10 16:02:22.000000000 +0300
++++ ofa_kernel-1.3/drivers/infiniband/ulp/ipoib/ipoib_vlan.c 2007-10-07 19:14:31.000000000 +0200
+@@ -119,6 +119,8 @@ int ipoib_vlan_add(struct net_device *pd
+ goto sysfs_failed;
+ if (ipoib_add_pkey_attr(priv->dev))
+ goto sysfs_failed;
++ if (ipoib_add_umcast_attr(priv->dev))
++ goto sysfs_failed;
+
+ if (device_create_file(&priv->dev->dev, &dev_attr_parent))
+ goto sysfs_failed;
--
1.5.2.5
More information about the ewg
mailing list