All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] network announce; interface selection
@ 2019-05-23 14:58 Dr. David Alan Gilbert (git)
  2019-05-23 14:58 ` [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces Dr. David Alan Gilbert (git)
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-05-23 14:58 UTC (permalink / raw)
  To: qemu-devel, jasowang, eblake, armbru, laine

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

Laine asked for some extra features on the network announce support;
this is the first one of them.
It allows you to send an announce on a subset of the interfaces.

Note since we've still only got one timer, if you start one announce
on an interface and then you start a second announce on another
interface, the first one gets cancelled even if it's part way through.
[That's the other feature Laine would like, but I need to think about
that a bit more.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>


Dr. David Alan Gilbert (2):
  net/announce: Allow optional list of interfaces
  net/announce: Add HMP optional interface list

 hmp-commands.hx        |  6 ++++--
 hmp.c                  | 38 +++++++++++++++++++++++++++++++++++++-
 include/net/announce.h |  2 +-
 net/announce.c         | 39 ++++++++++++++++++++++++++++++++-------
 net/trace-events       |  2 +-
 qapi/net.json          |  8 +++++---
 6 files changed, 80 insertions(+), 15 deletions(-)

-- 
2.21.0



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

* [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces
  2019-05-23 14:58 [Qemu-devel] [PATCH 0/2] network announce; interface selection Dr. David Alan Gilbert (git)
@ 2019-05-23 14:58 ` Dr. David Alan Gilbert (git)
  2019-05-23 16:33   ` Eric Blake
  2019-05-23 16:41   ` Markus Armbruster
  2019-05-23 14:58 ` [Qemu-devel] [PATCH 2/2] net/announce: Add HMP optional interface list Dr. David Alan Gilbert (git)
  2019-05-23 15:14 ` [Qemu-devel] [PATCH 0/2] network announce; interface selection Laine Stump
  2 siblings, 2 replies; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-05-23 14:58 UTC (permalink / raw)
  To: qemu-devel, jasowang, eblake, armbru, laine

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

Allow the caller to restrict the set of interfaces that announces are
sent on.  The default is still to send on all interfaces.

e.g.

  { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "ifaces": ["vn2","vn1"] } }

Note: There's still only one timer for the qmp command, so that
performing an 'announce-self' on one list of interfaces followed
by another 'announce-self' on another list will stop the announces
on the existing set.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 include/net/announce.h |  2 +-
 net/announce.c         | 39 ++++++++++++++++++++++++++++++++-------
 net/trace-events       |  2 +-
 qapi/net.json          |  8 +++++---
 4 files changed, 39 insertions(+), 12 deletions(-)

diff --git a/include/net/announce.h b/include/net/announce.h
index 892d302b65..3ebffe517e 100644
--- a/include/net/announce.h
+++ b/include/net/announce.h
@@ -23,7 +23,7 @@ struct AnnounceTimer {
 /* Returns: update the timer to the next time point */
 int64_t qemu_announce_timer_step(AnnounceTimer *timer);
 
-/* Delete the underlying timer */
+/* Delete the underlying timer and other data */
 void qemu_announce_timer_del(AnnounceTimer *timer);
 
 /*
diff --git a/net/announce.c b/net/announce.c
index 91e9a6e267..2a85a72280 100644
--- a/net/announce.c
+++ b/net/announce.c
@@ -38,6 +38,8 @@ void qemu_announce_timer_del(AnnounceTimer *timer)
         timer_free(timer->tm);
         timer->tm = NULL;
     }
+    qapi_free_strList(timer->params.ifaces);
+    timer->params.ifaces = NULL;
 }
 
 /*
@@ -96,24 +98,47 @@ static int announce_self_create(uint8_t *buf,
 
 static void qemu_announce_self_iter(NICState *nic, void *opaque)
 {
+    AnnounceTimer *timer = opaque;
     uint8_t buf[60];
     int len;
+    bool skip;
+
+    if (timer->params.has_ifaces) {
+        strList *entry = timer->params.ifaces;
+        /* Skip unless we find our name in the requested list */
+        skip = true;
+
+        while (entry) {
+            if (!strcmp(entry->value, nic->ncs->name)) {
+                /* Found us */
+                skip = false;
+                break;
+            }
+            entry = entry->next;
+        }
+    } else {
+        skip = false;
+    }
+
+    trace_qemu_announce_self_iter(nic->ncs->name,
+                                  qemu_ether_ntoa(&nic->conf->macaddr), skip);
 
