qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] mptcp support
@ 2021-04-21 11:28 Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 1/5] channel-socket: Only set CLOEXEC if we have space for fds Dr. David Alan Gilbert (git)
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-21 11:28 UTC (permalink / raw)
  To: qemu-devel, berrange, kraxel, eblake, armbru, pabeni; +Cc: peterx, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Hi,
  This set adds support for multipath TCP (mptcp), and has
been tested for migration and (lightly) for NBD.

  Multipath-tcp is a bit like bonding, but at L3; you can use
it to handle failure, but can also use it to split traffic across
multiple interfaces.

  Using a pair of 10Gb interfaces, I've managed to get 19Gbps
(with the only tuning being using huge pages and turning the MTU up).

  It needs a bleeding-edge Linux kernel (in some older ones you get
false accept messages for the subflows), and a C lib that has the
constants defined (as current glibc does).

  To use it you just need to append ,mptcp to an address; for migration:

  -incoming tcp:0:4444,mptcp
  migrate -d tcp:192.168.11.20:4444,mptcp

For nbd:

  (qemu) nbd_server_start 0.0.0.0:3333,mptcp=on

  -blockdev driver=nbd,server.type=inet,server.host=192.168.11.20,server.port=3333,server.mptcp=on,node-name=nbddisk,export=mydisk \
  -device virtio-blk,drive=nbddisk,id=disk0

(Many of the other NBD address parsers/forms would need extra work)

  All comments welcome.

Dave

v2
  Use of if defined(...) in the json file based on feedback
  A few missing ifdef's (from a bsd build test)
  Added nbd example.


Dr. David Alan Gilbert (5):
  channel-socket: Only set CLOEXEC if we have space for fds
  io/net-listener: Call the notifier during finalize
  migration: Add cleanup hook for inwards migration
  migration/socket: Close the listener at the end
  sockets: Support multipath TCP

 io/channel-socket.c   |  8 ++++----
 io/dns-resolver.c     |  4 ++++
 io/net-listener.c     |  3 +++
 migration/migration.c |  3 +++
 migration/migration.h |  4 ++++
 migration/multifd.c   |  5 +++++
 migration/socket.c    | 24 ++++++++++++++++++------
 qapi/sockets.json     |  5 ++++-
 util/qemu-sockets.c   | 23 +++++++++++++++++++++++
 9 files changed, 68 insertions(+), 11 deletions(-)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/5] channel-socket: Only set CLOEXEC if we have space for fds
  2021-04-21 11:28 [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert (git)
@ 2021-04-21 11:28 ` Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 2/5] io/net-listener: Call the notifier during finalize Dr. David Alan Gilbert (git)
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-21 11:28 UTC (permalink / raw)
  To: qemu-devel, berrange, kraxel, eblake, armbru, pabeni; +Cc: peterx, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

MSG_CMSG_CLOEXEC cleans up received fd's; it's really only for Unix
sockets, but currently we enable it for everything; some socket types
(IP_MPTCP) don't like this.

Only enable it when we're giving the recvmsg room to receive fd's
anyway.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 io/channel-socket.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/io/channel-socket.c b/io/channel-socket.c
index de259f7eed..606ec97cf7 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -487,15 +487,15 @@ static ssize_t qio_channel_socket_readv(QIOChannel *ioc,
 
     memset(control, 0, CMSG_SPACE(sizeof(int) * SOCKET_MAX_FDS));
 
-#ifdef MSG_CMSG_CLOEXEC
-    sflags |= MSG_CMSG_CLOEXEC;
-#endif
-
     msg.msg_iov = (struct iovec *)iov;
     msg.msg_iovlen = niov;
     if (fds && nfds) {
         msg.msg_control = control;
         msg.msg_controllen = sizeof(control);
+#ifdef MSG_CMSG_CLOEXEC
+        sflags |= MSG_CMSG_CLOEXEC;
+#endif
+
     }
 
  retry:
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/5] io/net-listener: Call the notifier during finalize
  2021-04-21 11:28 [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 1/5] channel-socket: Only set CLOEXEC if we have space for fds Dr. David Alan Gilbert (git)
@ 2021-04-21 11:28 ` Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 3/5] migration: Add cleanup hook for inwards migration Dr. David Alan Gilbert (git)
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-21 11:28 UTC (permalink / raw)
  To: qemu-devel, berrange, kraxel, eblake, armbru, pabeni; +Cc: peterx, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Call the notifier during finalize; it's currently only called
