[PATCH v5 00/19] IPv6 support

Viacheslav Mitrofanov v.v.mitrofanov at yadro.com
Fri Dec 2 10:17:57 CET 2022


This patch set adds basic IPv6 support to U-boot.
It is based on Chris's Packham patches
(https://lists.denx.de/pipermail/u-boot/2017-January/279366.html)
Chris's patches were taken as base. There were efforts to launch it on
HiFive SiFive Unmatched board but the board didn't work well. The code was
refactored, fixed some bugs as CRC for little-endian, some parts were implemented in
our own way, something was taken from Linux. Finally we did manual tests and the
board worked well.

Testing was done on HiFive SiFive Unmatched board (RISC-V)

Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov at yadro.com>

---
Changes in v2:
 - Split big patches into smaller
 - If an address in tftpboot is IPv6 than use IPv6 to boot
 - Add tests

Changes in v3:
 - Added functions and structures description in whole patch-series
 - Removed memory allocation in on_ip6addr()
 - Some functions got return code from errno.h
 - Add to string_to_ip6() length parameter to avoid obligatory null termination
 - Add a lot of small decorative cnages

Changes in v4:
 - Fixed funcs and structures style description
 - Added omitted tags 

Changes in v5:
 - Move patches to the latest u-boot version 
 - Move IPV6 tests under CONFIG_IPV6 ifdef
 - Add CONFIG_IPV6 to sandboxes

Viacheslav Mitrofanov (19):
  net: ipv6: Add IPv6 basic primitives
  net: ipv6: Add IPv6 build options
  net: ipv6: Add callbacks declarations to get access to IPv6 variables
  net: ipv6: Add Neighbor Discovery Protocol (NDP)
  net: ipv6: Add string_to_ip6 converter
  net: ipv6: Enable IPv6 typeconversion specifier
  net: ipv6: Add ip6addr, gatewayip6, serverip6 variables callbacks
  net: ipv6: Add implementation of main IPv6 functions
  net: ipv6: Incorporate IPv6 support into u-boot net subsystem
  net: tftp: Add IPv6 support for tftpboot
  net: ping6: Add ping6 command
  test: dm: eth: Add string_to_ip6 test
  test: dm: eth: Add csum_ipv6_magic test
  test: dm: eth: Add ip6_addr_in_subnet test
  test: dm: eth: Add ip6_make_snma test
  test: dm: eth: Add ip6_make_lladdr test
  configs: Add IPV6 config to sandbox_defconfig
  configs: Add IPV6 config to sandbox64_defconfig
  configs: Add IPV6 config to sandbox_flattree_defconfig

 cmd/Kconfig                        |   7 +
 cmd/net.c                          |  61 ++++
 configs/sandbox64_defconfig        |   1 +
 configs/sandbox_defconfig          |   1 +
 configs/sandbox_flattree_defconfig |   1 +
 include/env_callback.h             |  10 +
 include/env_flags.h                |  10 +
 include/ndisc.h                    | 102 +++++++
 include/net.h                      |   4 +-
 include/net6.h                     | 432 ++++++++++++++++++++++++++++
 lib/net_utils.c                    | 109 +++++++
 lib/vsprintf.c                     |   7 +-
 net/Kconfig                        |  10 +
 net/Makefile                       |   3 +
 net/ndisc.c                        | 289 +++++++++++++++++++
 net/net.c                          |  53 +++-
 net/net6.c                         | 445 +++++++++++++++++++++++++++++
 net/ping6.c                        | 118 ++++++++
 net/tftp.c                         |  58 +++-
 test/dm/eth.c                      | 148 ++++++++++
 20 files changed, 1853 insertions(+), 16 deletions(-)
 create mode 100644 include/ndisc.h
 create mode 100644 include/net6.h
 create mode 100644 net/ndisc.c
 create mode 100644 net/net6.c
 create mode 100644 net/ping6.c

-- 
2.25.1



More information about the U-Boot mailing list