[U-Boot] [RFC PATCH 0/8] IPv6 support

Joe Hershberger joe.hershberger at gmail.com
Mon Nov 2 21:41:59 CET 2015


Hi Chris,

On Mon, Oct 12, 2015 at 2:43 AM, Chris Packham <judge.packham at gmail.com> wrote:
> This series adds basic IPv6 support to U-boot. It is a reboot of my
> earlier work on this[1]. Technically this is v4 of the series but with
> the amount of time that has passed, rebasing and running though
> checkpatch as well as the support for TFTP I've decided to reset the
> counter back to 1.
>
> Most of this is ported from Allied Telesis' additions to u-boot[2].
> (Note that I am employed by Allied Telesis[3]). The hard work was done
> some time ago by Angga, I've cleaned it up and made some improvements
> with the hope of getting it accepted upstream.

Thanks for all your work on this!

> A few open issues/questions
>
> 1) Presumably the majority of the actual V6 code would be included by a
> config option. How far should I take that? Should the vsprintf code be
> conditional? I'm also not sure where to draw the line between
> CONFIG_NET6 and CONFIG_CMD_NET6, CONFIG_NET and CONFIG_CMD_NET look
> similarly confused.

They are, and I'm trying to tease them apart gradually. I'm using the
rule of thumb that if it is needed to support network traffic
independent of the command line (maybe from a standalone app or some
firmware update thing) then use CONFIG_NET, if it's only adding
command-line net features, then use CONFIG_CMD_NET. It's mostly
confused because in the past only CONFIG_CMD_NET existed to switch all
behavior on and off.

> 2) This code parallels net.c and net.h. Should I
> continue this for the final version or integrate it into net.[ch].

I think it's good to keep them separate for now. A later refactoring
can change that more easily than pulling them apart.

> 3) rxhand_f currently takes an struct in_addr *. TFTP doesn't use this
> (I haven't looked at other users). To support V6 this may need to be a
> new union, a void * with some kind of flag or nothing if no rxhandler
> actually cares.

I'm OK with removing the parameter and reparsing the packet in the
handler if needed. Again, that can be refactored later if it becomes a
pain.

> Regards,
> Chris
> --
> [1] - http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/151390
> [2] - http://www.alliedtelesis.co.nz/support/gpl/other.html
> [3] - some of this has been done on work time, other parts have been
>       done in my personal time. Since I'm subscribed to the list using
>       my gmail account I've signed using that.
>
>
>
> Chris Packham (8):
>   Initial net6.h
>   lib: vsprintf: add IPv6 compressed format %pI6c
>   lib: net_utils: make string_to_ip stricter
>   lib: net_utils: add string_to_ip6
>   net: ipv6 support
>   net: TFTP over IPv6
>   net: IPv6 documentation
>   net: e1000 enable multicast reception
>
>  README                 |   3 +
>  common/Kconfig         |  15 ++
>  common/cmd_net.c       |  41 +++++
>  doc/README.ipv6        |  34 ++++
>  drivers/net/e1000.c    |   5 +
>  include/env_callback.h |   9 +
>  include/env_flags.h    |  10 ++
>  include/net.h          |   5 +-
>  include/net6.h         | 280 +++++++++++++++++++++++++++++++
>  lib/net_utils.c        | 132 ++++++++++++++-
>  lib/vsprintf.c         | 144 +++++++++++++---
>  net/Kconfig            |   5 +
>  net/Makefile           |   3 +
>  net/ndisc.c            | 269 ++++++++++++++++++++++++++++++
>  net/ndisc.h            |  27 +++
>  net/net.c              |  39 ++++-
>  net/net6.c             | 439 +++++++++++++++++++++++++++++++++++++++++++++++++
>  net/ping6.c            | 111 +++++++++++++
>  net/tftp.c             |  37 +++++
>  19 files changed, 1583 insertions(+), 25 deletions(-)
>  create mode 100644 doc/README.ipv6
>  create mode 100644 include/net6.h
>  create mode 100644 net/ndisc.c
>  create mode 100644 net/ndisc.h
>  create mode 100644 net/net6.c
>  create mode 100644 net/ping6.c
>
> --
> 2.5.3
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot


More information about the U-Boot mailing list