qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-3.2 07/41] slirp: add clock_get_ns() callbac


From: Samuel Thibault
Subject: Re: [Qemu-devel] [PATCH for-3.2 07/41] slirp: add clock_get_ns() callback
Date: Tue, 20 Nov 2018 00:15:43 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Paolo Bonzini, le jeu. 15 nov. 2018 13:54:02 +0100, a ecrit:
> On 14/11/2018 13:36, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> >  slirp/libslirp.h |  6 ++++++
> >  net/slirp.c      | 19 +++++++++++++++++++
> >  slirp/if.c       |  2 +-
> >  slirp/ip6_icmp.c |  6 ++++--
> >  slirp/slirp.c    | 11 ++++++-----
> >  5 files changed, 36 insertions(+), 8 deletions(-)
> > 
> > diff --git a/slirp/libslirp.h b/slirp/libslirp.h
> > index 16ced2aa0f..fcebcd1e58 100644
> > --- a/slirp/libslirp.h
> > +++ b/slirp/libslirp.h
> > @@ -5,9 +5,15 @@
> >  
> >  typedef struct Slirp Slirp;
> >  
> > +typedef enum SlirpClockType {
> > +    SLIRP_CLOCK_VIRTUAL,
> > +    SLIRP_CLOCK_REALTIME,
> 
> The more I look at this, the more I think that SLIRP_CLOCK_REALTIME is
> wrong and it should also be using SLIRP_CLOCK_VIRTUAL.  It's used to put
> a cap on the amount of time the guest has to reply to an ARP request,
> and of course the guest cannot process it if it's paused.  So this can
> be simpler, because SlirpClockType can disappear completely.

Mmm, I'd tend to agree indeed.
(it's also used for TCP timers, but the same reasoning applies)

We'd need to check that turning them to VIRTUAL does work fine.

Samuel



reply via email to

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