[PATCH v3,00/17] IPv6 support

Viacheslav Mitrofanov v.v.mitrofanov at yadro.com
Tue Sep 6 17:09:38 CEST 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


Viacheslav Mitrofanov (17):
  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
  test/py: add a ping6 test

 cmd/Kconfig               |   7 +
 cmd/net.c                 |  62 ++++++
 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            |   9 +-
 net/Kconfig               |  10 +
 net/Makefile              |   3 +
 net/ndisc.c               | 289 +++++++++++++++++++++++++
 net/net.c                 |  53 ++++-
 net/net6.c                | 445 ++++++++++++++++++++++++++++++++++++++
 net/ping6.c               | 120 ++++++++++
 net/tftp.c                |  63 +++++-
 test/dm/eth.c             | 146 +++++++++++++
 test/py/tests/test_net.py |  15 ++
 18 files changed, 1870 insertions(+), 19 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