[Qemu-devel] [PULL] MAINTAINERS: Add Samuel Thibault as slirp maintainer

2016-03-08 Thread Samuel Thibault
From: Samuel Thibault Signed-off-by: Samuel Thibault Acked-by: Jan Kiszka --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2f5a338..a316bc3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1217,6 +1217,7 @@ F: scripts/qmp/ T: git git

[Qemu-devel] [PATCHv10 01/11] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-03-08 Thread Samuel Thibault
refresh its route. This also adds ip6_cksum() to compute ICMPv6 checksums using IPv6 pseudo-header. Some #define ETH_* are moved upper in slirp.h to make them accessible to other slirp/*.h Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp

[Qemu-devel] [PATCHv10 04/11] slirp: Adding IPv6 UDP support

2016-03-08 Thread Samuel Thibault
From: Guillaume Subiron This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault

[Qemu-devel] [PATCHv10 09/11] slirp: Adding IPv6 address for DNS relay

2016-03-08 Thread Samuel Thibault
points to localhost. Further development will be needed to automatically fetch the IPv6 address from resolv.conf, and announce this via RDNSS. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip6.h| 6 +- slirp/slirp.c | 3 +++ slirp

[Qemu-devel] [PATCHv10 05/11] slirp: Factorizing tcpiphdr structure with an union

2016-03-08 Thread Samuel Thibault
functions, and makes them compatible with the new tcpiphdr structure, whose size will be bigger than sizeof(struct tcphdr) + sizeof(struct ip) Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/if.h | 4 ++-- slirp/mbuf.c | 4

[Qemu-devel] [PATCHv10 10/11] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-03-08 Thread Samuel Thibault
Bordenave Signed-off-by: Samuel Thibault --- net/net.c| 31 ++ net/slirp.c | 81 +++- qapi-schema.json | 12 + qemu-options.hx | 18 +++-- slirp/libslirp.h | 8 +++--- slirp/slirp.c| 28

[Qemu-devel] [PATCHv10 08/11] slirp: Handle IPv6 in TCP functions

2016-03-08 Thread Samuel Thibault
From: Guillaume Subiron This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth

[Qemu-devel] [PATCHv10 06/11] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2016-03-08 Thread Samuel Thibault
h does not include the entailed reindentation, to make proofread easier. Reindentation is adressed in the following no-op patch. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip_input.c | 2 +- slirp/slirp.c | 6 +++-- slirp/slirp.h

[Qemu-devel] [PATCHv10 02/11] slirp: Fix ICMP error sending

2016-03-08 Thread Samuel Thibault
From: Yann Bordenave Disambiguation : icmp_error is renamed into icmp_send_error, since it doesn't manage errors, but only sends ICMP Error messages. Signed-off-by: Yann Bordenave Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip6_input.c | 2 +- slirp/ip_icmp.c

[Qemu-devel] [PATCHv10 07/11] slirp: Reindent after refactoring

2016-03-08 Thread Samuel Thibault
From: Guillaume Subiron No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/tcp_input.c | 104 ++--- slirp/tcp_output.c | 29 --- slirp/tcp_subr.c | 50

[Qemu-devel] [PATCHv10 0/11] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-08 Thread Samuel Thibault
Hello, This is another respin of IPv6 in Qemu -net user mode. These patches add ICMPv6, NDP, make UDP and TCP compatible with IPv6, and add TFTP over IPv6. Difference with version 9 is: - split icmp error patch in two - fix sending icmp6 errors on unreachable net or host - forbidding prefix le

[Qemu-devel] [PATCHv10 11/11] slirp: Add IPv6 support to the TFTP code

2016-03-08 Thread Samuel Thibault
From: Thomas Huth Add the handler code for incoming TFTP packets to udp6_input(), and make sure that the TFTP code can send packets with both, udp_output() and udp6_output() by introducing a wrapper function called tftp_udp_output(). Signed-off-by: Thomas Huth Reviewed-by: Samuel Thibault

[Qemu-devel] [PATCHv10 03/11] slirp: Adding ICMPv6 error sending

2016-03-08 Thread Samuel Thibault
: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip6_icmp.c | 66 +++ slirp/ip6_icmp.h | 10 + slirp/ip6_input.c | 11 +++--- 3 files changed, 84 insertions(+), 3 deletions(-) diff --git a/slirp/ip6_icmp.c b/slirp/ip6_icmp.c index

