All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jukka Rissanen <jukka.rissanen@linux.intel.com>
To: "Duda, Lukasz" <Lukasz.Duda@nordicsemi.no>
Cc: "alex.aring@gmail.com" <alex.aring@gmail.com>,
	"linux-wpan@vger.kernel.org" <linux-wpan@vger.kernel.org>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: [RFC v2 0/4] Adding stateful compression to IPHC
Date: Thu, 16 Jul 2015 10:25:25 +0300	[thread overview]
Message-ID: <1437031525.2896.69.camel@linux.intel.com> (raw)
In-Reply-To: <AB80DA35A7B64E4E98291794926897D9741DE5B8@MBX03.nvlsi.no>

Hi Lukasz,

On ke, 2015-07-15 at 13:42 +0000, Duda, Lukasz wrote:
> Hi Jukka,
> 
> > Hi Lukasz,
> > 
> > On ma, 2015-07-13 at 13:50 +0200, Lukasz Duda wrote:
> > > Hi all,
> > >
> > > Resending the RFC patch set after some clean up.
> > >
> > > The following patches introduce support for stateful compression in IPHC.
> > >
> > > Patch #1: Introduce debugfs entry for 6lowpan module
> > > Patch #2: Add stateful compression component of 6lowpan module
> > > Patch #3: Add stateful compression support for iphc.c
> > > Patch #4: Enable stateful compression in bluetooth_6lowpan
> > >
> > > Usage of stateful compression is described in Patch #2.
> > >
> > > Notes
> > > =====
> > >
> > > RFC v2:
> > >     - Splitting patch into smaller incremental patches
> > >     - Moving debugfs logic from iphc.c into context.c
> > >     - Updating patch set to align with style and coding guideline
> > >
> > > RFC v1:
> > >     - Initial patch set: http://www.spinics.net/lists/linux-
> > bluetooth/msg62930.html
> > >
> > > Limitations
> > > ===========
> > >
> > > - Temporarly use of debugfs to be able to add context table entries.
> > > - Current module does not support context time-outs.
> > > - No support for multicast addresses stateful compression.
> > >
> > > Discussion: Idea on how to make the 6lowpan context tables out of debug
> > mode
> > >
> > ============================================================
> > ================
> > >
> > > The patch provided here is just a temporary solution where the contexts are
> > > manually added. The proper way of adding/removing contexts would be to
> > make
> > > ndisc.c parse 6CO options and act upon it. Generated Router Advertisement
> > > packets with 6CO option (for example from RADVD) will be handled in the
> > > ndisc_router_discovery function.
> > >
> > > Also, other flags like ARO, ABRO etc. which are specified in RFC6775 need
> > > to be handled in the ipv6 module in order to do it in a neat way.
> > > Potentially the RFC6775 extensions could also be used by other protocols
> > > than BLE and 802.15.4.
> > >
> > > There is a need for parsing the 6CO option in ndisc.c which parses Router
> > > Advertisement messages. Today the function calls to IPHC (6lowpan module)
> > are
> > > quite hard to implement in ndisc.c, as there is no guarantee that the
> > 6lowpan
> > > module will be loaded or not. It would make sense to build 6lowpan module
> > > as in-build part of IPv6. The features could be compiled in by using #defines.
> > >
> > > What do you think about moving 6lowpan as a component of IPv6 and
> > modify ndisc.c
> > > to handled 6LoWPAN specific options? Do you see any other solution to
> > make sure
> > > that 6CO is parsed and acted upon and still keep 6lowpan as a stand-alone
> > module?
> > 
> > Have you considered that 6lowpan module could register a callback in
> > ipv6 module. When needed, ipv6 could then call the 6lowpan callback if
> > needed. This way there would be no need to embed 6lowpan functionality
> > to ipv6 module.
> > 
> > 
> > Cheers,
> > Jukka
> > 
> 
> I did consider that solution but I assume you think about the way of 
> registration  used for NHC callbacks (for example nhc_udp.c) in the 6lowpan
> module.

