From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY80B-0003Py-QK for qemu-devel@nongnu.org; Tue, 23 Feb 2016 03:07:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aY807-0006Ky-1C for qemu-devel@nongnu.org; Tue, 23 Feb 2016 03:07:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY806-0006Kt-Ru for qemu-devel@nongnu.org; Tue, 23 Feb 2016 03:07:18 -0500 References: <103a927678aa12dd39a0587340d394e8e625aa9e.1456168872.git.samuel.thibault@ens-lyon.org> From: Thomas Huth Message-ID: <56CC132F.6020301@redhat.com> Date: Tue, 23 Feb 2016 09:07:11 +0100 MIME-Version: 1.0 In-Reply-To: <103a927678aa12dd39a0587340d394e8e625aa9e.1456168872.git.samuel.thibault@ens-lyon.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv9 04/10] slirp: Factorizing tcpiphdr structure with an union List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault , qemu-devel@nongnu.org Cc: zhanghailiang , Li Zhijian , Stefan Hajnoczi , Jason Wang , Dave Gilbert , Vasiliy Tolstov , Huangpeng , Gonglei , Jan Kiszka , Guillaume Subiron On 22.02.2016 20: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 fixes the SLIRP_MSIZE and margin computation in various > 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 ++++++++------- > slirp/socket.c | 13 ++++++++++++- > slirp/tcp_input.c | 31 ++++++++++++++++++++----------- > slirp/tcp_output.c | 18 +++++++++++++----- > slirp/tcp_subr.c | 31 ++++++++++++++++++++++--------- > slirp/tcpip.h | 31 +++++++++++++++++++++++-------- > 8 files changed, 102 insertions(+), 45 deletions(-) Sounds reasonable to me now. Reviewed-by: Thomas Huth