netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] More sane neigh infrastructure
@ 2011-07-25 10:01 David Miller
  2011-07-25 16:34 ` Roland Dreier
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2011-07-25 10:01 UTC (permalink / raw)
  To: roland; +Cc: linux-rdma, netdev


Roland, this is a first pass at the kind of thing I was
talking about with you last week.

ATM and Infiniband both need to do their own kind of
signaling, either in place of (ATM) or in addition to
(IPoIB) the generic ARP negotiation.

ATM wants to push everything to a userspace atmarpd daemon,
and override all of the usual ARP signalling.  It replaces
the neigh_table used by ARP completely in order to accomplish
this.

IPoIB triggers it's signalling by hooking in at transmit time, and
adding a neigh parms destruction hook to free up and release it's
private per-neigh state.

I think both cases can be consolidated into one kind of scheme,
and these patches provide the infrastructure and convert ATM
over as an example.

Devices provide up to three things:

1) netdev->neighpriv_len, length of per-neighbour device private
   state, accessible via neighbour_priv(neigh)

2) net_device_ops->ndo_neigh_construct(), invoked right after
   neigh_tbl->constructor(), can fail

3) net_device_ops->ndo_neigh_destroy(), invoked right before
   we release neigh->parms and kfree_rcu() the neigh object.
   It could return errors but I'm not checking for them
   currently and I can't think what we could possibly do
   in response at this point in the code.  Maybe this gets
   changed to return "void" eventually.

As a result ATM CLIP no longer overrides the IPV4 ARP table, and
I'm convinced IPoIB could behave similarly, override the
neigh_ops in a device neigh constructor, and avoid all of the
hooks at transmit time and instead trigger the key signalling
at neigh->output and friends.

If IPoIB can get converted to this new stuff, then we can get
rid of the ->ndo_neigh_setup() netdev op which only exists to
facilitate IPoIB hooking in a destructor for it's neigh state.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-25 22:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-25 10:01 [PATCH 0/7] More sane neigh infrastructure David Miller
2011-07-25 16:34 ` Roland Dreier
2011-07-25 21:10   ` David Miller
     [not found]     ` <20110725.141041.1092565620930748250.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-07-25 22:49       ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).