Linux bluetooth development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Lukasz Duda <lukasz.duda@nordicsemi.no>
Cc: linux-wpan@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [RFC v2 0/4] Adding stateful compression to IPHC
Date: Thu, 23 Jul 2015 10:22:45 +0200	[thread overview]
Message-ID: <20150723082242.GB19536@omega> (raw)
In-Reply-To: <1436788233-13960-1-git-send-email-lukasz.duda@nordicsemi.no>

Hi,

On Mon, Jul 13, 2015 at 01:50:29PM +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.
> 

I think it's currently fine to bring such functionality over debugfs for
introduce the functionality. If we have it done, then we talk about more
detailed process how to make the dealing with 6CO, ipv6 stack and 6lowpan
module.

> 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

The initial idea of 6lowpan is to work as adaptation layer. This is exactly
what we try to do with the virtual lowpan interface, doing compression/uncompression
and such stuff before we give the packet to the next layer. 6LoWPAN has also
some differents between btle/802.15.4 e.g. we need to run some fragmentation/reassemble
before ipv6 layer.

To run as adaptation layer this isn't always possible, like in your case
the 6CO field. Also in 802.15.4 we need a special handling for different
mac address types short and extended (which is not supported right now).

I think we should try to handling it still as seperate module so far we
can, if the netdev people says something that we can't do and the
solution would be a move of 6lowpan branch into ipv6, then we should do
it. E.g. Maybe they don't like function dependencies from the 6lowpan
module, like lookup cid value. I don't know how possible that is for
accepting such dependency mainline for the ipv6 community. But maybe we
can implement the lookup functions then in ipv6 module (which should
always available when loading the 6lowpan module).


For your support to handle the 6CO functionality:

 - First, prepare all steps that it works with the debugfs and we have it
   mainline. (Inclusive all review notes, that we have the basic
   functionality).

 - Second, send patches for review to bluetooth, wpan mailinglist which
   adds functionality to net/ipv6 -> Then we can talk about the possible
   handling "how we can add such functionality". The netdev people
   looking much into things which slows down other stack e.g. ethernet
   and they are not happy when adding more runtime decision stuff (I
   suppose that and never tried that out). So if we add more runtime
   decision we should make this so small as possible, otherwise I don't
   see that we have a change to get it in.

   Sometimes in IPv6 stack you already see several times
   "switch (dev->type)", that's a good example that we can do our stuff
   there by checking on ARPHRD_6LOWPAN and making different stuff on
   hot paths. Then we have no additional runtime costs. But I think such
   "switch (dev->type)" doesn't exist at places were do you need the
   handling now.


I don't see that we can talk much about "how possible things are to
implement" - without any code. The 6LoWPAN code we can touch every time,
the IPv6 code is more complicated right now. :-)

- Alex

  parent reply	other threads:[~2015-07-23  8:22 UTC|newest]

Thread overview: 20+ 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 ` [RFC v2 1/4] 6lowpan: Introduce debugfs entry for 6lowpan module 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-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-23  7:48   ` Alexander Aring
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-23  7:55   ` Alexander Aring
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-16  7:25     ` Jukka Rissanen
2015-07-13 14:15 ` Michael Richardson
2015-07-15  9:55 ` Duda, Lukasz
2015-07-23  8:22 ` Alexander Aring [this message]
2015-10-12 16:15 ` Alexander Aring
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=20150723082242.GB19536@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=lukasz.duda@nordicsemi.no \
    /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