qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/4] sockets: helper functions for qemu.


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 2/4] sockets: helper functions for qemu.
Date: Mon, 03 Nov 2008 16:35:58 +0100
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

Anthony Liguori wrote:
> I like this patch, but we already have a qemu_socket.h.  Please remove
> qemu_socket.h if you're going to introduce qemu-sockets.h.

Will fix.

>> +
>> +listen:
>> +    if (0 != listen(slisten,1)) {
> 
> Please try to avoid this style of if().

Yea, old habit from the days where gcc didn't warn on "if (a = -1)".
Pointless these days.  Trying to get rid of it ...

>> +    { "ipv4", 0, QEMU_OPTION_ipv4 },
>> +    { "ipv6", 0, QEMU_OPTION_ipv6 },
> 
> I don't like the idea of aliasing these options.  Please just stick with
> one set of options.

> And do we really need to have options for this?

Yes, we do, unfortunaly.

> Can't we just do the
> right thing?  I can't believe that every application has to have an ipv6
> switch to be ipv6 enabled.

98% of the users should never ever need that.  Unfortunaly there are
always corner cases where you can't get it right automatically.  You can
easily check the ipv6 setup on the local machine, but you still don't
know how the network is setup and whenever reaching machine $foo via
ipv6 actually works.  Of course you can just try and in case it doesn't
work fallback to ipv4.  Which is what the code does btw.  But that
involves a noticeable delay, waiting for the ipv6 connect attempt time out.

Will make that a per-connection option as discussed further down this
thread.

Respin of the patches will follow later today or tomorrow.

cheers,
  Gerd




reply via email to

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