I was thinking more something like the notifier API. Perhaps it can be
utilized to send information about received ndisc events.

So in 6lowpan module you would just do

static struct notifier_block ndisc_notifier = {
	.notifier_call = ndisc_event,
};

and register the notifier handler, and then in ndisc.c:ndisc_rcv() could
then just send information about RAs etc.

> 
> This could imply a new API for ndisc.c for example
> ndisc_register_lowpan_callback(). This callback can be issued from the
> 6lowpan module in order to register a callback.
> When an RA message comes, the registered callback will be issued.
> Should this be called only when a specific option is detected, or for all RA
> messages in general?

Perhaps more general solution would be preferable instead of being
specific to 6lowpan needs.

> 
> How do you see a way of handling all RFC6775 options like ARO,DAR,DAC etc.
> Should this be extended in ndisc.c itself, or should it be handled within
> the 6lowpan module (e.g. by using this registered lowpan callback). 
> Because when receiving NS with ARO it is expected to answer with NA that
> contains ARO option with reply status.

If the options are specific to 6lowpan, then I would say the 6lowpan
module needs to deal with them.

> 
> I believe that using callbacks like this could be used for parsing 6CO 
> very well which does not need any interaction. However, would there be 
> any chance of getting such dynamic registration of callbacks into ipv6 
> module? Is there any example that implements such solution to see how
> it works.

I do not know and we are just pondering different ideas here. Could you
ask the gurus in netdev mailing list their opinion/guidance?


Cheers,
Jukka



  reply	other threads:[~2015-07-16  7:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 11:50 [RFC v2 0/4] Adding stateful compression to IPHC Lukasz Duda
2015-07-13 11:50 ` Lukasz Duda
2015-07-13 11:50 ` [RFC v2 1/4] 6lowpan: Introduce debugfs entry for 6lowpan module Lukasz Duda
2015-07-13 11:50   ` Lukasz Duda
2015-07-23  6:07   ` Alexander Aring
2015-07-13 11:50 ` [RFC v2 2/4] 6lowpan: Add stateful compression component of " Lukasz Duda
2015-07-13 11:50   ` Lukasz Duda
2015-07-23  6:52   ` Alexander Aring
2015-07-23  6:59     ` Alexander Aring
2015-07-13 11:50 ` [RFC v2 3/4] 6lowpan: Add stateful compression support for iphc.c Lukasz Duda
2015-07-13 11:50   ` Lukasz Duda
2015-07-23  7:48   ` Alexander Aring
2015-07-23  8:20     ` Duda, Lukasz
2015-07-23  8:20       ` Duda, Lukasz
2015-07-13 11:50 ` [RFC v2 4/4] Bluetooth: 6lowpan: Enable stateful compression in bluetooth_6lowpan Lukasz Duda
2015-07-13 11:50   ` Lukasz Duda
2015-07-23  7:55   ` Alexander Aring
2015-07-23  8:09     ` Duda, Lukasz
2015-07-23  8:09       ` Duda, Lukasz
2015-07-13 13:09 ` [RFC v2 0/4] Adding stateful compression to IPHC Jukka Rissanen
2015-07-15 13:42   ` Duda, Lukasz
2015-07-15 13:42     ` Duda, Lukasz
2015-07-16  7:25     ` Jukka Rissanen [this message]
2015-07-13 14:15 ` Michael Richardson
2015-07-15  9:55 ` Duda, Lukasz
2015-07-15  9:55   ` Duda, Lukasz
2015-07-23  8:22 ` Alexander Aring
2015-10-12 16:15 ` Alexander Aring
2015-10-13  8:36   ` Duda, Lukasz
2015-10-13  8:36     ` Duda, Lukasz

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=1437031525.2896.69.camel@linux.intel.com \
    --to=jukka.rissanen@linux.intel.com \
    --cc=Lukasz.Duda@nordicsemi.no \
    --cc=alex.aring@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.