-    trace_qemu_announce_self_iter(qemu_ether_ntoa(&nic->conf->macaddr));
-    len = announce_self_create(buf, nic->conf->macaddr.a);
+    if (!skip) {
+        len = announce_self_create(buf, nic->conf->macaddr.a);
 
-    qemu_send_packet_raw(qemu_get_queue(nic), buf, len);
+        qemu_send_packet_raw(qemu_get_queue(nic), buf, len);
 
-    /* if the NIC provides it's own announcement support, use it as well */
-    if (nic->ncs->info->announce) {
-        nic->ncs->info->announce(nic->ncs);
+        /* if the NIC provides it's own announcement support, use it as well */
+        if (nic->ncs->info->announce) {
+            nic->ncs->info->announce(nic->ncs);
+        }
     }
 }
 static void qemu_announce_self_once(void *opaque)
 {
     AnnounceTimer *timer = (AnnounceTimer *)opaque;
 
-    qemu_foreach_nic(qemu_announce_self_iter, NULL);
+    qemu_foreach_nic(qemu_announce_self_iter, timer);
 
     if (--timer->round) {
         qemu_announce_timer_step(timer);
diff --git a/net/trace-events b/net/trace-events
index a7937f3f3a..875ef2a0f3 100644
--- a/net/trace-events
+++ b/net/trace-events
@@ -1,7 +1,7 @@
 # See docs/devel/tracing.txt for syntax documentation.
 
 # announce.c
-qemu_announce_self_iter(const char *mac) "%s"
+qemu_announce_self_iter(const char *name, const char *mac, int skip) "%s:%s skip: %d"
 
 # vhost-user.c
 vhost_user_event(const char *chr, int event) "chr: %s got event: %d"
diff --git a/qapi/net.json b/qapi/net.json
index 5f7bff1637..871cfa7405 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -706,7 +706,8 @@
   'data': { 'initial': 'int',
             'max': 'int',
             'rounds': 'int',
-            'step': 'int' } }
+            'step': 'int',
+            '*ifaces': ['str'] } }
 
 ##
 # @announce-self:
@@ -718,9 +719,10 @@
 #
 # Example:
 #
-# -> { "execute": "announce-self"
+# -> { "execute": "announce-self",
 #      "arguments": {
-#          "initial": 50, "max": 550, "rounds": 10, "step": 50 } }
+#          "initial": 50, "max": 550, "rounds": 10, "step": 50,
+#          "ifaces": ["vn2","vn3"] } }
 # <- { "return": {} }
 #
 # Since: 4.0
-- 
2.21.0



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

