netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: stephan.gatzka@gmail.com
Cc: linux1394-devel@lists.sourceforge.net, yoshfuji@linux-ipv6.org,
	netdev@vger.kernel.org
Subject: Re: IPv6 over firewire
Date: Sat, 12 Jan 2013 15:37:55 +0100	[thread overview]
Message-ID: <20130112153755.3fd96d58@stein> (raw)
In-Reply-To: <50F140F7.60503@gmail.com>

On Jan 12 Stephan Gatzka wrote:
> > Or the (optional!) callback could be a new member of struct ndisc_options.
> 
> Hm, right now I have no opinion on that. Where does
> whatever_type *callback comes from? Is it an exported method of the 
> firewire net driver or the new function pointer in struct netdevice?

The networking core or IPv6 core would never ever use an EXPORT() from an
interface driver like firewire-net or from a bus architecture driver like
firewire-core.

The interface driver uses definitions and declarations from the networking/
IP/ ARP... core:
  - functions implemented in the core and EXPORTed from there,
  - data types defined in core headers and filled with data by the
    interface driver,
  - callback function types defined in core headers, used in data types
    which are defined in core headers; respective callbacks implemented in
    interface drivers, pointers to the implementations filled in by the
    interface drivers into respective data objects.
So the firewire-net bridge driver uses the firewire-core API below it and
the networking and IP APIs above it.

Whether a callback is needed at all is not obvious to me.  If one is
needed, then it is not obvious to me whether it should be reachable via a
function pointer in struct net_device, or via a function pointer in one of
the pointer table structs that are appended to struct net_device, or via a
function pointer in e.g. struct ndisc_options, or via a function pointer
typed argument of a function which is EXPORTed by the networking/ IPv6
core.

> > However, does net/ipv6/ndisc.c really need to be aware of the RFC 3146
> > Neighbor Discovery related packet header layouts?  Isn't it possible to
> > rewrite these headers in-place in drivers/firewire/net.c?
> 
> 
> Yes, it it possible, but yoshfuji strongly voted against rewriting ndisc 
> packets in firewire net driver to maintain extensibility to protocols. 
> Especially IPSEC can just not work if I rewrite the packets in the driver.

OK, then net/ipv6/ndisc.c shall be taught to write (and read?) those
packets, and drivers/firewire/net.c shall fill in all data that are going
to be needed by ndisc.c into new arguments of existing or new exported
core functions, or into new members of whichever networking struct
would be most suitable for that.  Or the networking core gets to those
data indirectly by calling a callback.

Apparently the Linux IPv6 core needs to learn a little bit about RFC 3146.
But it doesn't need to (and should not) learn anything about the Linux
IEEE 1394 implementation, that's what I am trying to convey. :-)
-- 
Stefan Richter
-=====-===-= ---= -==--
http://arcgraph.de/sr/

  parent reply	other threads:[~2013-01-12 14:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <50EF1AEB.1080704@gmail.com>
     [not found] ` <50EFE095.2040505@linux-ipv6.org>
     [not found]   ` <50F10C53.4000803@gmail.com>
2013-01-12  8:27     ` IPv6 over firewire Stefan Richter
     [not found] ` <20130110210912.09c62d38@stein>
     [not found]   ` <50F10E94.9090302@gmail.com>
2013-01-12  9:24     ` Stefan Richter
2013-01-12 10:54       ` Stephan Gatzka
2013-01-12 13:57         ` Stefan Richter
2013-01-12 14:37         ` Stefan Richter [this message]
2013-01-12 14:42           ` Stephan Gatzka
2012-12-21 17:03 IPv6 over Firewire Stephan Gatzka
2012-12-21 17:53 ` YOSHIFUJI Hideaki
2012-12-21 18:39   ` Stephan Gatzka
2012-12-21 19:49     ` YOSHIFUJI Hideaki
2012-12-21 23:12       ` Stefan Richter
2012-12-22  6:03         ` Stephan Gatzka
2012-12-22  6:10       ` Stephan Gatzka
2012-12-22  9:15         ` Stefan Richter
2012-12-22 18:33           ` Stephan Gatzka
2012-12-23  8:23         ` YOSHIFUJI Hideaki
2012-12-23 11:13           ` Stephan Gatzka
2012-12-23 12:09             ` YOSHIFUJI Hideaki
2012-12-23 13:25               ` Stephan Gatzka
2012-12-23 17:09                 ` YOSHIFUJI Hideaki
2012-12-23 18:25                   ` Stephan Gatzka
2012-12-23 19:38                     ` YOSHIFUJI Hideaki
2012-12-23 23:52                     ` Stefan Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130112153755.3fd96d58@stein \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    --cc=stephan.gatzka@gmail.com \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).