All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: linux-wpan-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
	marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org,
	jukka.rissanen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
	hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org,
	stefan-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org,
	mcr-SWp7JaYWvAQV+D8aMU/kSg@public.gmane.org,
	werner-SEdMjqphH88wryQfseakQg@public.gmane.org,
	linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Alexander Aring <aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	"David S . Miller"
	<davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
	Alexey Kuznetsov <kuznet-v/Mj1YrvjDBInbfyfbPRSQ@public.gmane.org>,
	James Morris <jmorris-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org>,
	Hideaki YOSHIFUJI
	<yoshfuji-VfPWfsRibaP+Ru+s062T9g@public.gmane.org>,
	Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>
Subject: [RFC 00/12] 6lowpan: introduce 6lowpan-nd
Date: Mon, 23 May 2016 21:21:56 +0200	[thread overview]
Message-ID: <1464031328-17524-1-git-send-email-aar@pengutronix.de> (raw)

Hi,

this patch series introduces the ndisc ops callback structure to add different
handling for IPv6 neighbour discovery cache functionality. It implements at first
the two following use-cases:

 - 6CO handling as userspace option (For all 6LoWPAN layers, BTLE/802.15.4) [0]
 - short address handling for 802.15.4 6LoWPAN only [1]

Since my last patch series, I completely changed the whole ndisc_ops callback
structure to not replace the whole ndisc functionality at recv/send level of
NS/NA/RS/RA which I send in my previous patch-series "6lowpan: introduce basic
6lowpan-nd". I changed it now to add different handling in a very low-level way
of ndisc functionality.

The ndisc_ops don't must be registered to dev->ndisc_ops anymore, if they are not
set, then no additional ipv6 ndisc handling will be done.

This patch series now introduce a complete handling of short address for
802.15.4 6LoWPAN in case of send/recv of NA/NS/RS and RA. In case of RA
(receive only) and PIO we also need a second prefix + short-address based
address.

This callback structure can be used later (I hope) for RFC 6775 [0]. This RFC
defines some new option fields and messages for 6LoWPAN-ND. This patch series
does not implement RFC 6775 (except we decide now to handle 6CO in userspace).

Additional we can use the current ops for parse/fill ndisc options for kernel
handled ndisc messages to add 6CIO, see [2].

I tested RA/NS/NA/RS messages with short address which seems to work, what I
didn't test is the redirect messages since I don't know how to generate them.
The short address for redirect messages are also some special case here, because
the short address by a L3 target address need to be added.

btw:
According to [3] sending redirect messages should be also disabled by default
on 6lowpan interfaces, but can be activated afterwards. This is maybe
something for the ipv6_devconf structure. There is a "accept_redirects" but
no "disable_redirects".

- Alex

[0] https://tools.ietf.org/html/rfc6775
[1] https://tools.ietf.org/html/rfc4944#section-8
[2] https://tools.ietf.org/html/rfc7400#section-3.3
[3] https://tools.ietf.org/html/rfc6775#section-6.1

Cc: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Alexey Kuznetsov <kuznet-v/Mj1YrvjDBInbfyfbPRSQ@public.gmane.org>
Cc: James Morris <jmorris-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org>
Cc: Hideaki YOSHIFUJI <yoshfuji-VfPWfsRibaP+Ru+s062T9g@public.gmane.org>
Cc: Patrick McHardy <kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org>

changes since "PATCHv2 6lowpan: introduce basic 6lowpan-nd":
 - change EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
 - rework ndisc_ops to be very low-level (not replacing
   full ndisc handling) and add full short address handling
   now.
 - added comments for ndisc_ops.
 - make ndisc_opt_addr_space, ndisc_opt_addr_data and
   ndisc_fill_addr_option completely independent from
   net_device dev argument. Instead add ndisc_dev helpers
   for do it for the normal case.
 - remove lowpan_neigh and add a 802.15.4 6lowpan private data
   for now only.
 - remove empty ndisc_ops inline functions
 - add tmp debugfs UAPI to get 6lowpan short address, necessary
   for e.g. radvd to put short address as sllao in RA.

