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 Thomas Huth
On 22.02.2016 02:48, Samuel Thibault wrote: > 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) - (si

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] [PATCHv7 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-19 Thread Thomas Huth
On 14.02.2016 18:47, Samuel Thibault wrote: > From: Guillaume Subiron > > This patch factorizes the tcpiphdr structure to put the IPv4 fields in > an union, for addition of version 6 in further patch. > Using some macros, retrocompatibility of the existing code is assured. > > This patch also fi

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 > > This patch factorizes th

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

2016-02-14 Thread Samuel Thibault
From: Guillaume Subiron This patch factorizes the tcpiphdr structure to put the IPv4 fields in an union, for addition of version 6 in further patch. Using some macros, retrocompatibility of the existing code is assured. This patch also fixes the SLIRP_MSIZE and margin computation in various func

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) + 6) > >>> +#define SLIRP_MSIZE\ > >>> +(offse

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

2016-02-10 Thread Thomas Huth
On 10.02.2016 10:28, Samuel Thibault wrote: > 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_MAXLIN

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 4/9] slirp: Factorizing tcpiphdr structure with an union

2016-02-10 Thread Thomas Huth
On 08.02.2016 11:28, Samuel Thibault wrote: > From: Guillaume Subiron > > This patch factorizes the tcpiphdr structure to put the IPv4 fields in > an union, for addition of version 6 in further patch. > Using some macros, retrocompatibility of the existing code is assured. > > This patch also fi

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

2016-02-08 Thread Samuel Thibault
From: Guillaume Subiron This patch factorizes the tcpiphdr structure to put the IPv4 fields in an union, for addition of version 6 in further patch. Using some macros, retrocompatibility of the existing code is assured. This patch also fixes the SLIRP_MSIZE and margin computation in various func