]> git.baikalelectronics.ru Git - kernel.git/commit
[NET]: Move destructor from neigh->ops to neigh_params
authorMichael S. Tsirkin <mst@mellanox.co.il>
Tue, 21 Mar 2006 06:25:41 +0000 (22:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Mar 2006 06:25:41 +0000 (22:25 -0800)
commit6e98c1714353a527e7a7bdc86d14bbd78f858b7d
treea0aeb88552772396bba986cce176028348ec041f
parenta6dc93c03a557a663e40441f8ce0684da2936b7f
[NET]: Move destructor from neigh->ops to neigh_params

struct neigh_ops currently has a destructor field, which no in-kernel
drivers outside of infiniband use.  The infiniband/ulp/ipoib in-tree
driver stashes some info in the neighbour structure (the results of
the second-stage lookup from ARP results to real link-level path), and
it uses neigh->ops->destructor to get a callback so it can clean up
this extra info when a neighbour is freed.  We've run into problems
with this: since the destructor is in an ops field that is shared
between neighbours that may belong to different net devices, there's
no way to set/clear it safely.

The following patch moves this field to neigh_parms where it can be
safely set, together with its twin neigh_setup.  Two additional
patches in the patch series update ipoib to use this new interface.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/ulp/ipoib/ipoib_main.c
include/net/neighbour.h
net/core/neighbour.c