From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IkQXN-0002iB-Cb for qemu-devel@nongnu.org; Tue, 23 Oct 2007 16:39:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IkQXK-0002hz-SD for qemu-devel@nongnu.org; Tue, 23 Oct 2007 16:39:40 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkQXK-0002hw-LE for qemu-devel@nongnu.org; Tue, 23 Oct 2007 16:39:38 -0400 Received: from sp604005mt.neufgp.fr ([84.96.92.11] helo=smtp.Neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IkQXK-0001GV-BV for qemu-devel@nongnu.org; Tue, 23 Oct 2007 16:39:38 -0400 Received: from [84.102.211.124] by sp604005mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0JQD008L5TDT84A0@sp604005mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Tue, 23 Oct 2007 22:39:30 +0200 (CEST) Date: Tue, 23 Oct 2007 22:39:05 +0200 From: Fabrice Bellard Subject: [Qemu-devel] Re: PATCH, RFC: Slirp improvements Message-id: <471E5BE9.9080307@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel@nongnu.org > I tried harder to change the SLIRP queue stuff to something saner by > hiding the pointer access inside inlined functions. Still when I > changed the 32 bit pointers to native 64 bit (or moved the pointers > outside the packet), qemu crashes. Must be some devilishly hidden > access somewhere. I already fixed one, which involved recycling port > number fields for buffer pointers. IMHO there should be some kind of > corporeal punishments mandated by law for writing this kind of mess. > Maybe it would even be easier to create a new userland IP stack based > on Linux from scratch instead of fixing this. > > I think I'll just commit in the log part, unless there are objections. IMHO you should add a context in the 'struct socket' structure so that you can avoid adding a context in all the functions manipulating this structure. The same holds for mbuf. Regards, Fabrice.