if we change it, which is not the intent.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 io/net-listener.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/io/net-listener.c b/io/net-listener.c
index 46c2643d00..1c984d69c6 100644
--- a/io/net-listener.c
+++ b/io/net-listener.c
@@ -292,6 +292,9 @@ static void qio_net_listener_finalize(Object *obj)
     QIONetListener *listener = QIO_NET_LISTENER(obj);
     size_t i;
 
+    if (listener->io_notify) {
+        listener->io_notify(listener->io_data);
+    }
     qio_net_listener_disconnect(listener);
 
     for (i = 0; i < listener->nsioc; i++) {
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 3/5] migration: Add cleanup hook for inwards migration
  2021-04-21 11:28 [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 1/5] channel-socket: Only set CLOEXEC if we have space for fds Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 2/5] io/net-listener: Call the notifier during finalize Dr. David Alan Gilbert (git)
@ 2021-04-21 11:28 ` Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 4/5] migration/socket: Close the listener at the end Dr. David Alan Gilbert (git)
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-21 11:28 UTC (permalink / raw)
  To: qemu-devel, berrange, kraxel, eblake, armbru, pabeni; +Cc: peterx, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Add a cleanup hook for incoming migration that gets called
at the end as a way for a transport to allow cleanup.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 migration/migration.c | 3 +++
 migration/migration.h | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/migration/migration.c b/migration/migration.c
index 8ca034136b..d48986fbbb 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -279,6 +279,9 @@ void migration_incoming_state_destroy(void)
         g_array_free(mis->postcopy_remote_fds, TRUE);
         mis->postcopy_remote_fds = NULL;
     }
+    if (mis->transport_cleanup) {
+        mis->transport_cleanup(mis->transport_data);
+    }
 
     qemu_event_reset(&mis->main_thread_load_event);
 
diff --git a/migration/migration.h b/migration/migration.h
index db6708326b..1b4c5da917 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -49,6 +49,10 @@ struct PostcopyBlocktimeContext;
 struct MigrationIncomingState {
     QEMUFile *from_src_file;
 
+    /* A hook to allow cleanup at the end of incoming migration */
+    void *transport_data;
+    void (*transport_cleanup)(void *data);
+
     /*
      * Free at the start of the main state load, set as the main thread finishes
      * loading state.
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 4/5] migration/socket: Close the listener at the end
  2021-04-21 11:28 [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert (git)
                   ` (2 preceding siblings ...)
  2021-04-21 11:28 ` [PATCH v2 3/5] migration: Add cleanup hook for inwards migration Dr. David Alan Gilbert (git)
@ 2021-04-21 11:28 ` Dr. David Alan Gilbert (git)
  2021-04-21 11:28 ` [PATCH v2 5/5] sockets: Support multipath TCP Dr. David Alan Gilbert (git)
  2021-06-08 18:37 ` [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert
  5 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-21 11:28 UTC (permalink / raw)
  To: qemu-devel, berrange, kraxel, eblake, armbru, pabeni; +Cc: peterx, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Delay closing the listener until the cleanup hook at the end; mptcp
needs the listener to stay open while the other paths come in.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
---
 migration/multifd.c |  5 +++++
 migration/socket.c  | 24 ++++++++++++++++++------
 2 files changed, 23 insertions(+), 6 deletions(-)

diff --git a/migration/multifd.c b/migration/multifd.c
index a6677c45c8..cebd9029b9 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -1165,6 +1165,11 @@ bool multifd_recv_all_channels_created(void)
         return true;
     }
 
+    if (!multifd_recv_state) {
+        /* Called before any connections created */
+        return false;
+    }
+
     return thread_count == qatomic_read(&multifd_recv_state->count);
 }
 