* [Qemu-devel] [PATCH 2/2] net/announce: Add HMP optional interface list
  2019-05-23 14:58 [Qemu-devel] [PATCH 0/2] network announce; interface selection Dr. David Alan Gilbert (git)
  2019-05-23 14:58 ` [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces Dr. David Alan Gilbert (git)
@ 2019-05-23 14:58 ` Dr. David Alan Gilbert (git)
  2019-05-23 15:14 ` [Qemu-devel] [PATCH 0/2] network announce; interface selection Laine Stump
  2 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2019-05-23 14:58 UTC (permalink / raw)
  To: qemu-devel, jasowang, eblake, armbru, laine

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

Add the optional interface list to the HMP command.

i.e.

   All interfaces
        announce_self

   Just the named interfaces:
        announce_self vn1,vn2

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hmp-commands.hx |  6 ++++--
 hmp.c           | 38 +++++++++++++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/hmp-commands.hx b/hmp-commands.hx
index 3dc421cb6a..a8cbcb7681 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -955,8 +955,8 @@ ETEXI
 
     {
         .name       = "announce_self",
-        .args_type  = "",
-        .params     = "",
+        .args_type  = "ifaces:s?",
+        .params     = "[ifaces]",
         .help       = "Trigger GARP/RARP announcements",
         .cmd        = hmp_announce_self,
     },
@@ -967,6 +967,8 @@ STEXI
 Trigger a round of GARP/RARP broadcasts; this is useful for explicitly updating the
 network infrastructure after a reconfiguration or some forms of migration.
 The timings of the round are set by the migration announce parameters.
+An optional comma separated @var{ifaces} list restricts the announce to the named
+set of interfaces.
 ETEXI
 
     {
diff --git a/hmp.c b/hmp.c
index a9665da6ec..f9b1c1d01d 100644
--- a/hmp.c
+++ b/hmp.c
@@ -27,6 +27,7 @@
 #include "monitor/monitor.h"
 #include "monitor/qdev.h"
 #include "qapi/error.h"
+#include "qapi/clone-visitor.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/qapi-builtin-visit.h"
 #include "qapi/qapi-commands-block.h"
@@ -38,6 +39,7 @@
 #include "qapi/qapi-commands-run-state.h"
 #include "qapi/qapi-commands-tpm.h"
 #include "qapi/qapi-commands-ui.h"
+#include "qapi/qapi-visit-net.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/string-input-visitor.h"
@@ -67,6 +69,32 @@ static void hmp_handle_error(Monitor *mon, Error **errp)
     }
 }
 
+/*
+ * Produce a strList from a comma separated list.
+ * A NULL or empty input string return NULL.
+ */
+static strList *strList_from_comma_list(const char *in)
+{
+    strList *res = NULL;
+    strList **hook = &res;
+
+    while (in && in[0]) {
+        char *comma = strchr(in, ',');
+        *hook = g_new0(strList, 1);
+
+        if (comma) {
+            (*hook)->value = g_strndup(in, comma - in);
+            in = comma + 1; /* skip the , */
+        } else {
+            (*hook)->value = g_strdup(in);
+            in = NULL;
+        }
+        hook = &(*hook)->next;
+    }
+
+    return res;
+}
+
 void hmp_info_name(Monitor *mon, const QDict *qdict)
 {
     NameInfo *info;
@@ -1640,7 +1668,15 @@ void hmp_info_snapshots(Monitor *mon, const QDict *qdict)
 
 void hmp_announce_self(Monitor *mon, const QDict *qdict)
 {
-    qmp_announce_self(migrate_announce_params(), NULL);
+    const char *ifaces_str = qdict_get_try_str(qdict, "ifaces");
+    AnnounceParameters *params = QAPI_CLONE(AnnounceParameters,
+                                            migrate_announce_params());
+
+    qapi_free_strList(params->ifaces);
+    params->ifaces = strList_from_comma_list(ifaces_str);
+    params->has_ifaces = params->ifaces != NULL;
+    qmp_announce_self(params, NULL);
+    qapi_free_AnnounceParameters(params);
 }
 
 void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
-- 
2.21.0



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

* Re: [Qemu-devel] [PATCH 0/2] network announce; interface selection
  2019-05-23 14:58 [Qemu-devel] [PATCH 0/2] network announce; interface selection Dr. David Alan Gilbert (git)
  2019-05-23 14:58 ` [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces Dr. David Alan Gilbert (git)
  2019-05-23 14:58 ` [Qemu-devel] [PATCH 2/2] net/announce: Add HMP optional interface list Dr. David Alan Gilbert (git)
@ 2019-05-23 15:14 ` Laine Stump
  2019-05-23 15:18   ` Dr. David Alan Gilbert
  2 siblings, 1 reply; 9+ messages in thread
From: Laine Stump @ 2019-05-23 15:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: jasowang, Dr. David Alan Gilbert (git), armbru

On 5/23/19 10:58 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Laine asked for some extra features on the network announce support;
> this is the first one of them.
> It allows you to send an announce on a subset of the interfaces.
> 
> Note since we've still only got one timer, if you start one announce
> on an interface and then you start a second announce on another
> interface, the first one gets cancelled even if it's part way through.
> [That's the other feature Laine would like, but I need to think about
> that a bit more.

I have a question without trying to read/understand the code: Does the 
restricted interface list persist to future self-announces? (e.g. one 
that is internally initiated by qemu) Or does it only apply to the 
current new self-announce? (Hopefully the latter)

> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> 
> 
> Dr. David Alan Gilbert (2):
>    net/announce: Allow optional list of interfaces
>    net/announce: Add HMP optional interface list
> 
>   hmp-commands.hx        |  6 ++++--
>   hmp.c                  | 38 +++++++++++++++++++++++++++++++++++++-
>   include/net/announce.h |  2 +-
>   net/announce.c         | 39 ++++++++++++++++++++++++++++++++-------
>   net/trace-events       |  2 +-
>   qapi/net.json          |  8 +++++---
>   6 files changed, 80 insertions(+), 15 deletions(-)
> 



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

* Re: [Qemu-devel] [PATCH 0/2] network announce; interface selection
  2019-05-23 15:14 ` [Qemu-devel] [PATCH 0/2] network announce; interface selection Laine Stump
@ 2019-05-23 15:18   ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2019-05-23 15:18 UTC (permalink / raw)
  To: Laine Stump; +Cc: jasowang, qemu-devel, armbru

* Laine Stump (laine@redhat.com) wrote:
> On 5/23/19 10:58 AM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > Laine asked for some extra features on the network announce support;
> > this is the first one of them.
> > It allows you to send an announce on a subset of the interfaces.
> > 
> > Note since we've still only got one timer, if you start one announce
> > on an interface and then you start a second announce on another
> > interface, the first one gets cancelled even if it's part way through.
> > [That's the other feature Laine would like, but I need to think about
> > that a bit more.
> 
> I have a question without trying to read/understand the code: Does the
> restricted interface list persist to future self-announces? (e.g. one that
> is internally initiated by qemu) Or does it only apply to the current new
> self-announce? (Hopefully the latter)

Only to the manually triggered self-announce, not to the ones
generated by migration.

Dave

> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > 
> > 
> > Dr. David Alan Gilbert (2):
> >    net/announce: Allow optional list of interfaces
> >    net/announce: Add HMP optional interface list
> > 
> >   hmp-commands.hx        |  6 ++++--
> >   hmp.c                  | 38 +++++++++++++++++++++++++++++++++++++-
> >   include/net/announce.h |  2 +-
> >   net/announce.c         | 39 ++++++++++++++++++++++++++++++++-------
> >   net/trace-events       |  2 +-
> >   qapi/net.json          |  8 +++++---
> >   6 files changed, 80 insertions(+), 15 deletions(-)
> > 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


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

* Re: [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces
  2019-05-23 14:58 ` [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces Dr. David Alan Gilbert (git)
@ 2019-05-23 16:33   ` Eric Blake
  2019-05-29  9:03     ` Dr. David Alan Gilbert
  2019-05-23 16:41   ` Markus Armbruster
  1 sibling, 1 reply; 9+ messages in thread
From: Eric Blake @ 2019-05-23 16:33 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git), qemu-devel, jasowang, armbru, laine

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

On 5/23/19 9:58 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> Allow the caller to restrict the set of interfaces that announces are
> sent on.  The default is still to send on all interfaces.
> 
> e.g.
> 
>   { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "ifaces": ["vn2","vn1"] } }
> 
> Note: There's still only one timer for the qmp command, so that
> performing an 'announce-self' on one list of interfaces followed
> by another 'announce-self' on another list will stop the announces
> on the existing set.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---

> +++ b/qapi/net.json
> @@ -706,7 +706,8 @@
>    'data': { 'initial': 'int',
>              'max': 'int',
>              'rounds': 'int',
> -            'step': 'int' } }
> +            'step': 'int',
> +            '*ifaces': ['str'] } }

Missing documentation for the addition, including a '(since 4.1)' tag.

>  
>  ##
>  # @announce-self:
> @@ -718,9 +719,10 @@
>  #
>  # Example:
>  #
> -# -> { "execute": "announce-self"
> +# -> { "execute": "announce-self",
>  #      "arguments": {
> -#          "initial": 50, "max": 550, "rounds": 10, "step": 50 } }
> +#          "initial": 50, "max": 550, "rounds": 10, "step": 50,
> +#          "ifaces": ["vn2","vn3"] } }
>  # <- { "return": {} }
>  #
>  # Since: 4.0
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces
  2019-05-23 14:58 ` [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces Dr. David Alan Gilbert (git)
  2019-05-23 16:33   ` Eric Blake
@ 2019-05-23 16:41   ` Markus Armbruster
  2019-05-29  9:09     ` Dr. David Alan Gilbert
  1 sibling, 1 reply; 9+ messages in thread
From: Markus Armbruster @ 2019-05-23 16:41 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git); +Cc: jasowang, qemu-devel, laine

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

> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Allow the caller to restrict the set of interfaces that announces are
> sent on.  The default is still to send on all interfaces.
>
> e.g.
>
>   { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "ifaces": ["vn2","vn1"] } }
>
> Note: There's still only one timer for the qmp command, so that
> performing an 'announce-self' on one list of interfaces followed
> by another 'announce-self' on another list will stop the announces
> on the existing set.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
[...]
> diff --git a/qapi/net.json b/qapi/net.json
> index 5f7bff1637..871cfa7405 100644
> --- a/qapi/net.json
> +++ b/qapi/net.json
> @@ -706,7 +706,8 @@
>    'data': { 'initial': 'int',
>              'max': 'int',
>              'rounds': 'int',
> -            'step': 'int' } }
> +            'step': 'int',
> +            '*ifaces': ['str'] } }

QMP traditionally eschews abbreviations like "iface".

>  
>  ##
>  # @announce-self:
> @@ -718,9 +719,10 @@
>  #
>  # Example:
>  #
> -# -> { "execute": "announce-self"
> +# -> { "execute": "announce-self",
>  #      "arguments": {
> -#          "initial": 50, "max": 550, "rounds": 10, "step": 50 } }
> +#          "initial": 50, "max": 550, "rounds": 10, "step": 50,
> +#          "ifaces": ["vn2","vn3"] } }
>  # <- { "return": {} }
>  #
>  # Since: 4.0


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

* Re: [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces
  2019-05-23 16:33   ` Eric Blake
@ 2019-05-29  9:03     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2019-05-29  9:03 UTC (permalink / raw)
  To: Eric Blake; +Cc: jasowang, qemu-devel, laine, armbru

* Eric Blake (eblake@redhat.com) wrote:
> On 5/23/19 9:58 AM, Dr. David Alan Gilbert (git) wrote:
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> > 
> > Allow the caller to restrict the set of interfaces that announces are
> > sent on.  The default is still to send on all interfaces.
> > 
> > e.g.
> > 
> >   { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "ifaces": ["vn2","vn1"] } }
> > 
> > Note: There's still only one timer for the qmp command, so that
> > performing an 'announce-self' on one list of interfaces followed
> > by another 'announce-self' on another list will stop the announces
> > on the existing set.
> > 
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> > ---
> 
> > +++ b/qapi/net.json
> > @@ -706,7 +706,8 @@
> >    'data': { 'initial': 'int',
> >              'max': 'int',
> >              'rounds': 'int',
> > -            'step': 'int' } }
> > +            'step': 'int',
> > +            '*ifaces': ['str'] } }
> 
> Missing documentation for the addition, including a '(since 4.1)' tag.

Oops, thanks, added:

# @ifaces: An optional list of interface names, which restrict the
#        announcment to the listed interfaces. (Since 4.1)
#

Dave

> >  
> >  ##
> >  # @announce-self:
> > @@ -718,9 +719,10 @@
> >  #
> >  # Example:
> >  #
> > -# -> { "execute": "announce-self"
> > +# -> { "execute": "announce-self",
> >  #      "arguments": {
> > -#          "initial": 50, "max": 550, "rounds": 10, "step": 50 } }
> > +#          "initial": 50, "max": 550, "rounds": 10, "step": 50,
> > +#          "ifaces": ["vn2","vn3"] } }
> >  # <- { "return": {} }
> >  #
> >  # Since: 4.0
> > 
> 
> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3226
> Virtualization:  qemu.org | libvirt.org
> 



--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


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

* Re: [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces
  2019-05-23 16:41   ` Markus Armbruster
@ 2019-05-29  9:09     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Dr. David Alan Gilbert @ 2019-05-29  9:09 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: jasowang, qemu-devel, laine

* Markus Armbruster (armbru@redhat.com) wrote:
> "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> writes:
> 
> > From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> >
> > Allow the caller to restrict the set of interfaces that announces are
> > sent on.  The default is still to send on all interfaces.
> >
> > e.g.
> >
> >   { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "ifaces": ["vn2","vn1"] } }
> >
> > Note: There's still only one timer for the qmp command, so that
> > performing an 'announce-self' on one list of interfaces followed
> > by another 'announce-self' on another list will stop the announces
> > on the existing set.
> >
> > Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> [...]
> > diff --git a/qapi/net.json b/qapi/net.json
> > index 5f7bff1637..871cfa7405 100644
> > --- a/qapi/net.json
> > +++ b/qapi/net.json
> > @@ -706,7 +706,8 @@
> >    'data': { 'initial': 'int',
> >              'max': 'int',
> >              'rounds': 'int',
> > -            'step': 'int' } }
> > +            'step': 'int',
> > +            '*ifaces': ['str'] } }
> 
> QMP traditionally eschews abbreviations like "iface".

