[openib-general] [PATCH] ib_addr on vanilla 2.6.15
Michael S. Tsirkin
mst at mellanox.co.il
Thu Jan 19 10:22:28 PST 2006
I find the following useful: it let me load ib_addr on vanilla 2.6.15
---
ip_dev_find isnt exported to modules starting with 2.6.14
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: linux-kernel/drivers/infiniband/core/addr.c
===================================================================
--- linux-kernel/drivers/infiniband/core/addr.c (revision 5066)
+++ linux-kernel/drivers/infiniband/core/addr.c (working copy)
@@ -40,6 +40,30 @@ MODULE_AUTHOR("Sean Hefty");
MODULE_DESCRIPTION("IB Address Translation");
MODULE_LICENSE("Dual BSD/GPL");
+static int xxx_ip_dev_find(u32 addr)
+{
+ struct net_device *dev;
+ struct in_ifaddr **ifap;
+ struct in_ifaddr *ifa;
+ struct in_device *in_dev;
+
+ read_lock(&dev_base_lock);
+ for (dev = dev_base; dev; dev = dev->next) {
+ for (ifap = &in_dev->ifa_list; (ifa = *ifap);
+ ifap = &ifa->ifa_next) {
+ if (addr == ifa->ifa_address) {
+ dev_hold(dev);
+ goto found;
+ }
+ }
+ }
+found:
+ read_unlock(&dev_base_lock);
+ return dev;
+}
+
+#define ip_dev_find xxx_ip_dev_find
+
struct addr_req {
struct list_head list;
struct sockaddr src_addr;
--
MST
More information about the general
mailing list