diff --git a/migration/socket.c b/migration/socket.c
index 6016642e04..05705a32d8 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -126,22 +126,31 @@ static void socket_accept_incoming_migration(QIONetListener *listener,
 {
     trace_migration_socket_incoming_accepted();
 
-    qio_channel_set_name(QIO_CHANNEL(cioc), "migration-socket-incoming");
-    migration_channel_process_incoming(QIO_CHANNEL(cioc));
-
     if (migration_has_all_channels()) {
-        /* Close listening socket as its no longer needed */
-        qio_net_listener_disconnect(listener);
-        object_unref(OBJECT(listener));
+        error_report("%s: Extra incoming migration connection; ignoring",
+                     __func__);
+        return;
     }
+
+    qio_channel_set_name(QIO_CHANNEL(cioc), "migration-socket-incoming");
+    migration_channel_process_incoming(QIO_CHANNEL(cioc));
 }
 
+static void
+socket_incoming_migration_end(void *opaque)
+{
+    QIONetListener *listener = opaque;
+
+    qio_net_listener_disconnect(listener);
+    object_unref(OBJECT(listener));
+}
 
 static void
 socket_start_incoming_migration_internal(SocketAddress *saddr,
                                          Error **errp)
 {
     QIONetListener *listener = qio_net_listener_new();
+    MigrationIncomingState *mis = migration_incoming_get_current();
     size_t i;
     int num = 1;
 
@@ -156,6 +165,9 @@ socket_start_incoming_migration_internal(SocketAddress *saddr,
         return;
     }
 
+    mis->transport_data = listener;
+    mis->transport_cleanup = socket_incoming_migration_end;
+
     qio_net_listener_set_client_func_full(listener,
                                           socket_accept_incoming_migration,
                                           NULL, NULL,
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 5/5] sockets: Support multipath TCP
  2021-04-21 11:28 [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert (git)
                   ` (3 preceding siblings ...)
  2021-04-21 11:28 ` [PATCH v2 4/5] migration/socket: Close the listener at the end Dr. David Alan Gilbert (git)
@ 2021-04-21 11:28 ` Dr. David Alan Gilbert (git)
  2021-04-23 11:17   ` Markus Armbruster
                     ` (2 more replies)
  2021-06-08 18:37 ` [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert
  5 siblings, 3 replies; 11+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2021-04-21 11:28 UTC (permalink / raw)
  To: qemu-devel, berrange, kraxel, eblake, armbru, pabeni; +Cc: peterx, quintela

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Multipath TCP allows combining multiple interfaces/routes into a single
socket, with very little work for the user/admin.

It's enabled by 'mptcp' on most socket addresses:

   ./qemu-system-x86_64 -nographic -incoming tcp:0:4444,mptcp

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 io/dns-resolver.c   |  4 ++++
 qapi/sockets.json   |  5 ++++-
 util/qemu-sockets.c | 23 +++++++++++++++++++++++
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/io/dns-resolver.c b/io/dns-resolver.c
index 743a0efc87..a5946a93bf 100644
--- a/io/dns-resolver.c
+++ b/io/dns-resolver.c
@@ -122,6 +122,10 @@ static int qio_dns_resolver_lookup_sync_inet(QIODNSResolver *resolver,
             .ipv4 = iaddr->ipv4,
             .has_ipv6 = iaddr->has_ipv6,
             .ipv6 = iaddr->ipv6,
+#ifdef IPPROTO_MPTCP
+            .has_mptcp = iaddr->has_mptcp,
+            .mptcp = iaddr->mptcp,
+#endif
         };
 
         (*addrs)[i] = newaddr;
diff --git a/qapi/sockets.json b/qapi/sockets.json
index 2e83452797..735eb4abb5 100644
--- a/qapi/sockets.json
+++ b/qapi/sockets.json
@@ -57,6 +57,8 @@
 # @keep-alive: enable keep-alive when connecting to this socket. Not supported
 #              for passive sockets. (Since 4.2)
 #
+# @mptcp: enable multi-path TCP. (Since 6.1)
+#
 # Since: 1.3
 ##
 { 'struct': 'InetSocketAddress',
@@ -66,7 +68,8 @@
     '*to': 'uint16',
     '*ipv4': 'bool',
     '*ipv6': 'bool',
-    '*keep-alive': 'bool' } }
+    '*keep-alive': 'bool',
+    '*mptcp': { 'type': 'bool', 'if': 'defined(IPPROTO_MPTCP)' } } }
 
 ##
 # @UnixSocketAddress:
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 8af0278f15..ba7cb1ec4f 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -278,6 +278,11 @@ static int inet_listen_saddr(InetSocketAddress *saddr,
 
     /* create socket + bind/listen */
     for (e = res; e != NULL; e = e->ai_next) {
+#ifdef IPPROTO_MPTCP
+        if (saddr->has_mptcp && saddr->mptcp) {
+            e->ai_protocol = IPPROTO_MPTCP;
+        }
+#endif
         getnameinfo((struct sockaddr*)e->ai_addr,e->ai_addrlen,
                         uaddr,INET6_ADDRSTRLEN,uport,32,
                         NI_NUMERICHOST | NI_NUMERICSERV);
@@ -456,6 +461,13 @@ int inet_connect_saddr(InetSocketAddress *saddr, Error **errp)
     for (e = res; e != NULL; e = e->ai_next) {
         error_free(local_err);
         local_err = NULL;
+
+#ifdef IPPROTO_MPTCP
+        if (saddr->has_mptcp && saddr->mptcp) {
+            e->ai_protocol = IPPROTO_MPTCP;
+        }
+#endif
+
         sock = inet_connect_addr(saddr, e, &local_err);
         if (sock >= 0) {
             break;
@@ -687,6 +699,17 @@ int inet_parse(InetSocketAddress *addr, const char *str, Error **errp)
         }
         addr->has_keep_alive = true;
     }
+#ifdef IPPROTO_MPTCP
+    begin = strstr(optstr, ",mptcp");
+    if (begin) {
+        if (inet_parse_flag("mptcp", begin + strlen(",mptcp"),
+                            &addr->mptcp, errp) < 0)
+        {
+            return -1;
+        }
+        addr->has_mptcp = true;
+    }
+#endif
     return 0;
 }
 
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 5/5] sockets: Support multipath TCP
  2021-04-21 11:28 ` [PATCH v2 5/5] sockets: Support multipath TCP Dr. David Alan Gilbert (git)
@ 2021-04-23 11:17   ` Markus Armbruster
  2021-04-23 11:20   ` Daniel P. Berrangé
  2021-05-11 10:04   ` Daniel P. Berrangé
  2 siblings, 0 replies; 11+ messages in thread
From: Markus Armbruster @ 2021-04-23 11:17 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: berrange, quintela, qemu-devel, peterx, kraxel, pabeni

"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> writes:

> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Multipath TCP allows combining multiple interfaces/routes into a single
> socket, with very little work for the user/admin.
>
> It's enabled by 'mptcp' on most socket addresses:
>
>    ./qemu-system-x86_64 -nographic -incoming tcp:0:4444,mptcp
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

For the QAPI schema:
Acked-by: Markus Armbruster <armbru@redhat.com>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 5/5] sockets: Support multipath TCP
  2021-04-21 11:28 ` [PATCH v2 5/5] sockets: Support multipath TCP Dr. David Alan Gilbert (git)
  2021-04-23 11:17   ` Markus Armbruster