Alexander Aring (12):
  6lowpan: add private neighbour data
  6lowpan: add 802.15.4 short addr slaac
  6lowpan: remove ipv6 module request
  ndisc: get rid off dev parameter in ndisc_opt_addr_space
  ndisc: get rid off dev parameter in ndisc_opt_addr_data
  ndisc: get rid off dev parameter in ndisc_fill_addr_option
  addrconf: put prefix address add in an own function
  ipv6: introduce neighbour discovery ops
  ipv6: export several functions
  6lowpan: introduce 6lowpan-nd
  6lowpan: add support for getting short address
  6lowpan: add support for 802.15.4 short addr handling

 include/linux/netdevice.h     |   8 +-
 include/net/6lowpan.h         |  10 ++
 include/net/addrconf.h        |  10 ++
 include/net/ndisc.h           | 229 +++++++++++++++++++++++++++++++++++++++---
 net/6lowpan/6lowpan_i.h       |   4 +
 net/6lowpan/Makefile          |   2 +-
 net/6lowpan/core.c            |  50 ++++++++-
 net/6lowpan/debugfs.c         |  35 +++++++
 net/6lowpan/iphc.c            | 167 ++++++++++++++++++++++++------
 net/6lowpan/ndisc.c           | 223 ++++++++++++++++++++++++++++++++++++++++
 net/ieee802154/6lowpan/core.c |  12 +++
 net/ieee802154/6lowpan/tx.c   | 113 ++++++++++-----------
 net/ipv6/addrconf.c           | 204 ++++++++++++++++++++-----------------
 net/ipv6/ndisc.c              | 178 +++++++++++++++++++-------------
 net/ipv6/route.c              |  18 ++--
 15 files changed, 990 insertions(+), 273 deletions(-)
 create mode 100644 net/6lowpan/ndisc.c

-- 
2.8.2

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Aring <aar@pengutronix.de>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, marcel@holtmann.org,
	jukka.rissanen@linux.intel.com, hannes@stressinduktion.org,
	stefan@osg.samsung.com, mcr@sandelman.ca, werner@almesberger.net,
	linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
	Alexander Aring <aar@pengutronix.de>,
	"David S . Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>
Subject: [RFC 00/12] 6lowpan: introduce 6lowpan-nd
Date: Mon, 23 May 2016 21:21:56 +0200	[thread overview]
Message-ID: <1464031328-17524-1-git-send-email-aar@pengutronix.de> (raw)

Hi,

this patch series introduces the ndisc ops callback structure to add different
handling for IPv6 neighbour discovery cache functionality. It implements at first
the two following use-cases:

 - 6CO handling as userspace option (For all 6LoWPAN layers, BTLE/802.15.4) [0]
 - short address handling for 802.15.4 6LoWPAN only [1]

Since my last patch series, I completely changed the whole ndisc_ops callback
structure to not replace the whole ndisc functionality at recv/send level of
NS/NA/RS/RA which I send in my previous patch-series "6lowpan: introduce basic
6lowpan-nd". I changed it now to add different handling in a very low-level way
of ndisc functionality.

The ndisc_ops don't must be registered to dev->ndisc_ops anymore, if they are not
set, then no additional ipv6 ndisc handling will be done.

This patch series now introduce a complete handling of short address for
802.15.4 6LoWPAN in case of send/recv of NA/NS/RS and RA. In case of RA
(receive only) and PIO we also need a second prefix + short-address based
address.

This callback structure can be used later (I hope) for RFC 6775 [0]. This RFC
defines some new option fields and messages for 6LoWPAN-ND. This patch series
does not implement RFC 6775 (except we decide now to handle 6CO in userspace).

