[openib-general] Re: Re: ipoib: outstanding patches
Michael S. Tsirkin
mst at mellanox.co.il
Wed Jan 11 23:17:02 PST 2006
Quoting r. Michael S. Tsirkin <mst at mellanox.co.il>:
> > Basically we're getting lucky that this works at all.
> >
> > As you said in your other mail, it seems like a more fundamental
> > reorganization of this neighbour destructor stuff is required.
>
> Right. [Sound of busy typing ]
How does the following look?
Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>
Index: linux-2.6.15/include/linux/netdevice.h
===================================================================
--- linux-2.6.15.orig/include/linux/netdevice.h 2006-01-03 05:21:10.000000000 +0200
+++ linux-2.6.15/include/linux/netdevice.h 2006-01-12 11:55:49.000000000 +0200
@@ -485,6 +485,7 @@ struct net_device
int (*hard_header_parse)(struct sk_buff *skb,
unsigned char *haddr);
int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
+ void (*neigh_destructor)(struct neighbour *);
#ifdef CONFIG_NETPOLL
struct netpoll_info *npinfo;
#endif
Index: linux-2.6.15/net/core/neighbour.c
===================================================================
--- linux-2.6.15.orig/net/core/neighbour.c 2006-01-12 11:58:15.000000000 +0200
+++ linux-2.6.15/net/core/neighbour.c 2006-01-12 11:58:45.000000000 +0200
@@ -586,8 +586,8 @@ void neigh_destroy(struct neighbour *nei
kfree(hh);
}
- if (neigh->ops && neigh->ops->destructor)
- (neigh->ops->destructor)(neigh);
+ if (neigh->dev->neigh_destructor)
+ (neigh->dev->neigh_destructor)(neigh);
skb_queue_purge(&neigh->arp_queue);
Index: linux-2.6.15/include/net/neighbour.h
===================================================================
--- linux-2.6.15.orig/include/net/neighbour.h 2006-01-03 05:21:10.000000000 +0200
+++ linux-2.6.15/include/net/neighbour.h 2006-01-12 11:54:26.000000000 +0200
@@ -145,7 +145,6 @@ struct neighbour
struct neigh_ops
{
int family;
- void (*destructor)(struct neighbour *);
void (*solicit)(struct neighbour *, struct sk_buff*);
void (*error_report)(struct neighbour *, struct sk_buff*);
int (*output)(struct sk_buff*);
--
MST
More information about the general
mailing list