From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
"Michael Roth" <mdroth@linux.vnet.ibm.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
"Max Reitz" <mreitz@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Stefan Berger" <stefanb@linux.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/5] socket: Add backlog parameter to socket_listen
Date: Tue, 20 Aug 2019 09:39:04 +0100 [thread overview]
Message-ID: <20190820083904.GA23352@redhat.com> (raw)
In-Reply-To: <20190820082459.2101-2-quintela@redhat.com>
On Tue, Aug 20, 2019 at 10:24:55AM +0200, Juan Quintela wrote:
> Current parameter was always one. We continue with that value for now
> in all callers.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> include/qemu/sockets.h | 2 +-
> io/channel-socket.c | 2 +-
> qga/channel-posix.c | 2 +-
> tests/test-util-sockets.c | 12 ++++++------
> util/qemu-sockets.c | 33 ++++++++++++++++++++++-----------
> util/trace-events | 2 ++
> 6 files changed, 33 insertions(+), 20 deletions(-)
>
> diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
> index e3a1666578..3f0a80404f 100644
> --- a/util/qemu-sockets.c
> +++ b/util/qemu-sockets.c
> @@ -31,6 +31,7 @@
> #include "qapi/qobject-input-visitor.h"
> #include "qapi/qobject-output-visitor.h"
> #include "qemu/cutils.h"
> +#include "trace.h"
>
> #ifndef AI_ADDRCONFIG
> # define AI_ADDRCONFIG 0
> @@ -207,6 +208,7 @@ static int try_bind(int socket, InetSocketAddress *saddr, struct addrinfo *e)
>
> static int inet_listen_saddr(InetSocketAddress *saddr,
> int port_offset,
> + int num,
> Error **errp)
> {
> struct addrinfo ai,*res,*e;
> @@ -309,7 +311,8 @@ static int inet_listen_saddr(InetSocketAddress *saddr,
> goto listen_failed;
> }
> } else {
> - if (!listen(slisten, 1)) {
> + trace_inet_listen_saddr(num);
It is a bit odd to only have the trace event for inet sockets. I'd
prefer it in the caller for all sockets, with just "socket_listen"
name.
> + if (!listen(slisten, num)) {
> goto listen_ok;
> }
> if (errno != EADDRINUSE) {
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2019-08-20 8:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 8:24 [Qemu-devel] [PATCH v2 0/5] Fix multifd with big number of channels Juan Quintela
2019-08-20 8:24 ` [Qemu-devel] [PATCH v2 1/5] socket: Add backlog parameter to socket_listen Juan Quintela
2019-08-20 8:39 ` Daniel P. Berrangé [this message]
2019-08-20 9:14 ` Juan Quintela
2019-08-20 8:24 ` [Qemu-devel] [PATCH v2 2/5] socket: Add num connections to qio_channel_socket_sync() Juan Quintela
2019-08-20 8:40 ` Daniel P. Berrangé
2019-08-20 8:24 ` [Qemu-devel] [PATCH v2 3/5] socket: Add num connections to qio_channel_socket_async() Juan Quintela
2019-08-20 8:40 ` Daniel P. Berrangé
2019-08-20 8:24 ` [Qemu-devel] [PATCH v2 4/5] socket: Add num connections to qio_net_listener_open_sync() Juan Quintela
2019-08-20 8:41 ` Daniel P. Berrangé
2019-08-20 8:24 ` [Qemu-devel] [PATCH v2 5/5] multifd: Use number of channels as listen backlog Juan Quintela
2019-08-20 8:41 ` Daniel P. Berrangé
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=20190820083904.GA23352@redhat.com \
--to=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=fam@euphon.net \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=stefanb@linux.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.