qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jung-uk Kim <jkim@niksun.com>
To: qemu-devel@nongnu.org
Cc: Juergen Lock <qemu-l@jelal.kn-bremen.de>
Subject: Re: [Qemu-devel] user networking - win xp quest, amd64 linux host
Date: Mon, 9 May 2005 14:23:58 -0400	[thread overview]
Message-ID: <200505091423.58598.jkim@niksun.com> (raw)
In-Reply-To: <20050509192633.A95241@saturn.kn-bremen.de>

On Monday 09 May 2005 01:26 pm, Juergen Lock wrote:
> On Mon, May 09, 2005 at 10:37:04AM -0400, Leonardo E. Reiter wrote:
> > We have seen problems on the AMD64 with -user-net as well.  While
> > we have not been able to debug further yet, I suspect what is
> > happening is that some 32-bit values in packet headers that SLIRP
> > is decoding are actually represented as 64-bit types on 64-bit
> > processors.  Again, this is just a guess, but it's the first
> > place we'll look once we get to it, since we think it's the most
> > likely cause.
> >
> > - Leo Reiter
>
> There are a few cases of `long' being used when apparently
> (u)int32_t was meant.  Not sure i catched them all, but try this
> patch:  (Unfortunately I don't have an amd64 box here so I cant
> test it myself...)

Juergen,

sorry but it doesn't seem to work.  Tried on FreeBSD/amd64 -CURRENT 
host and FreeBSD/i386 -STABLE guest.

Jung-uk Kim

> Index: slirp/bootp.h
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/slirp/bootp.h,v
> retrieving revision 1.1
> diff -u -r1.1 bootp.h
> --- slirp/bootp.h	22 Apr 2004 00:10:47 -0000	1.1
> +++ slirp/bootp.h	9 May 2005 17:11:55 -0000
> @@ -97,7 +98,7 @@
>      uint8_t bp_htype;
>      uint8_t bp_hlen;
>      uint8_t bp_hops;
> -    unsigned long bp_xid;
> +    uint32_t bp_xid;
>      unsigned short bp_secs;
>      unsigned short unused;
>      struct in_addr bp_ciaddr;
> Index: slirp/ip_icmp.h
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/slirp/ip_icmp.h,v
> retrieving revision 1.1
> diff -u -r1.1 ip_icmp.h
> --- slirp/ip_icmp.h	22 Apr 2004 00:10:47 -0000	1.1
> +++ slirp/ip_icmp.h	9 May 2005 17:11:56 -0000
> @@ -83,7 +83,7 @@
>  			struct ip idi_ip;
>  			/* options and then 64 bits of data */
>  		} id_ip;
> -		u_long	id_mask;
> +		uint32_t	id_mask;
>  		char	id_data[1];
>  	} icmp_dun;
>  #define	icmp_otime	icmp_dun.id_ts.its_otime
> Index: slirp/udp.c
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/slirp/udp.c,v
> retrieving revision 1.4
> diff -u -r1.4 udp.c
> --- slirp/udp.c	7 Oct 2004 23:27:35 -0000	1.4
> +++ slirp/udp.c	9 May 2005 17:11:56 -0000
> @@ -423,7 +423,7 @@
>  	char 	dest[8];
>  	short 	family;
>  	u_short	port;
> -	u_long	addr;
> +	uint32_t	addr;
>  } *cu_head;
>
>  	switch(so->so_emu) {
> @@ -611,7 +611,7 @@
>  				return;
>  			cu_head = mtod(m, struct cu_header *);
>  			cu_head->port = addr.sin_port;
> -			cu_head->addr = (u_long) our_addr.s_addr;
> +			cu_head->addr = (uint32_t) our_addr.s_addr;
>  		}
>
>  		return;

  parent reply	other threads:[~2005-05-09 18:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-09  1:42 Re: [Qemu-devel] user networking - win xp quest, amd64 linux host Ben Taylor
2005-05-09  3:32 ` Adrian Smarzewski
2005-05-09  4:05   ` Adrian Smarzewski
2005-05-09 14:37     ` Leonardo E. Reiter
2005-05-09 15:19       ` Adrian Smarzewski
2005-05-09 15:50         ` Leonardo E. Reiter
2005-05-09 16:42           ` Adrian Smarzewski
2005-05-09 15:53         ` Adrian Smarzewski
2005-05-09 17:26       ` Juergen Lock
2005-05-09 17:58         ` Adrian Smarzewski
2005-05-09 18:23         ` Jung-uk Kim [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-05-08 23:21 Ben Taylor
2005-05-09  0:06 ` Adrian Smarzewski
2005-05-09  0:22   ` Henrik Nordstrom
2005-05-09  0:49     ` Adrian Smarzewski
2005-05-08 22:22 Adrian Smarzewski
2005-05-15 21:03 ` Adrian Smarzewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200505091423.58598.jkim@niksun.com \
    --to=jkim@niksun.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-l@jelal.kn-bremen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).