qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 0/3] slirp: fill mainloop with more precise t


From: Jan Kiszka
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
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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 <address@hidden>
---
 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]