Additional we can use the current ops for parse/fill ndisc options for kernel
handled ndisc messages to add 6CIO, see [2].

I tested RA/NS/NA/RS messages with short address which seems to work, what I
didn't test is the redirect messages since I don't know how to generate them.
The short address for redirect messages are also some special case here, because
the short address by a L3 target address need to be added.

btw:
According to [3] sending redirect messages should be also disabled by default
on 6lowpan interfaces, but can be activated afterwards. This is maybe
something for the ipv6_devconf structure. There is a "accept_redirects" but
no "disable_redirects".

- Alex

[0] https://tools.ietf.org/html/rfc6775
[1] https://tools.ietf.org/html/rfc4944#section-8
[2] https://tools.ietf.org/html/rfc7400#section-3.3
[3] https://tools.ietf.org/html/rfc6775#section-6.1

Cc: David S. Miller <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>

changes since "PATCHv2 6lowpan: introduce basic 6lowpan-nd":
 - change EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
 - rework ndisc_ops to be very low-level (not replacing
   full ndisc handling) and add full short address handling
   now.
 - added comments for ndisc_ops.
 - make ndisc_opt_addr_space, ndisc_opt_addr_data and
   ndisc_fill_addr_option completely independent from
   net_device dev argument. Instead add ndisc_dev helpers
   for do it for the normal case.
 - remove lowpan_neigh and add a 802.15.4 6lowpan private data
   for now only.
 - remove empty ndisc_ops inline functions
 - add tmp debugfs UAPI to get 6lowpan short address, necessary
   for e.g. radvd to put short address as sllao in RA.

Alexander Aring (12):
  6lowpan: add private neighbour data
  6lowpan: add 802.15.4 short addr slaac
  6lowpan: remove ipv6 module request
  ndisc: get rid off dev parameter in ndisc_opt_addr_space
  ndisc: get rid off dev parameter in ndisc_opt_addr_data
  ndisc: get rid off dev parameter in ndisc_fill_addr_option
  addrconf: put prefix address add in an own function
  ipv6: introduce neighbour discovery ops
  ipv6: export several functions
  6lowpan: introduce 6lowpan-nd
  6lowpan: add support for getting short address
  6lowpan: add support for 802.15.4 short addr handling

 include/linux/netdevice.h     |   8 +-
 include/net/6lowpan.h         |  10 ++
 include/net/addrconf.h        |  10 ++
 include/net/ndisc.h           | 229 +++++++++++++++++++++++++++++++++++++++---
 net/6lowpan/6lowpan_i.h       |   4 +
 net/6lowpan/Makefile          |   2 +-
 net/6lowpan/core.c            |  50 ++++++++-
 net/6lowpan/debugfs.c         |  35 +++++++
 net/6lowpan/iphc.c            | 167 ++++++++++++++++++++++++------
 net/6lowpan/ndisc.c           | 223 ++++++++++++++++++++++++++++++++++++++++
 net/ieee802154/6lowpan/core.c |  12 +++
 net/ieee802154/6lowpan/tx.c   | 113 ++++++++++-----------
 net/ipv6/addrconf.c           | 204 ++++++++++++++++++++-----------------
 net/ipv6/ndisc.c              | 178 +++++++++++++++++++-------------
 net/ipv6/route.c              |  18 ++--
 15 files changed, 990 insertions(+), 273 deletions(-)
 create mode 100644 net/6lowpan/ndisc.c

