[Qemu-devel] TCP_NODELAY for -redir

2006-11-13 Thread Daniel Jacobowitz
I was trying to run GDB remote debug tests through a -redir socket
today.  It crawled unbelievably.  Paul guessed that slirp wasn't using
TCP_NODELAY, and Nagle was to blame.

He was even righter than usual.  Adding TCP_NODELAY speeds up this
particular workload by (very approximately) 54x.  See trivial attached
patch.

Is this going to bite other things, i.e. does it need to be
configurable?

-- 
Daniel Jacobowitz
CodeSourcery

---
 slirp/tcp.h  |2 +-
 slirp/tcp_subr.c |2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Index: qemu/slirp/tcp.h
===
--- qemu.orig/slirp/tcp.h   2006-11-13 14:25:24.0 -0500
+++ qemu/slirp/tcp.h2006-11-13 14:25:29.0 -0500
@@ -112,7 +112,7 @@ struct tcphdr {
 /*
  * User-settable options (used with setsockopt).
  */
-/* #define TCP_NODELAY 0x01 */ /* don't delay send to coalesce packets 
*/
+#defineTCP_NODELAY 0x01/* don't delay send to coalesce packets 
*/
 /* #define TCP_MAXSEG  0x02 */ /* set maximum segment size */
 
 /*
Index: qemu/slirp/tcp_subr.c
===
--- qemu.orig/slirp/tcp_subr.c  2006-11-13 14:22:34.0 -0500
+++ qemu/slirp/tcp_subr.c   2006-11-13 14:23:31.0 -0500
@@ -499,6 +499,8 @@ tcp_connect(inso)
setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int));
opt = 1;
setsockopt(s,SOL_SOCKET,SO_OOBINLINE,(char *)&opt,sizeof(int));
+   opt = 1;
+   setsockopt(s,IPPROTO_TCP,TCP_NODELAY,(char *)&opt,sizeof(int));

so->so_fport = addr.sin_port;
so->so_faddr = addr.sin_addr;


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] qemu 0.8.2 and RTEMS

2006-11-13 Thread Jonathan Kalbfeld

Passing this along for a friend.

-- Forwarded message --
From: Joel Sherrill <[EMAIL PROTECTED]>
Date: Nov 13, 2006 1:51 PM
Subject: qemu 0.8.2 and RTEMS
To: RTEMS Users Mailing List <[EMAIL PROTECTED]>


Hi,

It looks like qemu has changed command line argument formats. :(

I can run non-networking tests but the syntax for the network
options has changed enough where I don't see the magic.  This is
the script which used to work for me.

qemu -isa -nics 1 -n ~joel/qemu-work/qemu/qemu-kit/tunconfig.sh \
  -macaddr 00:80:7F:22:61:77 -m 4 -serial stdio -fda
/home/joel/qemu/grub144

I have this much of a command line which doesn't cause qemu to
complain but it doesn't work either:

qemu -net nic,macaddr=00:80:7F:22:61:77,model=ne2k_isa \
 -m 4 -fda /home/joel/qemu/grub144

The qemu faq mentions using a tunctl program which I don't see.

For the older qemu, we had a sudo script to bring up the virtual
LAN.  Does anyone have this working with qemu 0.8.1?

--joel

___
rtems-users mailing list
[EMAIL PROTECTED]
http://rtems.rtems.org/mailman/listinfo/rtems-users


--
--
Jonathan Kalbfeld
+1 323 620 6682


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] qemu 0.8.2 and RTEMS

2006-11-13 Thread Lonnie Mendez
On Mon, 2006-11-13 at 14:06 -0800, Jonathan Kalbfeld wrote:

> qemu -isa -nics 1 -n ~joel/qemu-work/qemu/qemu-kit/tunconfig.sh \
>-macaddr 00:80:7F:22:61:77 -m 4 -serial stdio -fda
> /home/joel/qemu/grub144
> 
> I have this much of a command line which doesn't cause qemu to
> complain but it doesn't work either:
> 
> qemu -net nic,macaddr=00:80:7F:22:61:77,model=ne2k_isa \
>   -m 4 -fda /home/joel/qemu/grub144

You need to specify a connection method for the nic.  qemu has vlans
now that organize the internal network.  The default qemu uses with no
-net arguments is -net nic,vlan=0 -net user,vlan=0.  This groups a nic
and a connection method (slirp) on vlan 0.  If you want to use tun/tap
networking specify -net tap instead (along with -net nic,...).  Your old
line might look like the below:

qemu -M isapc -net nic,macaddr=00:80:7F:22:61:77 -net
tap,script=~joel/qemu-work/qemu/qemu-kit/tunconfig.sh -m 4 -serial stdio
-fda /home/joel/qemu/grub144

Although I'm not sure what the old script format looks like - there are
example qemu-ifup scripts about the net.

> The qemu faq mentions using a tunctl program which I don't see.

Please link that page here so it can be reviewed for correctness.



___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel