[U-Boot] U-Boot IPv6 state

Teddy Reed reed at fb.com
Wed Jan 18 09:44:49 CET 2017



On 01/17/2017 09:49 PM, Luka Kovačič wrote:
> That's great. I could help you to test it. Link-local and maybe
> auto-configuration on the home router.
>
> V tor., 17. jan. 2017 23:19 je oseba Chris Packham
> <judge.packham at gmail.com <mailto:judge.packham at gmail.com>> napisala:
>
>
>
>     On 18/01/2017 5:56 AM, "Luka Kovačič" <luka.kovacica at gmail.com
>     <mailto:luka.kovacica at gmail.com>> wrote:
>
>         Hi,
>         My name is Luka Kovačič and I am just getting interest to
>         U-Boot. I was really confused, because IPv6 is all over U-Boot
>         on the mailing lists, but it actually isn't available in the
>         mainline tree. What is the current state of it? Does it work?
>         Kind regards,
>         Luka
>
>
>     Wow 2 inquiries in 2 days. Something is going on in the ether.
>
>     The last series that was posted is functional but now a little out
>     of date w.r.t. other u-boot changes. I've also got a github repo
>     with the changes applied https://github.com/cpackham/u-boot/tree/ipv6
>

Thanks!

I like the test-command approach.

For some context, I'm testing in QEMU with the added switches:
   -net tap,vlan=0,name=br0,id=net0,script=ifup.sh \
   -net nic,name=br0,vlan=0,model=ftgmac100

Following Redhat's how-to: http://www.linux-kvm.org/page/Networking

And applying a quick patch to net/net.c (2016.07 tag):

                 }
                 goto common;
  #endif
-#ifdef CONFIG_CMD_PING6
+#if defined(CONFIG_CMD_PING6)
         case PING6:
                 if (ip6_is_unspecified_addr(&net_ping_ip6)) {
                         puts("*** ERROR: ping address not given\n");
                         return 1;
                 }
-               goto common;
+               break;
  #endif
  #if defined(CONFIG_CMD_SNTP)

I wanted to avoid the check for `ipaddr`.

 From there I can set CONFIG_PREBOOT commands to ping a pre-configured 
IPv6 address on the selected interface. The NS packets work perfectly, 
but my NIC model is not buffering the entire NA ICMPv6 packet. I'll test 
with hardware tomorrow and report back but I don't suspect any issues 
with the V6 code at all.

Once I apply some tweaks my test case will be similar to the U-Boot 
sandbox tests [1]; but instead a QEMU model is executed to run a 
ping6/tftpboot6. Then an expect script verifies the output and halts the 
emulator. These are nasty integration tests but the most useful if 
you're like me and most of your work is configuring boards rather than 
developing.

>     Tom has applied 2 of the trivial clean up patches so I plan to
>     rebase the series on top of that soon. After that I'll update to use
>     kconfig. Then I'll finally get round to doing what Joe actually
>     asked for and see about adding some tests. I could use some help
>     with that last bit.

[1] https://github.com/trini/u-boot/blob/master/test/py/tests/test_net.py

>


More information about the U-Boot mailing list