@ 2021-04-23 11:20   ` Daniel P. Berrangé
  2021-04-26 12:26     ` Dr. David Alan Gilbert
  2021-05-11 10:04   ` Daniel P. Berrangé
  2 siblings, 1 reply; 11+ messages in thread
From: Daniel P. Berrangé @ 2021-04-23 11:20 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: quintela, armbru, peterx, qemu-devel, kraxel, pabeni

On Wed, Apr 21, 2021 at 12:28:34PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Multipath TCP allows combining multiple interfaces/routes into a single
> socket, with very little work for the user/admin.
> 
> It's enabled by 'mptcp' on most socket addresses:
> 
>    ./qemu-system-x86_64 -nographic -incoming tcp:0:4444,mptcp
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  io/dns-resolver.c   |  4 ++++
>  qapi/sockets.json   |  5 ++++-
>  util/qemu-sockets.c | 23 +++++++++++++++++++++++
>  3 files changed, 31 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


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 :|



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 5/5] sockets: Support multipath TCP
  2021-04-23 11:20   ` Daniel P. Berrangé
@ 2021-04-26 12:26     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert @ 2021-04-26 12:26 UTC (permalink / raw)
  To: Daniel P. Berrangé
  Cc: quintela, armbru, peterx, qemu-devel, kraxel, pabeni

* Daniel P. Berrangé (berrange@redhat.com) wrote:
> On Wed, Apr 21, 2021 at 12:28:34PM +0100, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > Multipath TCP allows combining multiple interfaces/routes into a single
> > socket, with very little work for the user/admin.
> > 
> > It's enabled by 'mptcp' on most socket addresses:
> > 
> >    ./qemu-system-x86_64 -nographic -incoming tcp:0:4444,mptcp
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> >  io/dns-resolver.c   |  4 ++++
> >  qapi/sockets.json   |  5 ++++-
> >  util/qemu-sockets.c | 23 +++++++++++++++++++++++
> >  3 files changed, 31 insertions(+), 1 deletion(-)
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Thanks, given this is more socketary than migration code, do you want to
take this series via your tree?

Dave

> 
> 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 :|
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 5/5] sockets: Support multipath TCP
  2021-04-21 11:28 ` [PATCH v2 5/5] sockets: Support multipath TCP Dr. David Alan Gilbert (git)
  2021-04-23 11:17   ` Markus Armbruster
  2021-04-23 11:20   ` Daniel P. Berrangé
@ 2021-05-11 10:04   ` Daniel P. Berrangé
  2 siblings, 0 replies; 11+ messages in thread
From: Daniel P. Berrangé @ 2021-05-11 10:04 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git)
  Cc: quintela, armbru, peterx, qemu-devel, kraxel, pabeni