-- 
2.8.2

             reply	other threads:[~2016-05-23 19:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 19:21 Alexander Aring [this message]
2016-05-23 19:21 ` [RFC 00/12] 6lowpan: introduce 6lowpan-nd Alexander Aring
2016-05-23 19:21 ` [RFC 02/12] 6lowpan: add 802.15.4 short addr slaac Alexander Aring
2016-05-23 19:22 ` [RFC 06/12] ndisc: get rid off dev parameter in ndisc_fill_addr_option Alexander Aring
2016-05-23 19:22 ` [RFC 07/12] addrconf: put prefix address add in an own function Alexander Aring
2016-05-27  9:45   ` Stefan Schmidt
2016-05-27 11:41     ` Alexander Aring
2016-05-27 13:17       ` Stefan Schmidt
2016-05-23 19:22 ` [RFC 08/12] ipv6: introduce neighbour discovery ops Alexander Aring
     [not found]   ` <1464031328-17524-9-git-send-email-aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-05-25  5:33     ` YOSHIFUJI Hideaki
2016-05-25  5:33       ` YOSHIFUJI Hideaki
2016-05-23 19:22 ` [RFC 09/12] ipv6: export several functions Alexander Aring
2016-05-27  9:56   ` Stefan Schmidt
     [not found] ` <1464031328-17524-1-git-send-email-aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-05-23 19:21   ` [RFC 01/12] 6lowpan: add private neighbour data Alexander Aring
2016-05-23 19:21     ` Alexander Aring
2016-05-23 19:21   ` [RFC 03/12] 6lowpan: remove ipv6 module request Alexander Aring
2016-05-23 19:21     ` Alexander Aring
2016-05-23 19:22   ` [RFC 04/12] ndisc: get rid off dev parameter in ndisc_opt_addr_space Alexander Aring
2016-05-23 19:22     ` Alexander Aring
     [not found]     ` <1464031328-17524-5-git-send-email-aar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-05-25  5:15       ` YOSHIFUJI Hideaki
2016-05-25  5:15         ` YOSHIFUJI Hideaki
2016-05-27 16:56         ` Hannes Frederic Sowa
2016-05-27 18:54           ` Alexander Aring
2016-05-27 18:54             ` Alexander Aring
2016-05-23 19:22   ` [RFC 05/12] ndisc: get rid off dev parameter in ndisc_opt_addr_data Alexander Aring
2016-05-23 19:22     ` Alexander Aring
2016-05-23 19:22   ` [RFC 10/12] 6lowpan: introduce 6lowpan-nd Alexander Aring
2016-05-23 19:22     ` Alexander Aring
2016-05-27 10:16     ` Stefan Schmidt
2016-05-23 19:22   ` [RFC 11/12] 6lowpan: add support for getting short address Alexander Aring
2016-05-23 19:22     ` Alexander Aring
2016-05-27 10:05     ` Stefan Schmidt
2016-05-27 11:03       ` Alexander Aring
2016-05-27 13:20         ` Stefan Schmidt
2016-05-23 19:22   ` [RFC 12/12] 6lowpan: add support for 802.15.4 short addr handling Alexander Aring
2016-05-23 19:22     ` Alexander Aring
2016-05-25  5:13   ` [RFC 00/12] 6lowpan: introduce 6lowpan-nd YOSHIFUJI Hideaki
2016-05-25  5:13     ` YOSHIFUJI Hideaki

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=1464031328-17524-1-git-send-email-aar@pengutronix.de \
    --to=aar-bicnvbalz9megne8c9+irq@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=hannes-tFNcAqjVMyqKXQKiL6tip0B+6BGkLq7r@public.gmane.org \
    --cc=jmorris-gx6/JNMH7DfYtjvyW6yDsg@public.gmane.org \
    --cc=jukka.rissanen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=kaber-dcUjhNyLwpNeoWH0uzbU5w@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=kuznet-v/Mj1YrvjDBInbfyfbPRSQ@public.gmane.org \
    --cc=linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-wpan-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marcel-kz+m5ild9QBg9hUCZPvPmw@public.gmane.org \
    --cc=mcr-SWp7JaYWvAQV+D8aMU/kSg@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=stefan-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
    --cc=werner-SEdMjqphH88wryQfseakQg@public.gmane.org \
    --cc=yoshfuji-VfPWfsRibaP+Ru+s062T9g@public.gmane.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.