[Qemu-devel] Re: [kvm-devel] [PATCH] Making SLIRP code more 64-bit clean

2008-01-31 Thread Scott Pakin
I just noticed that my previous patch hit one of the subtleties that Blue Swirl warned about. Changing caddr32_t causes the IP header and IP header overlay to be different sizes, which essentially breaks networking altogether. I humbly offer the following patch, which fixes only the "easy" 32/64

[Qemu-devel] Re: [kvm-devel] [PATCH] Making SLIRP code more 64-bit clean

2008-01-31 Thread Scott Pakin
Zhang, Xiantao wrote: Unfortunately, it can's apply on tip. Could you attach the diff ? It works for me: $ git clone git://git.kernel.org/pub/scm/virt/kvm/kvm-userspace.git remote: Generating pack... remote: Done counting 37449 objects. remote: Deltifying 37449 objects... remote: 100% (37449/

[Qemu-devel] Re: [kvm-devel] [PATCH] Making SLIRP code more 64-bit clean

2008-01-30 Thread Scott Pakin
Zhang, Xiantao wrote: Scott Pakin wrote: The attached patch corrects a bug in qemu/slirp/tcp_var.h that defines the seg_next field in struct tcpcb to be 32 bits wide regardless of 32/64-bitness. seg_next is assigned a pointer value in qemu/slirp/tcp_subr.c, then cast back to a pointer in qemu

[Qemu-devel] [PATCH] Making SLIRP code more 64-bit clean

2008-01-29 Thread Scott Pakin
The attached patch corrects a bug in qemu/slirp/tcp_var.h that defines the seg_next field in struct tcpcb to be 32 bits wide regardless of 32/64-bitness. seg_next is assigned a pointer value in qemu/slirp/tcp_subr.c, then cast back to a pointer in qemu/slirp/tcp_input.c and dereferenced. That pr