On Wed, Apr 21, 2021 at 12:28:34PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Multipath TCP allows combining multiple interfaces/routes into a single
> socket, with very little work for the user/admin.
> 
> It's enabled by 'mptcp' on most socket addresses:
> 
>    ./qemu-system-x86_64 -nographic -incoming tcp:0:4444,mptcp
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  io/dns-resolver.c   |  4 ++++
>  qapi/sockets.json   |  5 ++++-
>  util/qemu-sockets.c | 23 +++++++++++++++++++++++
>  3 files changed, 31 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


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 :|



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2 0/5] mptcp support
  2021-04-21 11:28 [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert (git)
                   ` (4 preceding siblings ...)
  2021-04-21 11:28 ` [PATCH v2 5/5] sockets: Support multipath TCP Dr. David Alan Gilbert (git)
@ 2021-06-08 18:37 ` Dr. David Alan Gilbert
  5 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert @ 2021-06-08 18:37 UTC (permalink / raw)
  To: qemu-devel, berrange, kraxel, eblake, armbru, pabeni; +Cc: peterx, quintela

* Dr. David Alan Gilbert (git) (dgilbert@redhat.com) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Hi,
>   This set adds support for multipath TCP (mptcp), and has
> been tested for migration and (lightly) for NBD.
> 
>   Multipath-tcp is a bit like bonding, but at L3; you can use
> it to handle failure, but can also use it to split traffic across
> multiple interfaces.
> 
>   Using a pair of 10Gb interfaces, I've managed to get 19Gbps
> (with the only tuning being using huge pages and turning the MTU up).
> 
>   It needs a bleeding-edge Linux kernel (in some older ones you get
> false accept messages for the subflows), and a C lib that has the
> constants defined (as current glibc does).
> 
>   To use it you just need to append ,mptcp to an address; for migration:
> 
>   -incoming tcp:0:4444,mptcp
>   migrate -d tcp:192.168.11.20:4444,mptcp
> 
> For nbd:
> 
>   (qemu) nbd_server_start 0.0.0.0:3333,mptcp=on
> 
>   -blockdev driver=nbd,server.type=inet,server.host=192.168.11.20,server.port=3333,server.mptcp=on,node-name=nbddisk,export=mydisk \
>   -device virtio-blk,drive=nbddisk,id=disk0
> 
> (Many of the other NBD address parsers/forms would need extra work)
> 
>   All comments welcome.
> 
> Dave

Queued

> 
> v2
>   Use of if defined(...) in the json file based on feedback
>   A few missing ifdef's (from a bsd build test)
>   Added nbd example.
> 
> 
> Dr. David Alan Gilbert (5):
>   channel-socket: Only set CLOEXEC if we have space for fds
>   io/net-listener: Call the notifier during finalize
>   migration: Add cleanup hook for inwards migration
>   migration/socket: Close the listener at the end
>   sockets: Support multipath TCP
> 
>  io/channel-socket.c   |  8 ++++----
>  io/dns-resolver.c     |  4 ++++
>  io/net-listener.c     |  3 +++
>  migration/migration.c |  3 +++
>  migration/migration.h |  4 ++++
>  migration/multifd.c   |  5 +++++
>  migration/socket.c    | 24 ++++++++++++++++++------
>  qapi/sockets.json     |  5 ++++-
>  util/qemu-sockets.c   | 23 +++++++++++++++++++++++
>  9 files changed, 68 insertions(+), 11 deletions(-)
> 
> -- 
> 2.31.1
> 
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-06-08 18:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 11:28 [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert (git)
2021-04-21 11:28 ` [PATCH v2 1/5] channel-socket: Only set CLOEXEC if we have space for fds Dr. David Alan Gilbert (git)
2021-04-21 11:28 ` [PATCH v2 2/5] io/net-listener: Call the notifier during finalize Dr. David Alan Gilbert (git)
2021-04-21 11:28 ` [PATCH v2 3/5] migration: Add cleanup hook for inwards migration Dr. David Alan Gilbert (git)
2021-04-21 11:28 ` [PATCH v2 4/5] migration/socket: Close the listener at the end Dr. David Alan Gilbert (git)
2021-04-21 11:28 ` [PATCH v2 5/5] sockets: Support multipath TCP Dr. David Alan Gilbert (git)
2021-04-23 11:17   ` Markus Armbruster
2021-04-23 11:20   ` Daniel P. Berrangé
2021-04-26 12:26     ` Dr. David Alan Gilbert
2021-05-11 10:04   ` Daniel P. Berrangé
2021-06-08 18:37 ` [PATCH v2 0/5] mptcp support Dr. David Alan Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).