OK, renamed 'interfaces'

Dave

> >  
> >  ##
> >  # @announce-self:
> > @@ -718,9 +719,10 @@
> >  #
> >  # Example:
> >  #
> > -# -> { "execute": "announce-self"
> > +# -> { "execute": "announce-self",
> >  #      "arguments": {
> > -#          "initial": 50, "max": 550, "rounds": 10, "step": 50 } }
> > +#          "initial": 50, "max": 550, "rounds": 10, "step": 50,
> > +#          "ifaces": ["vn2","vn3"] } }
> >  # <- { "return": {} }
> >  #
> >  # Since: 4.0
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


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

end of thread, other threads:[~2019-05-29  9:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 14:58 [Qemu-devel] [PATCH 0/2] network announce; interface selection Dr. David Alan Gilbert (git)
2019-05-23 14:58 ` [Qemu-devel] [PATCH 1/2] net/announce: Allow optional list of interfaces Dr. David Alan Gilbert (git)
2019-05-23 16:33   ` Eric Blake
2019-05-29  9:03     ` Dr. David Alan Gilbert
2019-05-23 16:41   ` Markus Armbruster
2019-05-29  9:09     ` Dr. David Alan Gilbert
2019-05-23 14:58 ` [Qemu-devel] [PATCH 2/2] net/announce: Add HMP optional interface list Dr. David Alan Gilbert (git)
2019-05-23 15:14 ` [Qemu-devel] [PATCH 0/2] network announce; interface selection Laine Stump
2019-05-23 15:18   ` Dr. David Alan Gilbert

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.