qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Liu Ping Fan <qemulist@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 0/3] slirp: fill mainloop with more precise timeout value
Date: Wed, 28 Aug 2013 19:17:22 +0200	[thread overview]
Message-ID: <521E30A2.5040007@siemens.com> (raw)
In-Reply-To: <1377396081-12417-1-git-send-email-pingfank@linux.vnet.ibm.com>

On 2013-08-25 04:01, Liu Ping Fan wrote:
> With this series, we can set the mainloop timeout more precisely when slirp has
> to emulate tcp timeout problem.
> 
> v4:
>   use macro TIMEOUT_DEFAULT to define the default timeout of slirp and document it.
> 
> v3:
>   fix comment: document timeout unit "milliseconds"
>   fix logic: no slirps, no timeout modifications in slirp_pollfds_fill()
> v2:
>   fold slirp_update_timeout logic into slirp_pollfds_fill.
> 
> 
> Liu Ping Fan (3):
>   slirp: make timeout local
>   slirp: define timeout as macro
>   slirp: set mainloop timeout with more precise value
> 
>  main-loop.c      |  3 +--
>  slirp/libslirp.h |  3 +--
>  slirp/slirp.c    | 61 +++++++++++++++++++++++++++++++++++++++-----------------
>  slirp/slirp.h    |  3 +++
>  stubs/slirp.c    |  6 +-----
>  5 files changed, 49 insertions(+), 27 deletions(-)
> 

Thanks, applied to the slirp queue. I'm carrying the tiny cleanup below
on top.

Jan

---

slirp: clean up slirp_update_timeout

No need to write out the timeout early, keep it local until we are done.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 slirp/slirp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/slirp/slirp.c b/slirp/slirp.c
index fe16367..bad8dad 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -270,8 +270,8 @@ static void slirp_update_timeout(uint32_t *timeout)
     if (*timeout <= TIMEOUT_FAST) {
         return;
     }
-    *timeout = MIN(1000, *timeout);
-    t = *timeout;
+
+    t = MIN(1000, *timeout);
 
     /* If we have tcp timeout with slirp, then we will fill @timeout with
      * more precise value.

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

      parent reply	other threads:[~2013-08-28 17:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-25  2:01 [Qemu-devel] [PATCH v4 0/3] slirp: fill mainloop with more precise timeout value Liu Ping Fan
2013-08-25  2:01 ` [Qemu-devel] [PATCH v4 1/3] slirp: make timeout local Liu Ping Fan
2013-08-25  2:01 ` [Qemu-devel] [PATCH v4 2/3] slirp: define timeout as macro Liu Ping Fan
2013-08-25  2:01 ` [Qemu-devel] [PATCH v4 3/3] slirp: set mainloop timeout with more precise value Liu Ping Fan
2013-08-28 17:17 ` Jan Kiszka [this message]

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=521E30A2.5040007@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemulist@gmail.com \
    --cc=stefanha@redhat.com \
    /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).