[Qemu-devel] [PULL] MAINTAINERS: Add Samuel Thibault as slirp maintainer

2016-03-08 Thread Samuel Thibault
ags/samuel-thibault for you to fetch changes up to 1aa0033e3b8cce188be885573763552baccb1316: MAINTAINERS: Add Samuel Thibault as slirp maintainer (2016-03-07 14:42:51 +0100) ---- Add Samuel Thibault as slirp

[Qemu-devel] [PULL] MAINTAINERS: Add Samuel Thibault as slirp maintainer

2016-03-08 Thread Samuel Thibault
From: Samuel Thibault Signed-off-by: Samuel Thibault --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2f5a338..a316bc3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1217,6 +1217,7 @@ F: scripts/qmp/ T: git git://repo.or.cz/qemu/armbru.git

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-08 Thread Samuel Thibault
Jason Wang, on Tue 08 Mar 2016 10:15:57 +0800, wrote: > Build works but get some warnings: > > > slirp/ip6_icmp.c: In function 'icmp6_send_error': > slirp/ip6_icmp.c:84:5: warning: implicit declaration of function > 'inet_ntop' [-Wimplicit-function-declaration] > inet_ntop(AF_INET6, &rip->ip

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-08 Thread Samuel Thibault
Jason Wang, on Tue 08 Mar 2016 10:48:27 +0800, wrote: > ./scripts/checkpatch.pl > 0001-slirp-Adding-IPv6-ICMPv6-Echo-and-NDP-autoconfigurat.patch > ERROR: return is not a function, parentheses are not required > #177: FILE: slirp/ip6.h:65: > +return (a->s6_addr[prefix_len / 8] & ((1U << (8 - (p

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Samuel Thibault
Hello, Thomas Huth, on Mon 07 Mar 2016 16:37:59 +0100, wrote: > Is that "#include " required in ip6.h at all? It also seems > to compile if I omit that include completely here... Well, it makes sense to put it in ip6.h. That said, since ip6.h is only included through slirp.h which includes netin

[Qemu-devel] [PULL] MAINTAINERS: Add Samuel Thibault as slirp maintainer

2016-03-07 Thread Samuel Thibault
From: Samuel Thibault Signed-off-by: Samuel Thibault --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2f5a338..a316bc3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1217,6 +1217,7 @@ F: scripts/qmp/ T: git git://repo.or.cz/qemu/armbru.git

[Qemu-devel] [PULL] MAINTAINERS: Add Samuel Thibault as slirp maintainer

2016-03-07 Thread Samuel Thibault
for you to fetch changes up to 1aa0033e3b8cce188be885573763552baccb1316: MAINTAINERS: Add Samuel Thibault as slirp maintainer (2016-03-07 14:42:51 +0100) -------- Samuel Thibault (1): MAINTAINERS: Add Samuel Thibault as slirp

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Samuel Thibault
Thomas Huth, on Mon 07 Mar 2016 13:00:48 +0100, wrote: > On 07.03.2016 12:19, Samuel Thibault wrote: > > Jason Wang, on Mon 07 Mar 2016 14:48:16 +0800, wrote: > >> - I expects a unit-test for this. You may want to have a look at the > >> pxe-test in tests/, I think i

Re: [Qemu-devel] [PATCHv9 02/10] slirp: Adding ICMPv6 error sending

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 14:55:52 +0800, wrote: > On 02/23/2016 03:28 AM, Samuel Thibault wrote: > > From: Yann Bordenave > > > > Disambiguation : icmp_error is renamed into icmp_send_error, since it > > doesn't manage errors, but only sends ICM

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Samuel Thibault
Jan Kiszka, on Mon 07 Mar 2016 13:06:20 +0100, wrote: > On 2016-03-07 12:09, Samuel Thibault wrote: > > Jason Wang, on Mon 07 Mar 2016 13:03:11 +0800, wrote: > >> Btw, do you want to be the maintainer of slirp? (Or maybe Tohmas want to > >> do this?) > > > >

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 14:48:16 +0800, wrote: > - the series does not build on w32: > In file included from ./slirp/slirp.h:126:0, > from stubs/slirp.c:3: > ./slirp/ip6.h:9:24: fatal error: netinet/in.h: No such file or directory Is it the only issue? Does it build if you

Re: [Qemu-devel] [PATCHv9 09/10] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 15:05:05 +0800, wrote: > Please do unnecessary changes like this since it will cause extra effort > for git blame and other things. Ok. I just do hope that no other reviewer will come and say that we should fix the alignment of the parameters. Samuel

Re: [Qemu-devel] [PATCHv9 09/10] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 15:05:05 +0800, wrote: > Please do unnecessary changes like this since it will cause extra effort > for git blame and other things. Which is exactly why we avoided to fix all the checkpatch warnings by leaving existing non-qemu-style indentation. Samuel

Re: [Qemu-devel] [PATCHv9 06/10] slirp: Reindent after refactoring

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 15:02:53 +0800, wrote: > On 02/23/2016 03:28 AM, Samuel Thibault wrote: > > From: Guillaume Subiron > > > > No code change. > > > > Signed-off-by: Guillaume Subiron > > Signed-off-by: Samuel Thibault > > Reviewed-by

Re: [Qemu-devel] [PATCHv9 03/10] slirp: Adding IPv6 UDP support

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 14:57:11 +0800, wrote: > Part of the codes looks duplicated with ipv4 version. Any chances to > merge them like tcp? The duplication is actually quite small: accessing the ip length is different, filling the address is different, etc. So there are differences all al

Re: [Qemu-devel] [PATCHv9 01/10] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 14:53:54 +0800, wrote: > > +switch (ip6->ip_nh) { > > +#if 0 > > +case IPPROTO_TCP: > > +tcp_input(m, hlen, (struct socket *)NULL); > > +break; > > +case IPPROTO_UDP: > > +udp_input(m, hlen); > > +break; > > +#endif > > Thi

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 14:48:16 +0800, wrote: > - Lots of checkpatch warnings, let's try to silent it. They are indentation issues, yes. They are already existing in slirp/ . Whenever new code was added we sticked with the qemu style, but for patched code we prefered to stick to the existi

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-07 Thread Samuel Thibault
Jason Wang, on Mon 07 Mar 2016 13:03:11 +0800, wrote: > Btw, do you want to be the maintainer of slirp? (Or maybe Tohmas want to > do this?) I already said I was fine with it, yes, and submitted a MAINTAINERS patch towards that, without any response. Samuel

Re: [Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-03-06 Thread Samuel Thibault
Hello, Jan Kiszka, on Fri 04 Mar 2016 16:50:32 +0100, wrote: > On 2016-03-04 09:41, Thomas Huth wrote: > > On 22.02.2016 20:28, Samuel Thibault wrote: > >> Hello, > >> > >> This is another respin of IPv6 in Qemu -net user mode. > >> > >> Thes

[Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-25 Thread Samuel Thibault
struct quehead, and use casts as appropriate. Signed-off-by: Samuel Thibault Reviewed-by: Peter Maydell --- slirp/if.c| 27 ++- slirp/mbuf.c | 19 ++- slirp/misc.c | 5 - slirp/misc.h | 5 + slirp/slirp.h | 8 +--- 5 files changed, 34

Re: [Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-25 Thread Samuel Thibault
Peter Maydell, on Thu 25 Feb 2016 15:22:25 +, wrote: > On 22 February 2016 at 21:29, Samuel Thibault > wrote: > > struct mbuf uses a C99 open char array to allow inlining data. > > At the moment it doesn't, it uses a 1 byte array :-) Turning that > into a C99 flexib

[Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-22 Thread Samuel Thibault
appropriate. Signed-off-by: Samuel Thibault --- slirp/if.c| 27 ++- slirp/mbuf.c | 19 ++- slirp/misc.c | 5 - slirp/misc.h | 5 + slirp/slirp.h | 8 +--- 5 files changed, 34 insertions(+), 30 deletions(-) diff --git a/slirp/if.c b/slirp

[Qemu-devel] [PATCHv9 01/10] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-22 Thread Samuel Thibault
refresh its route. This also adds ip6_cksum() to compute ICMPv6 checksums using IPv6 pseudo-header. Some #define ETH_* are moved upper in slirp.h to make them accessible to other slirp/*.h Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp

[Qemu-devel] [PATCHv9 05/10] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2016-02-22 Thread Samuel Thibault
h does not include the entailed reindentation, to make proofread easier. Reindentation is adressed in the following no-op patch. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip_input.c | 2 +- slirp/slirp.c | 6 -- slirp/slirp.h

[Qemu-devel] [PATCHv9 04/10] slirp: Factorizing tcpiphdr structure with an union

2016-02-22 Thread Samuel Thibault
functions, and makes them compatible with the new tcpiphdr structure, whose size will be bigger than sizeof(struct tcphdr) + sizeof(struct ip) Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/if.h | 4 ++-- slirp/mbuf.c | 4 ++-- slirp/slirp.c | 15

[Qemu-devel] [PATCHv9 07/10] slirp: Handle IPv6 in TCP functions

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth

[Qemu-devel] [PATCHv9 09/10] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-02-22 Thread Samuel Thibault
Bordenave Signed-off-by: Samuel Thibault --- net/net.c| 31 + net/slirp.c | 69 +++- qapi-schema.json | 40 qemu-options.hx | 18 +-- slirp/libslirp.h | 8

[Qemu-devel] [PATCHv9 02/10] slirp: Adding ICMPv6 error sending

2016-02-22 Thread Samuel Thibault
ns to send ICMP errors, when a received packet is too big, or when its hop limit is 0. Signed-off-by: Yann Bordenave Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip6_icmp.c | 64 +++ slirp/ip6_icmp.h | 10 +

[Qemu-devel] [PATCHv9 08/10] slirp: Adding IPv6 address for DNS relay

2016-02-22 Thread Samuel Thibault
points to localhost. Further development will be needed to automatically fetch the IPv6 address from resolv.conf, and announce this via RDNSS. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip6.h| 6 +- slirp/slirp.c | 1 + slirp/slirp.h | 1 + slirp

[Qemu-devel] [PATCHv9 06/10] slirp: Reindent after refactoring

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/tcp_input.c | 92 +++--- slirp/tcp_output.c | 29 + slirp/tcp_subr.c | 50

[Qemu-devel] [PATCHv9 10/10] slirp: Add IPv6 support to the TFTP code

2016-02-22 Thread Samuel Thibault
From: Thomas Huth Add the handler code for incoming TFTP packets to udp6_input(), and make sure that the TFTP code can send packets with both, udp_output() and udp6_output() by introducing a wrapper function called tftp_udp_output(). Signed-off-by: Thomas Huth Reviewed-by: Samuel Thibault

[Qemu-devel] [PATCHv9 0/10] slirp: Adding IPv6 support to Qemu -net user mode

2016-02-22 Thread Samuel Thibault
Hello, This is another respin of IPv6 in Qemu -net user mode. These patches add ICMPv6, NDP, make UDP and TCP compatible with IPv6, and add TFTP over IPv6. Difference with version 8 is: - Fix freeing random number generator - Fix coding style - Fix prefix lengths in in6_equal_dns macro Here i

[Qemu-devel] [PATCHv9 03/10] slirp: Adding IPv6 UDP support

2016-02-22 Thread Samuel Thibault
From: Guillaume Subiron This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault

Re: [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-22 Thread Samuel Thibault
Hello, Thomas Huth, on Mon 22 Feb 2016 08:56:59 +0100, wrote: > would it maybe be applicable to use the > TCPIPHDR_DELTA macro here instead? No, because that includes a round up, while here we need an exact difference. Samuel

Re: [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-21 Thread Samuel Thibault
Hello, Thomas Huth, on Fri 19 Feb 2016 14:44:59 +0100, wrote: > > + m->m_data -= sizeof(struct tcpiphdr) - (sizeof(struct ip) > > ++ sizeof(struct tcphdr)); > > + m->m_len += sizeof(struct tcpiphdr) - (sizeof(struct ip) > > +

Re: [Qemu-devel] [PULL 00/13] vhost, virtio, pci, pxe

2016-02-19 Thread Samuel Thibault
Hello, Peter Maydell, on Fri 19 Feb 2016 12:09:17 +, wrote: > We can do that, I think, by updating slirp to use C99 flexible > arrays: Indeed. > diff --git a/slirp/mbuf.h b/slirp/mbuf.h > index 38fedf4..ef5a4f7 100644 > --- a/slirp/mbuf.h > +++ b/slirp/mbuf.h > @@ -81,11 +81,9 @@ struct mbuf

Re: [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-18 Thread Samuel Thibault
Hello, Just to make sure: we have not received comments on this patch. (that said, it's the most complex part of the series, so I'm not surprised if it takes more time :) ) Samuel Samuel Thibault, on Sun 14 Feb 2016 18:47:38 +0100, wrote: > From: Guillaume Subiron > > Th

Re: [Qemu-devel] [PATCHv7 9/9] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-02-18 Thread Samuel Thibault
Thomas Huth, on Wed 17 Feb 2016 12:59:04 +0100, wrote: > The IPv4 code seems to have a sanity check that the vhost address is > within the same net as specified with the "net=" parameter... maybe the > IPv6 part should have that, too? Or use the prefix from "ip6-net=" here > if ip6-host has not bee

Re: [Qemu-devel] [PATCHv7 8/9] slirp: Adding IPv6 address for DNS relay

2016-02-18 Thread Samuel Thibault
Samuel Thibault, on Wed 17 Feb 2016 10:36:35 +0100, wrote: > That's now like this in my tree: > > diff --git a/slirp/ip6.h b/slirp/ip6.h > index 9f7623f..9e4844e 100644 > --- a/slirp/ip6.h > +++ b/slirp/ip6.h > @@ -70,7 +70,11 @@ static inline bool in6_equal_mac

Re: [Qemu-devel] [PATCHv7 8/9] slirp: Adding IPv6 address for DNS relay

2016-02-17 Thread Samuel Thibault
Thomas Huth, on Wed 17 Feb 2016 10:28:26 +0100, wrote: > On 14.02.2016 18:47, Samuel Thibault wrote: > > From: Guillaume Subiron > > > > This patch adds an IPv6 address to the DNS relay. in6_equal_dns() is > > developed using this Slirp attribute. > > sotranslate

Re: [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions

2016-02-17 Thread Samuel Thibault
Thomas Huth, on Wed 17 Feb 2016 10:18:20 +0100, wrote: > > @@ -204,6 +218,20 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti, > > struct mbuf *m, > > (void) ip_output((struct socket *)0, m); > > break; > > > > + case AF_INET6: > > + m->m_data += sizeof(struct tcpiphd

Re: [Qemu-devel] [PATCH v2] slirp: Add IPv6 support to the TFTP code

2016-02-17 Thread Samuel Thibault
> Signed-off-by: Thomas Huth Reviewed-by: Samuel Thibault > --- > v2: Changes according to the review of Samuel Thibault: > - Use the "slirp" parameter as the first parameter > - Use structure assignments instead of memcpy() > > This patch has to be applied on

Re: [Qemu-devel] [PATCH] slirp: Add IPv6 support to the TFTP code

2016-02-16 Thread Samuel Thibault
Hello, Thanks for working on it :) Thomas Huth, on Tue 16 Feb 2016 09:47:38 +0100, wrote: > -static int tftp_session_allocate(Slirp *slirp, struct tftp_t *tp) > +static int tftp_session_allocate(struct sockaddr_storage *srcsas, Slirp > *slirp, > + struct tftp_t *t

[Qemu-devel] [PATCHv7 5/9] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2016-02-14 Thread Samuel Thibault
h does not include the entailed reindentation, to make proofread easier. Reindentation is adressed in the following no-op patch. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip_input.c | 2 +- slirp/slirp.c | 6 -- slirp/slirp.h | 5 +++-- slirp/t

[Qemu-devel] [PATCHv7 9/9] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-02-14 Thread Samuel Thibault
Bordenave Signed-off-by: Samuel Thibault --- net/net.c| 31 +++ net/slirp.c | 50 -- qapi-schema.json | 40 ++-- qemu-options.hx | 18 -- slirp/libslirp.h

[Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-14 Thread Samuel Thibault
refresh its route. This also adds ip6_cksum() to compute ICMPv6 checksums using IPv6 pseudo-header. Some #define ETH_* are moved upper in slirp.h to make them accessible to other slirp/*.h Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/Makefile.objs | 6 +- slirp/cksum.c

[Qemu-devel] [PATCHv7 8/9] slirp: Adding IPv6 address for DNS relay

2016-02-14 Thread Samuel Thibault
points to localhost. Further development will be needed to automatically fetch the IPv6 address from resolv.conf, and announce this via RDNSS. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip6.h| 5 - slirp/slirp.c | 1 + slirp/slirp.h | 1 + slirp

[Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions

2016-02-14 Thread Samuel Thibault
From: Guillaume Subiron This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip6_input.c

[Qemu-devel] [PATCHv7 6/9] slirp: Reindent after refactoring

2016-02-14 Thread Samuel Thibault
From: Guillaume Subiron No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/tcp_input.c | 92 +++--- slirp/tcp_output.c | 29 + slirp/tcp_subr.c | 50 ++--- 3

[Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-14 Thread Samuel Thibault
functions, and makes them compatible with the new tcpiphdr structure, whose size will be bigger than sizeof(struct tcphdr) + sizeof(struct ip) Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/if.h | 4 ++-- slirp/mbuf.c | 3 ++- slirp/slirp.c | 15

[Qemu-devel] [PATCHv8 0/9] slirp: Adding IPv6 support to Qemu -net user mode

2016-02-14 Thread Samuel Thibault
Hello, This is another respin of IPv6 in Qemu -net user mode. These patches add ICMPv6, NDP, and make UDP and TCP compatible with IPv6. Difference with version 7 is: - Fix overflow detection in strtol call - Fix formatting and typos - Use SLIRP_ prefix for header protection - Use grand instead

[Qemu-devel] [PATCHv7 2/9] slirp: Adding ICMPv6 error sending

2016-02-14 Thread Samuel Thibault
ns to send ICMP errors, when a received packet is too big, or when its hop limit is 0. Signed-off-by: Yann Bordenave Signed-off-by: Samuel Thibault --- slirp/ip6_icmp.c | 64 +++ slirp/ip6_icmp.h | 10 + slirp/ip6_input.c

[Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-14 Thread Samuel Thibault
From: Guillaume Subiron This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault

Re: [Qemu-devel] [PATCHv7 6/9] slirp: Reindent after refactoring

2016-02-11 Thread Samuel Thibault
Eric Blake, on Thu 11 Feb 2016 10:56:30 -0700, wrote: > On 02/10/2016 02:20 AM, Samuel Thibault wrote: > > Thomas Huth, on Wed 10 Feb 2016 09:42:04 +0100, wrote: > >> On 08.02.2016 11:28, Samuel Thibault wrote: > >>> Signed-off-by: Guillaume Subiron > &

Re: [Qemu-devel] [PATCHv7 9/9] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-02-10 Thread Samuel Thibault
Thomas Huth, on Wed 10 Feb 2016 12:39:10 +0100, wrote: > > +if (!vprefix6) { > > +vprefix6 = "fec0::"; > > Site-local prefixes have already been deprecated (see rfc3879) ... would > it be feasible to use a ULA prefix instead (fd00::/8, > see rfc4193) ? The question is which ULA. Ideal

Re: [Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions

2016-02-10 Thread Samuel Thibault
Thomas Huth, on Wed 10 Feb 2016 11:47:05 +0100, wrote: > > + ip = mtod(m, struct ip *); > > + ip6 = mtod(m, struct ip6 *); > > + save_ip = *ip; > > + save_ip6 = *ip6; > > Could you do the "save_ip = *ip" within the "case AF_INET" below, and > the "save_ip6 = *ip6" within the case AF_INET6

Re: [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-10 Thread Samuel Thibault
Thomas Huth, on Wed 10 Feb 2016 11:08:55 +0100, wrote: > On 10.02.2016 10:28, Samuel Thibault wrote: > > Thomas Huth, on Wed 10 Feb 2016 09:05:32 +0100, wrote: > >>> -#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + offsetof(struct mbuf, > >>> m_dat

Re: [Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-10 Thread Samuel Thibault
That one is tricky, yes :) Thomas Huth, on Wed 10 Feb 2016 09:05:32 +0100, wrote: > > -#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + offsetof(struct mbuf, m_dat) > > + 6) > > +#define SLIRP_MSIZE\ > > +(offsetof(struct mbuf, m_dat) + IF_MAXLINKHDR + TCPIPHDR_DELTA + > > IF_MTU) > > I'm some

Re: [Qemu-devel] [PATCHv7 6/9] slirp: Reindent after refactoring

2016-02-10 Thread Samuel Thibault
Thomas Huth, on Wed 10 Feb 2016 09:42:04 +0100, wrote: > On 08.02.2016 11:28, Samuel Thibault wrote: > > Signed-off-by: Guillaume Subiron > > Signed-off-by: Samuel Thibault > > --- > > slirp/tcp_input.c | 99 > > +++--

Re: [Qemu-devel] [PATCHv7 5/9] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2016-02-10 Thread Samuel Thibault
Thomas Huth, on Wed 10 Feb 2016 09:35:31 +0100, wrote: > Hmm, this jumps to a "return (error)" statement ... but as far as I can > see, error has never been initialized in this case? Actually those places are unreachable (the address family can only be INET at this point, and only INET or INET6 on

Re: [Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-09 Thread Samuel Thibault
Thomas Huth, on Wed 10 Feb 2016 08:18:45 +0100, wrote: > On 09.02.2016 22:19, Samuel Thibault wrote: > > Thanks for your reviews so far! I have integrated the rest of comments, > > the only remaining question for patches 1-3 is about srand() and rand(). > > I personally d

Re: [Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-09 Thread Samuel Thibault
Thanks for your reviews so far! I have integrated the rest of comments, the only remaining question for patches 1-3 is about srand() and rand(). Samuel

Re: [Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-09 Thread Samuel Thibault
Thomas Huth, on Tue 09 Feb 2016 21:44:18 +0100, wrote: > > + case AF_INET6: > > + udp6_output(so, m, (struct sockaddr_in6 *) &saddr, > > + (struct sockaddr_in6 *) &daddr); > > + break; > > default: > > + g_assert_not_reached(); > >

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Samuel Thibault
Thomas Huth, on Tue 09 Feb 2016 17:14:15 +0100, wrote: > > +srand(time(NULL)); > > That srand should maybe be done in main() instead? (Otherwise every > subsystem might end up in repeating this all over the place) Eric Blake added: > >> +#define rand_a_b(a, b)\ > >> +(rand()%(int)(b-a)+a)

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Samuel Thibault
Thomas Huth, on Tue 09 Feb 2016 20:32:49 +0100, wrote: > Maybe checkpatch.pl could also be silenced by putting the "==" at the > end of the first line instead? No, it still warns. Samuel

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Samuel Thibault
Thomas Huth, on Tue 09 Feb 2016 17:14:15 +0100, wrote: > A lot of these defines seem to be define in already > (as recommended by RFC 3542) ... would it be feasible to use that > standard header, instead of redefining here everything? I'm wondering how widely available that is. On windows, for i

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Samuel Thibault
Eric Blake, on Tue 09 Feb 2016 09:31:30 -0700, wrote: > >> +++ b/slirp/ip6_icmp.c > >> @@ -0,0 +1,350 @@ > >> +/* > >> + * Copyright (c) 2013 > > Want to add 2016? Well, nothing copyrightable has happened to these files since 2013... Samuel

Re: [Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-09 Thread Samuel Thibault
Thomas Huth, on Tue 09 Feb 2016 17:14:15 +0100, wrote: > > +return (a.s6_addr[prefix_len / 8] >> (8 - (prefix_len % 8))) > > +== (b.s6_addr[prefix_len / 8] >> (8 - (prefix_len % 8))); > > checkpatch.pl complains here: > > ERROR: return is not a function, parentheses are not required

[Qemu-devel] [PATCHv7 9/9] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2016-02-08 Thread Samuel Thibault
Bordenave Signed-off-by: Samuel Thibault --- net/net.c| 31 +++ net/slirp.c | 50 -- qapi-schema.json | 40 ++-- qemu-options.hx | 18 -- slirp/libslirp.h

[Qemu-devel] [PATCHv7 0/9] slirp: Adding IPv6 support to Qemu -net user mode

2016-02-08 Thread Samuel Thibault
Hello, This is another respin of IPv6 in Qemu -net user mode. These patches add ICMPv6, NDP, and make UDP and TCP compatible with IPv6. Difference with version 6 is: - drop second-precision timer addition - use ms precision for RA timer - Use unsigned short instead of sa_family_t - Use error_r

[Qemu-devel] [PATCHv7 6/9] slirp: Reindent after refactoring

2016-02-08 Thread Samuel Thibault
From: Guillaume Subiron No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/tcp_input.c | 99 +++--- slirp/tcp_output.c | 29 slirp/tcp_subr.c | 50 +-- 3 files

[Qemu-devel] [PATCHv7 1/9] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2016-02-08 Thread Samuel Thibault
refresh its route. This also adds ip6_cksum() to compute ICMPv6 checksums using IPv6 pseudo-header. Some #define ETH_* are moved upper in slirp.h to make them accessible to other slirp/*.h Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/Makefile.objs | 4 +- slirp/cksum.c

[Qemu-devel] [PATCHv7 3/9] slirp: Adding IPv6 UDP support

2016-02-08 Thread Samuel Thibault
From: Guillaume Subiron This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault

[Qemu-devel] [PATCHv7 7/9] slirp: Handle IPv6 in TCP functions

2016-02-08 Thread Samuel Thibault
From: Guillaume Subiron This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip6_input.c

[Qemu-devel] [PATCHv7 2/9] slirp: Adding ICMPv6 error sending

2016-02-08 Thread Samuel Thibault
ns to send ICMP errors, when a received packet is too big, or when its hop limit is 0. Signed-off-by: Yann Bordenave Signed-off-by: Samuel Thibault --- slirp/ip6_icmp.c | 60 +++ slirp/ip6_icmp.h | 10 ++ slirp/ip6_input.c

[Qemu-devel] [PATCHv7 5/9] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2016-02-08 Thread Samuel Thibault
h does not include the entailed reindentation, to make proofread easier. Reindentation is adressed in the following no-op patch. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip_input.c | 2 +- slirp/slirp.c | 6 -- slirp/slirp.h | 5 +++-- slirp/t

[Qemu-devel] [PATCHv7 8/9] slirp: Adding IPv6 address for DNS relay

2016-02-08 Thread Samuel Thibault
points to localhost. Further development will be needed to automatically fetch the IPv6 address from resolv.conf, and announce this via RDNSS. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip6.h| 5 - slirp/slirp.c | 1 + slirp/slirp.h | 1 + slirp

[Qemu-devel] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-08 Thread Samuel Thibault
functions, and makes them compatible with the new tcpiphdr structure, whose size will be bigger than sizeof(struct tcphdr) + sizeof(struct ip) Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/if.h | 4 ++-- slirp/mbuf.c | 3 ++- slirp/slirp.c | 15

Re: [Qemu-devel] [PULL 00/17] Net patches

2016-02-03 Thread Samuel Thibault
Jason Wang, on Wed 03 Feb 2016 12:52:24 +0800, wrote: > > Hi. I'm afraid this failed to build on w32: > > > > declaration specifiers or ‘...’ before ‘sa_family_t’ > > - switch to use unsigned short > - or typedef sa_family_t as unsigned short for windows Doing the second runs the risk of windows

Re: [Qemu-devel] [PATCHv7 0/9] slirp: Adding IPv6 support to Qemu -net user mode

2016-01-11 Thread Samuel Thibault
Hello, Samuel Thibault, on Sat 19 Dec 2015 22:24:40 +0100, wrote: > This is another respin of IPv6 in Qemu -net user mode. > > The following patches first make some refactoring to make current code ready > for IPv6, and do not change the behavior. The actual IPv6 support wil

[Qemu-devel] [PATCH 5/9] slirp: Factorizing address translation

2015-12-19 Thread Samuel Thibault
address translation when a connection is established on the host for port forwarding: if it comes from localhost, the host virtual address is used instead. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/bootp.c

[Qemu-devel] [PATCH 4/9] slirp: Make Socket structure IPv6 compatible

2015-12-19 Thread Samuel Thibault
. The ss_family field of sockaddr_storage is declared after each socket creation. The whole structure is also saved/restored when a Qemu session is saved/restored. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp

[Qemu-devel] [PATCH 7/9] slirp: Add sockaddr_equal, make solookup family-agnostic

2015-12-19 Thread Samuel Thibault
From: Guillaume Subiron This patch makes solookup() compatible with varying address families, by using a new sockaddr_equal() function that compares two sockaddr_storage. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth

[Qemu-devel] [PATCH 8/9] slirp: Make udp_attach IPv6 compatible

2015-12-19 Thread Samuel Thibault
From: Guillaume Subiron A sa_family_t is now passed in argument to udp_attach instead of using a hardcoded "AF_INET" to call qemu_socket(). This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/ip_

[Qemu-devel] [PATCH 3/9] slirp: Adding address family switch for produced frames

2015-12-19 Thread Samuel Thibault
From: Guillaume Subiron In if_encap, a switch is added to prepare for the IPv6 case. Some code is factorized. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/slirp.c | 61

[Qemu-devel] [PATCH 9/9] slirp: Adding family argument to tcp_fconnect()

2015-12-19 Thread Samuel Thibault
From: Guillaume Subiron This patch simply adds a sa_family_t argument to remove the hardcoded "AF_INET" in the call of qemu_socket(). This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed-by: Thomas Huth --- slirp/slirp.h | 2

[Qemu-devel] [PATCH 2/9] slirp: Generalizing and neutralizing ARP code

2015-12-19 Thread Samuel Thibault
From: Guillaume Subiron Basically, this patch replaces "arp" by "resolution" every time "arp" means "mac resolution" and not specifically ARP. This prepares for IPv6 support. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault Reviewed

<    8   9   10   11   12   13   14   15   16   >