Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-24 Thread liu ping fan
On Sat, Aug 24, 2013 at 12:54 AM, Jan Kiszka wrote: > On 2013-08-21 04:15, Liu Ping Fan wrote: >> If slirp needs to emulate tcp timeout, then the timeout value >> for mainloop should be more precise, which is determined by >> slirp's fasttimo or slowtimo. Achieve this by swap the logic >> sequence

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-24 Thread liu ping fan
On Sat, Aug 24, 2013 at 12:49 AM, Jan Kiszka wrote: > On 2013-08-21 10:07, liu ping fan wrote: >> On Wed, Aug 21, 2013 at 3:36 PM, Alex Bligh wrote: >>> >>> >>> --On 21 August 2013 10:15:52 +0800 Liu Ping Fan wrote: >>> -void slirp_update_timeout(uint32_t *timeout) +static void slirp_u

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-23 Thread Jan Kiszka
On 2013-08-21 04:15, Liu Ping Fan wrote: > If slirp needs to emulate tcp timeout, then the timeout value > for mainloop should be more precise, which is determined by > slirp's fasttimo or slowtimo. Achieve this by swap the logic > sequence of slirp_pollfds_fill and slirp_update_timeout. > > Signe

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-23 Thread Jan Kiszka
On 2013-08-21 10:07, liu ping fan wrote: > On Wed, Aug 21, 2013 at 3:36 PM, Alex Bligh wrote: >> >> >> --On 21 August 2013 10:15:52 +0800 Liu Ping Fan wrote: >> >>> -void slirp_update_timeout(uint32_t *timeout) >>> +static void slirp_update_timeout(uint32_t *timeout) >>> { >>> -if (!QTAILQ_E

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-21 Thread liu ping fan
On Wed, Aug 21, 2013 at 3:36 PM, Alex Bligh wrote: > > > --On 21 August 2013 10:15:52 +0800 Liu Ping Fan wrote: > >> -void slirp_update_timeout(uint32_t *timeout) >> +static void slirp_update_timeout(uint32_t *timeout) >> { >> -if (!QTAILQ_EMPTY(&slirp_instances)) { >> -*timeout = MI

Re: [Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-21 Thread Alex Bligh
--On 21 August 2013 10:15:52 +0800 Liu Ping Fan wrote: -void slirp_update_timeout(uint32_t *timeout) +static void slirp_update_timeout(uint32_t *timeout) { -if (!QTAILQ_EMPTY(&slirp_instances)) { -*timeout = MIN(1000, *timeout); If you are putting things in macros, you might as

[Qemu-devel] [PATCH v3 3/3] slirp: set mainloop timeout with more precise value

2013-08-20 Thread Liu Ping Fan
If slirp needs to emulate tcp timeout, then the timeout value for mainloop should be more precise, which is determined by slirp's fasttimo or slowtimo. Achieve this by swap the logic sequence of slirp_pollfds_fill and slirp_update_timeout. Signed-off-by: Liu Ping Fan --- main-loop.c | 3 +-