2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00
linux-next/drivers/infiniband/ulp/ipoib
Moni Shoua 732a2170f4 IB/ipoib: Bound the net device to the ipoib_neigh structue
IPoIB uses a two layer neighboring scheme, such that for each struct neighbour
whose device is an ipoib one, there is a struct ipoib_neigh buddy which is
created on demand at the tx flow by an ipoib_neigh_alloc(skb->dst->neighbour)
call.

When using the bonding driver, neighbours are created by the net stack on behalf
of the bonding (master) device. On the tx flow the bonding code gets an skb such
that skb->dev points to the master device, it changes this skb to point on the
slave device and calls the slave hard_start_xmit function.

Under this scheme, ipoib_neigh_destructor assumption that for each struct
neighbour it gets, n->dev is an ipoib device and hence netdev_priv(n->dev)
can be casted to struct ipoib_dev_priv is buggy.

To fix it, this patch adds a dev field to struct ipoib_neigh which is used
instead of the struct neighbour dev one, when n->dev->flags has the
IFF_MASTER bit set.

Signed-off-by: Moni Shoua <monis at voltaire.com>
Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
Acked-by: Roland Dreier <rdreier@cisco.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-15 14:20:45 -04:00
..
ipoib_cm.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2007-10-11 19:43:13 -07:00
ipoib_fs.c [PATCH] mark struct file_operations const 3 2007-02-12 09:48:45 -08:00
ipoib_ib.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2007-10-11 19:43:13 -07:00
ipoib_main.c IB/ipoib: Bound the net device to the ipoib_neigh structue 2007-10-15 14:20:45 -04:00
ipoib_multicast.c IB/ipoib: Bound the net device to the ipoib_neigh structue 2007-10-15 14:20:45 -04:00
ipoib_verbs.c IPoIB: Fix typo to end statement with ';' instead of ',' 2007-10-09 19:59:06 -07:00
ipoib_vlan.c IPoIB: Allow setting policy to ignore multicast groups 2007-10-10 13:02:30 -07:00
ipoib.h IB/ipoib: Bound the net device to the ipoib_neigh structue 2007-10-15 14:20:45 -04:00
Kconfig IB: Use menuconfig for InfiniBand menu 2007-07-09 20:12:26 -07:00
Makefile IPoIB: Connected mode experimental support 2007-02-10 08:00:48 -08:00