Re: [PATCH 00/16] OSv IPv6 support

2018-09-10 Thread Charles Myers
Sorry for delay. A lot of things came up and I finally have some time now to work on addressing the comments in your review. The IPv6 patch set is kind of large and posting it multiple times will be a bit painful for everyone, so I will provide a link to a github branch with the changes as

[PATCH 06/16] bsd: Added IPv6 net channel support

2018-08-06 Thread Charles Myers
classifier changed to object pointer instead of embedded in struct ifnet to reduce compile dependencies. There was also issue with including ip6.h in this file, but that could probably be fixed with struct ip6_hdr forward delcaration and including in6.h instead. Signed-off-by: Charles Myers

[PATCH 12/16] bsd: Fix SIOCSIFNAME when using linux compatiblity socket

2018-08-06 Thread Charles Myers
Signed-off-by: Charles Myers --- bsd/sys/compat/linux/linux_ioctl.cc | 37 + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/bsd/sys/compat/linux/linux_ioctl.cc b/bsd/sys/compat/linux/linux_ioctl.cc index 43a50bb..d49386d 100644 --- a/bsd/sys

[PATCH 10/16] libc: Fix if_indextoname(), if_nametoindex()

2018-08-06 Thread Charles Myers
Use AF_INET instead of AF_UNIX Signed-off-by: Charles Myers --- libc/network/if_indextoname.c | 2 +- libc/network/if_nametoindex.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/network/if_indextoname.c b/libc/network/if_indextoname.c index e7f526d..edda5f0 100644

[PATCH 08/16] bsd: OSv API support for IPv6

2018-08-06 Thread Charles Myers
Signed-off-by: Charles Myers --- bsd/porting/networking.cc | 178 +- bsd/porting/networking.hh | 8 +++ bsd/porting/route.cc | 86 ++ bsd/sys/netinet/in.cc | 10 +++ bsd/sys/netinet/in.h | 1 + loader.cc

[PATCH 09/16] bsd: Added partial Linux NETLINK socket support

2018-08-06 Thread Charles Myers
Signed-off-by: Charles Myers --- Makefile | 1 + bsd/net.cc| 5 + bsd/sys/compat/linux/linux_netlink.cc | 904 ++ bsd/sys/compat/linux/linux_netlink.h | 175 +++ bsd/sys/compat/linux/linux_socket.cc

[PATCH 14/16] cloud-init: Added support for Network v1 and ConfigDrive data source

2018-08-06 Thread Charles Myers
https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v1.html Currently only interface naming, static IP, routes and DNS are supported. Signed-off-by: Charles Myers --- modules/cloud-init/Makefile | 2 +- modules/cloud-init/main.cc | 77 +--- modules

[PATCH 15/16] bsd: Added unit tests for IPv6 TCP, IP_PKTINFO, IPV6_PKTINFO, SCM_TIMESTAMP

2018-08-06 Thread Charles Myers
Signed-off-by: Charles Myers --- modules/tests/Makefile| 16 ++- tests/tst-pktinfo.cc | 245 ++ tests/tst-socket-timestamp.cc | 162 tests/tst-tcp-v6.cc | 240

[PATCH 16/16] bsd: Added conf-INET6 option to enable IPv6 support

2018-08-06 Thread Charles Myers
Signed-off-by: Charles Myers --- Makefile | 27 ++- bsd/net.cc | 23 +++- bsd/porting/netport.h| 4 +++ bsd/sys/dev/xen/netfront/netfront.cc | 4 +++ conf/base.mk | 5

[PATCH 11/16] libc: Add IPv6 support to getifaddrs(), if_nameindex() using NETLINK socket

2018-08-06 Thread Charles Myers
libc code is from musl library with minor change to prevent partial reads if faster than sender. Signed-off-by: Charles Myers --- Makefile| 1 + libc/network/getifaddrs.c | 392 libc/network/if_nameindex.c | 136

[PATCH 13/16] bsd: linux socket support for IPv6, IP_PKTINFO, IPV6_PKTINFO, SCM_TIMESTAMP

2018-08-06 Thread Charles Myers
l_size_t in linux.h was not correct size for 64-bit long Signed-off-by: Charles Myers --- bsd/sys/compat/linux/linux.h | 12 +- bsd/sys/compat/linux/linux_socket.cc | 727 ++- bsd/sys/compat/linux/linux_socket.h | 101 - bsd/sys/kern

[PATCH 07/16] bsd: Modifications to shared IPv4/IPv6 code (eth,tcp,udp) for IPv6

2018-08-06 Thread Charles Myers
lltable_foreach(), lltable_foreach_lle() added to support NETLINK sockets Signed-off-by: Charles Myers --- bsd/sys/net/if_ethersubr.cc | 5 ++--- bsd/sys/net/if_llatbl.cc| 47 ++--- bsd/sys/net/if_llatbl.h | 13 bsd/sys

[PATCH 03/16] bsd: Renamed IPv6 files from *.c to *.cc

2018-08-06 Thread Charles Myers
Signed-off-by: Charles Myers --- bsd/sys/netinet6/{dest6.c => dest6.cc} | 0 bsd/sys/netinet6/{frag6.c => frag6.cc} | 0 bsd/sys/netinet6/{icmp6.c => icmp6.cc} | 0 bsd/sys/netinet6/{in6.c => in6.cc} | 0 bsd/sys/netinet6/

[PATCH 04/16] bsd: Modify FreeBSD IPv6 .h files for OSv

2018-08-06 Thread Charles Myers
Signed-off-by: Charles Myers --- bsd/sys/netinet/icmp6.h | 2 + bsd/sys/netinet/ip6.h | 93 +-- bsd/sys/netinet6/in6.h| 125 +++ bsd/sys/netinet6/in6_pcb.h| 30 bsd/sys/netinet6/in6_var.h| 170

[PATCH 00/16] OSv IPv6 support

2018-08-06 Thread Charles Myers
name: eth0 subnets: - type: static address: 2001:1:1::501/64 Charles Myers (16): bsd: Added unmodified IPv6 .h files from FreeBSD 9.0 bsd: Added unmodified IPv6 .c files from FreeBSD 9.0 bsd: Renamed IPv6 files from *.c to *.cc bsd: Modify FreeBSD IPv6 .h files for OSv b

[PATCH] bsd: Modify KASSERT() macro to print included message for better debug

2018-08-03 Thread Charles Myers
--- bsd/porting/netport.h| 9 - bsd/sys/net/if.cc| 4 ++-- bsd/sys/net/netisr.cc| 20 ++-- bsd/sys/netinet/tcp_timer.cc | 2 +- bsd/sys/sys/systm.h | 4 +--- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git

[PATCH] bsd: Added mtx_trylock()

2018-08-03 Thread Charles Myers
Used in FreeBSD IPv6 code sys/netinet6/frag6.c IP6Q_TRYLOCK(). --- bsd/porting/sync_stub.c | 5 + bsd/porting/sync_stub.h | 1 + 2 files changed, 6 insertions(+) diff --git a/bsd/porting/sync_stub.c b/bsd/porting/sync_stub.c index 8d341d8..e871b20 100644 --- a/bsd/porting/sync_stub.c +++

Re: OSv IPv6

2018-08-03 Thread Charles Myers
It took me a while to split out the patches according to your guidelines, since they were not organized that way. I will be submitting them probably starting tomorrow or maybe early next week. The largest patch will be around 1 MB for the unmodified IPv6 .c files. Each part of the series