From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qph0X-00010X-ML for qemu-devel@nongnu.org; Sat, 06 Aug 2011 09:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qph0W-0005Pi-EI for qemu-devel@nongnu.org; Sat, 06 Aug 2011 09:33:41 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:55566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qph0W-0005Pc-Bn for qemu-devel@nongnu.org; Sat, 06 Aug 2011 09:33:40 -0400 Received: by yxt3 with SMTP id 3so2473651yxt.4 for ; Sat, 06 Aug 2011 06:33:39 -0700 (PDT) Message-ID: <4E3D42B1.80404@codemonkey.ws> Date: Sat, 06 Aug 2011 08:33:37 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1312574957.22471.YahooMailClassic@web110406.mail.gq1.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] 0.15.0-rc2 (any version past 0.14.1) having issues with SLIRP on Windows XP host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: TeLeMan Cc: Blue Swirl , Jan Kiszka , Kenneth Salerno , qemu-devel@nongnu.org On 08/05/2011 10:25 PM, TeLeMan wrote: > On Sat, Aug 6, 2011 at 04:46, Blue Swirl wrote: >> On Fri, Aug 5, 2011 at 8:09 PM, Kenneth Salerno >> wrote: >>> Hi, >>> >>> I'm not sure if any defaults (build or runtime) have changed since 0.14.1, but I can no longer get the following to work anymore for QEMU versions 0.15.0-rc2 or recent development builds: >>> >>> -device e1000,netdev=mynet0 -netdev type=user,id=mynet0 ... >>> >>> Works great in 0.14.1 however. >>> >>> From the QEMU console, "info networking" shows the NIC e1000 and the VLAN correctly setup, the guest (RHEL 6.1 x86_64) has its NIC recognized and networking setup, just can't seem to communicate with the gateway (10.0.2.2). The only difference I see in the console is cosmetic (restricted=off rather than restricted=n). >>> >>> Host OS: Windows XP >>> Build env: i686-pc-mingw32-gcc 4.5.2, binutils 2.21.53.20110731 i386pe >>> Runtime env: Cygwin 1.7.9 2011-03-29, SDL 1.2.14, mingw32-glib 2.28.1-1, >>> mingw32-gettext 0.18.1-2 >>> Guest OS: RHEL 6.1 >>> >>> Is it just me? >> >> No, this is fallout from glib use: >> http://lists.nongnu.org/archive/html/qemu-devel/2011-08/msg00134.html >> >> The fix is to rewrite structures without using GCC bit fields. > > -mms-bitfields affects all byte-alignments in a structure. For example, > struct s > { > uint8_t a; > uint32_t b; > } __attribute__((packed)); > > sizeof(s) is 5 without -mms-bitfields but sizeof(s) is 8 with -mms-bitfields. If you can identify the offending structs, you can do: #pragma pack(push,1) struct s { uint8_t a; uint32_t b; } __attribute__((packed)); #pragma pack(pop) Regards, Anthony Liguori