diff mbox series

[ovs-dev,branch-21.12] ovs: Bump submodule to newer version

Message ID 20220701140428.313591-1-amusil@redhat.com
State Accepted
Headers show
Series [ovs-dev,branch-21.12] ovs: Bump submodule to newer version | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test fail github build: failed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Ales Musil July 1, 2022, 2:04 p.m. UTC
From: Adrian Moreno <amorenoz@redhat.com>

Specifically for:
a77ad96 ("dpif-netdev: Refactor AVX512 runtime checks.")

At the same time cherry-pick the patch that
allows the bump.
996ed75 ("treewide: bump ovs and fix problematic loops")

Reported-at: https://bugzilla.redhat.com/2102618
Co-authored-by: Adrian Moreno <amorenoz@redhat.com>
Co-authored-by: Dumitru Ceara <dceara@redhat.com>
Co-authored-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Ales Musil <amusil@redhat.com>
---
 controller/ofctrl.c   |  7 ++++++-
 lib/actions.c         |  2 +-
 lib/expr.c            | 33 +++++++++++++++++++--------------
 lib/ovn-util.c        |  2 +-
 ovs                   |  2 +-
 utilities/ovn-nbctl.c |  6 +++---
 utilities/ovn-trace.c |  8 +++++---
 7 files changed, 36 insertions(+), 24 deletions(-)

Comments

0-day Robot July 1, 2022, 2:20 p.m. UTC | #1
Bleep bloop.  Greetings Ales Musil, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Author should not be also be co-author.
Lines checked: 263, Warnings: 0, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
Mark Michelson July 1, 2022, 3:16 p.m. UTC | #2
Thanks Ales and Adrian,

I merged this to branch-21.12.

On 7/1/22 10:04, Ales Musil wrote:
> From: Adrian Moreno <amorenoz@redhat.com>
> 
> Specifically for:
> a77ad96 ("dpif-netdev: Refactor AVX512 runtime checks.")
> 
> At the same time cherry-pick the patch that
> allows the bump.
> 996ed75 ("treewide: bump ovs and fix problematic loops")
> 
> Reported-at: https://bugzilla.redhat.com/2102618
> Co-authored-by: Adrian Moreno <amorenoz@redhat.com>
> Co-authored-by: Dumitru Ceara <dceara@redhat.com>
> Co-authored-by: Mark Michelson <mmichels@redhat.com>
> Signed-off-by: Ales Musil <amusil@redhat.com>
> ---
>   controller/ofctrl.c   |  7 ++++++-
>   lib/actions.c         |  2 +-
>   lib/expr.c            | 33 +++++++++++++++++++--------------
>   lib/ovn-util.c        |  2 +-
>   ovs                   |  2 +-
>   utilities/ovn-nbctl.c |  6 +++---
>   utilities/ovn-trace.c |  8 +++++---
>   7 files changed, 36 insertions(+), 24 deletions(-)
> 
> diff --git a/controller/ofctrl.c b/controller/ofctrl.c
> index 8d958faf1..c0a04ec50 100644
> --- a/controller/ofctrl.c
> +++ b/controller/ofctrl.c
> @@ -918,7 +918,12 @@ link_installed_to_desired(struct installed_flow *i, struct desired_flow *d)
>               break;
>           }
>       }
> -    ovs_list_insert(&f->installed_ref_list_node, &d->installed_ref_list_node);
> +    if (!f) {
> +        ovs_list_insert(&i->desired_refs, &d->installed_ref_list_node);
> +    } else {
> +        ovs_list_insert(&f->installed_ref_list_node,
> +                        &d->installed_ref_list_node);
> +    }
>       d->installed_flow = i;
>       return installed_flow_get_active(i) == d;
>   }
> diff --git a/lib/actions.c b/lib/actions.c
> index 75a40e17a..d5985b937 100644
> --- a/lib/actions.c
> +++ b/lib/actions.c
> @@ -2436,7 +2436,7 @@ validate_empty_lb_backends(struct action_context *ctx,
>   
>           switch (o->option->code) {
>           case EMPTY_LB_VIP:
> -            if (!inet_parse_active(c->string, 0, &ss, false)) {
> +            if (!inet_parse_active(c->string, 0, &ss, false, NULL)) {
>                   lexer_error(ctx->lexer, "Invalid load balancer VIP '%s'",
>                               c->string);
>                   return;
> diff --git a/lib/expr.c b/lib/expr.c
> index e3f6bb892..30ed25c6e 100644
> --- a/lib/expr.c
> +++ b/lib/expr.c
> @@ -203,16 +203,17 @@ expr_combine(enum expr_type type, struct expr *a, struct expr *b)
>   }
>   
>   static void
> -expr_insert_andor(struct expr *andor, struct expr *before, struct expr *new)
> +expr_insert_andor(struct expr *andor, struct ovs_list *before,
> +                  struct expr *new)
>   {
>       if (new->type == andor->type) {
>           if (andor->type == EXPR_T_AND) {
>               /* Conjunction junction, what's your function? */
>           }
> -        ovs_list_splice(&before->node, new->andor.next, &new->andor);
> -        free(new);
> +        ovs_list_splice(before, new->andor.next, &new->andor);
> +        expr_destroy(new);
>       } else {
> -        ovs_list_insert(&before->node, &new->node);
> +        ovs_list_insert(before, &new->node);
>       }
>   }
>   
> @@ -1955,7 +1956,8 @@ expr_annotate__(struct expr *expr, const struct shash *symtab,
>                   expr_destroy(expr);
>                   return NULL;
>               }
> -            expr_insert_andor(expr, next, new_sub);
> +            expr_insert_andor(expr, next ? &next->node : &expr->andor,
> +                              new_sub);
>           }
>           *errorp = NULL;
>           return expr;
> @@ -2155,7 +2157,7 @@ expr_evaluate_condition(struct expr *expr,
>               struct expr *e = expr_evaluate_condition(sub, is_chassis_resident,
>                                                        c_aux);
>               e = expr_fix(e);
> -            expr_insert_andor(expr, next, e);
> +            expr_insert_andor(expr, next ? &next->node : &expr->andor, e);
>           }
>           return expr_fix(expr);
>   
> @@ -2188,7 +2190,8 @@ expr_simplify(struct expr *expr)
>       case EXPR_T_OR:
>           LIST_FOR_EACH_SAFE (sub, next, node, &expr->andor) {
>               ovs_list_remove(&sub->node);
> -            expr_insert_andor(expr, next, expr_simplify(sub));
> +            expr_insert_andor(expr, next ? &next->node : &expr->andor,
> +                              expr_simplify(sub));
>           }
>           return expr_fix(expr);
>   
> @@ -2298,12 +2301,13 @@ crush_and_string(struct expr *expr, const struct expr_symbol *symbol)
>        * EXPR_T_OR with EXPR_T_CMP subexpressions. */
>       struct expr *sub, *next = NULL;
>       LIST_FOR_EACH_SAFE (sub, next, node, &expr->andor) {
> +        struct ovs_list *next_list = next ? &next->node : &expr->andor;
>           ovs_list_remove(&sub->node);
>           struct expr *new = crush_cmps(sub, symbol);
>           switch (new->type) {
>           case EXPR_T_CMP:
>               if (!singleton) {
> -                ovs_list_insert(&next->node, &new->node);
> +                ovs_list_insert(next_list, &new->node);
>                   singleton = new;
>               } else {
>                   bool match = !strcmp(new->cmp.string, singleton->cmp.string);
> @@ -2317,7 +2321,7 @@ crush_and_string(struct expr *expr, const struct expr_symbol *symbol)
>           case EXPR_T_AND:
>               OVS_NOT_REACHED();
>           case EXPR_T_OR:
> -            ovs_list_insert(&next->node, &new->node);
> +            ovs_list_insert(next_list, &new->node);
>               break;
>           case EXPR_T_BOOLEAN:
>               if (!new->boolean) {
> @@ -2413,7 +2417,7 @@ crush_and_numeric(struct expr *expr, const struct expr_symbol *symbol)
>           case EXPR_T_AND:
>               OVS_NOT_REACHED();
>           case EXPR_T_OR:
> -            ovs_list_insert(&next->node, &new->node);
> +            ovs_list_insert(next ? &next->node : &expr->andor, &new->node);
>               break;
>           case EXPR_T_BOOLEAN:
>               if (!new->boolean) {
> @@ -2579,7 +2583,8 @@ crush_or(struct expr *expr, const struct expr_symbol *symbol)
>        * is now a disjunction of cmps over the same symbol. */
>       LIST_FOR_EACH_SAFE (sub, next, node, &expr->andor) {
>           ovs_list_remove(&sub->node);
> -        expr_insert_andor(expr, next, crush_cmps(sub, symbol));
> +        expr_insert_andor(expr, next ? &next->node : &expr->andor,
> +                          crush_cmps(sub, symbol));
>       }
>       expr = expr_fix(expr);
>       if (expr->type != EXPR_T_OR) {
> @@ -2737,8 +2742,7 @@ expr_normalize_and(struct expr *expr)
>   
>       struct expr *a, *b;
>       LIST_FOR_EACH_SAFE (a, b, node, &expr->andor) {
> -        if (&b->node == &expr->andor
> -            || a->type != EXPR_T_CMP || b->type != EXPR_T_CMP
> +        if (!b || a->type != EXPR_T_CMP || b->type != EXPR_T_CMP
>               || a->cmp.symbol != b->cmp.symbol) {
>               continue;
>           } else if (a->cmp.symbol->width
> @@ -2815,7 +2819,8 @@ expr_normalize_or(struct expr *expr)
>                   }
>                   free(new);
>               } else {
> -                expr_insert_andor(expr, next, new);
> +                expr_insert_andor(expr, next ? &next->node : &expr->andor,
> +                                  new);
>               }
>           } else {
>               ovs_assert(sub->type == EXPR_T_CMP ||
> diff --git a/lib/ovn-util.c b/lib/ovn-util.c
> index d2ba43d66..ac63da5a2 100644
> --- a/lib/ovn-util.c
> +++ b/lib/ovn-util.c
> @@ -747,7 +747,7 @@ ip_address_and_port_from_lb_key(const char *key, char **ip_address,
>                                   uint16_t *port, int *addr_family)
>   {
>       struct sockaddr_storage ss;
> -    if (!inet_parse_active(key, 0, &ss, false)) {
> +    if (!inet_parse_active(key, 0, &ss, false, NULL)) {
>           static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
>           VLOG_WARN_RL(&rl, "bad ip address or port for load balancer key %s",
>                        key);
> diff --git a/ovs b/ovs
> index 498cedc48..45ecaa9e5 160000
> --- a/ovs
> +++ b/ovs
> @@ -1 +1 @@
> -Subproject commit 498cedc483f3239c839c55b4d9f2261b61fb6ace
> +Subproject commit 45ecaa9e574d63496e54a4093128302e2c2e10d0
> diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
> index 05d5d68b7..910eeb2f5 100644
> --- a/utilities/ovn-nbctl.c
> +++ b/utilities/ovn-nbctl.c
> @@ -2837,7 +2837,7 @@ nbctl_lb_add(struct ctl_context *ctx)
>       }
>   
>       struct sockaddr_storage ss_vip;
> -    if (!inet_parse_active(lb_vip, 0, &ss_vip, false)) {
> +    if (!inet_parse_active(lb_vip, 0, &ss_vip, false, NULL)) {
>           ctl_error(ctx, "%s: should be an IP address (or an IP address "
>                     "and a port number with : as a separator).", lb_vip);
>           return;
> @@ -2867,7 +2867,7 @@ nbctl_lb_add(struct ctl_context *ctx)
>           struct sockaddr_storage ss_dst;
>   
>           if (lb_vip_port) {
> -            if (!inet_parse_active(token, -1, &ss_dst, false)) {
> +            if (!inet_parse_active(token, -1, &ss_dst, false, NULL)) {
>                   ctl_error(ctx, "%s: should be an IP address and a port "
>                             "number with : as a separator.", token);
>                   goto out;
> @@ -3013,7 +3013,7 @@ lb_info_add_smap(const struct nbrec_load_balancer *lb,
>               const struct smap_node *node = nodes[i];
>   
>               struct sockaddr_storage ss;
> -            if (!inet_parse_active(node->key, 0, &ss, false)) {
> +            if (!inet_parse_active(node->key, 0, &ss, false, NULL)) {
>                   continue;
>               }
>   
> diff --git a/utilities/ovn-trace.c b/utilities/ovn-trace.c
> index b7460322e..4d3523616 100644
> --- a/utilities/ovn-trace.c
> +++ b/utilities/ovn-trace.c
> @@ -214,7 +214,7 @@ static void
>   parse_lb_option(const char *s)
>   {
>       struct sockaddr_storage ss;
> -    if (!inet_parse_active(s, 0, &ss, false)) {
> +    if (!inet_parse_active(s, 0, &ss, false, NULL)) {
>           ovs_fatal(0, "%s: bad address", s);
>       }
>   
> @@ -1388,7 +1388,8 @@ ovntrace_node_prune_summary(struct ovs_list *nodes)
>               sub->type == OVNTRACE_NODE_TABLE) {
>               /* Replace 'sub' by its children, if any, */
>               ovs_list_remove(&sub->node);
> -            ovs_list_splice(&next->node, sub->subs.next, &sub->subs);
> +            ovs_list_splice(next ? &next->node : nodes, sub->subs.next,
> +                            &sub->subs);
>               ovntrace_node_destroy(sub);
>           }
>       }
> @@ -1432,7 +1433,8 @@ ovntrace_node_prune_hard(struct ovs_list *nodes)
>               sub->type == OVNTRACE_NODE_OUTPUT) {
>               /* Replace 'sub' by its children, if any, */
>               ovs_list_remove(&sub->node);
> -            ovs_list_splice(&next->node, sub->subs.next, &sub->subs);
> +            ovs_list_splice(next ? &next->node : nodes, sub->subs.next,
> +                            &sub->subs);
>               ovntrace_node_destroy(sub);
>           }
>       }
>
diff mbox series

Patch

diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index 8d958faf1..c0a04ec50 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -918,7 +918,12 @@  link_installed_to_desired(struct installed_flow *i, struct desired_flow *d)
             break;
         }
     }
-    ovs_list_insert(&f->installed_ref_list_node, &d->installed_ref_list_node);
+    if (!f) {
+        ovs_list_insert(&i->desired_refs, &d->installed_ref_list_node);
+    } else {
+        ovs_list_insert(&f->installed_ref_list_node,
+                        &d->installed_ref_list_node);
+    }
     d->installed_flow = i;
     return installed_flow_get_active(i) == d;
 }
diff --git a/lib/actions.c b/lib/actions.c
index 75a40e17a..d5985b937 100644
--- a/lib/actions.c
+++ b/lib/actions.c
@@ -2436,7 +2436,7 @@  validate_empty_lb_backends(struct action_context *ctx,
 
         switch (o->option->code) {
         case EMPTY_LB_VIP:
-            if (!inet_parse_active(c->string, 0, &ss, false)) {
+            if (!inet_parse_active(c->string, 0, &ss, false, NULL)) {
                 lexer_error(ctx->lexer, "Invalid load balancer VIP '%s'",
                             c->string);
                 return;
diff --git a/lib/expr.c b/lib/expr.c
index e3f6bb892..30ed25c6e 100644
--- a/lib/expr.c
+++ b/lib/expr.c
@@ -203,16 +203,17 @@  expr_combine(enum expr_type type, struct expr *a, struct expr *b)
 }
 
 static void
-expr_insert_andor(struct expr *andor, struct expr *before, struct expr *new)
+expr_insert_andor(struct expr *andor, struct ovs_list *before,
+                  struct expr *new)
 {
     if (new->type == andor->type) {
         if (andor->type == EXPR_T_AND) {
             /* Conjunction junction, what's your function? */
         }
-        ovs_list_splice(&before->node, new->andor.next, &new->andor);
-        free(new);
+        ovs_list_splice(before, new->andor.next, &new->andor);
+        expr_destroy(new);
     } else {
-        ovs_list_insert(&before->node, &new->node);
+        ovs_list_insert(before, &new->node);
     }
 }
 
@@ -1955,7 +1956,8 @@  expr_annotate__(struct expr *expr, const struct shash *symtab,
                 expr_destroy(expr);
                 return NULL;
             }
-            expr_insert_andor(expr, next, new_sub);
+            expr_insert_andor(expr, next ? &next->node : &expr->andor,
+                              new_sub);
         }
         *errorp = NULL;
         return expr;
@@ -2155,7 +2157,7 @@  expr_evaluate_condition(struct expr *expr,
             struct expr *e = expr_evaluate_condition(sub, is_chassis_resident,
                                                      c_aux);
             e = expr_fix(e);
-            expr_insert_andor(expr, next, e);
+            expr_insert_andor(expr, next ? &next->node : &expr->andor, e);
         }
         return expr_fix(expr);
 
@@ -2188,7 +2190,8 @@  expr_simplify(struct expr *expr)
     case EXPR_T_OR:
         LIST_FOR_EACH_SAFE (sub, next, node, &expr->andor) {
             ovs_list_remove(&sub->node);
-            expr_insert_andor(expr, next, expr_simplify(sub));
+            expr_insert_andor(expr, next ? &next->node : &expr->andor,
+                              expr_simplify(sub));
         }
         return expr_fix(expr);
 
@@ -2298,12 +2301,13 @@  crush_and_string(struct expr *expr, const struct expr_symbol *symbol)
      * EXPR_T_OR with EXPR_T_CMP subexpressions. */
     struct expr *sub, *next = NULL;
     LIST_FOR_EACH_SAFE (sub, next, node, &expr->andor) {
+        struct ovs_list *next_list = next ? &next->node : &expr->andor;
         ovs_list_remove(&sub->node);
         struct expr *new = crush_cmps(sub, symbol);
         switch (new->type) {
         case EXPR_T_CMP:
             if (!singleton) {
-                ovs_list_insert(&next->node, &new->node);
+                ovs_list_insert(next_list, &new->node);
                 singleton = new;
             } else {
                 bool match = !strcmp(new->cmp.string, singleton->cmp.string);
@@ -2317,7 +2321,7 @@  crush_and_string(struct expr *expr, const struct expr_symbol *symbol)
         case EXPR_T_AND:
             OVS_NOT_REACHED();
         case EXPR_T_OR:
-            ovs_list_insert(&next->node, &new->node);
+            ovs_list_insert(next_list, &new->node);
             break;
         case EXPR_T_BOOLEAN:
             if (!new->boolean) {
@@ -2413,7 +2417,7 @@  crush_and_numeric(struct expr *expr, const struct expr_symbol *symbol)
         case EXPR_T_AND:
             OVS_NOT_REACHED();
         case EXPR_T_OR:
-            ovs_list_insert(&next->node, &new->node);
+            ovs_list_insert(next ? &next->node : &expr->andor, &new->node);
             break;
         case EXPR_T_BOOLEAN:
             if (!new->boolean) {
@@ -2579,7 +2583,8 @@  crush_or(struct expr *expr, const struct expr_symbol *symbol)
      * is now a disjunction of cmps over the same symbol. */
     LIST_FOR_EACH_SAFE (sub, next, node, &expr->andor) {
         ovs_list_remove(&sub->node);
-        expr_insert_andor(expr, next, crush_cmps(sub, symbol));
+        expr_insert_andor(expr, next ? &next->node : &expr->andor,
+                          crush_cmps(sub, symbol));
     }
     expr = expr_fix(expr);
     if (expr->type != EXPR_T_OR) {
@@ -2737,8 +2742,7 @@  expr_normalize_and(struct expr *expr)
 
     struct expr *a, *b;
     LIST_FOR_EACH_SAFE (a, b, node, &expr->andor) {
-        if (&b->node == &expr->andor
-            || a->type != EXPR_T_CMP || b->type != EXPR_T_CMP
+        if (!b || a->type != EXPR_T_CMP || b->type != EXPR_T_CMP
             || a->cmp.symbol != b->cmp.symbol) {
             continue;
         } else if (a->cmp.symbol->width
@@ -2815,7 +2819,8 @@  expr_normalize_or(struct expr *expr)
                 }
                 free(new);
             } else {
-                expr_insert_andor(expr, next, new);
+                expr_insert_andor(expr, next ? &next->node : &expr->andor,
+                                  new);
             }
         } else {
             ovs_assert(sub->type == EXPR_T_CMP ||
diff --git a/lib/ovn-util.c b/lib/ovn-util.c
index d2ba43d66..ac63da5a2 100644
--- a/lib/ovn-util.c
+++ b/lib/ovn-util.c
@@ -747,7 +747,7 @@  ip_address_and_port_from_lb_key(const char *key, char **ip_address,
                                 uint16_t *port, int *addr_family)
 {
     struct sockaddr_storage ss;
-    if (!inet_parse_active(key, 0, &ss, false)) {
+    if (!inet_parse_active(key, 0, &ss, false, NULL)) {
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
         VLOG_WARN_RL(&rl, "bad ip address or port for load balancer key %s",
                      key);
diff --git a/ovs b/ovs
index 498cedc48..45ecaa9e5 160000
--- a/ovs
+++ b/ovs
@@ -1 +1 @@ 
-Subproject commit 498cedc483f3239c839c55b4d9f2261b61fb6ace
+Subproject commit 45ecaa9e574d63496e54a4093128302e2c2e10d0
diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index 05d5d68b7..910eeb2f5 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -2837,7 +2837,7 @@  nbctl_lb_add(struct ctl_context *ctx)
     }
 
     struct sockaddr_storage ss_vip;
-    if (!inet_parse_active(lb_vip, 0, &ss_vip, false)) {
+    if (!inet_parse_active(lb_vip, 0, &ss_vip, false, NULL)) {
         ctl_error(ctx, "%s: should be an IP address (or an IP address "
                   "and a port number with : as a separator).", lb_vip);
         return;
@@ -2867,7 +2867,7 @@  nbctl_lb_add(struct ctl_context *ctx)
         struct sockaddr_storage ss_dst;
 
         if (lb_vip_port) {
-            if (!inet_parse_active(token, -1, &ss_dst, false)) {
+            if (!inet_parse_active(token, -1, &ss_dst, false, NULL)) {
                 ctl_error(ctx, "%s: should be an IP address and a port "
                           "number with : as a separator.", token);
                 goto out;
@@ -3013,7 +3013,7 @@  lb_info_add_smap(const struct nbrec_load_balancer *lb,
             const struct smap_node *node = nodes[i];
 
             struct sockaddr_storage ss;
-            if (!inet_parse_active(node->key, 0, &ss, false)) {
+            if (!inet_parse_active(node->key, 0, &ss, false, NULL)) {
                 continue;
             }
 
diff --git a/utilities/ovn-trace.c b/utilities/ovn-trace.c
index b7460322e..4d3523616 100644
--- a/utilities/ovn-trace.c
+++ b/utilities/ovn-trace.c
@@ -214,7 +214,7 @@  static void
 parse_lb_option(const char *s)
 {
     struct sockaddr_storage ss;
-    if (!inet_parse_active(s, 0, &ss, false)) {
+    if (!inet_parse_active(s, 0, &ss, false, NULL)) {
         ovs_fatal(0, "%s: bad address", s);
     }
 
@@ -1388,7 +1388,8 @@  ovntrace_node_prune_summary(struct ovs_list *nodes)
             sub->type == OVNTRACE_NODE_TABLE) {
             /* Replace 'sub' by its children, if any, */
             ovs_list_remove(&sub->node);
-            ovs_list_splice(&next->node, sub->subs.next, &sub->subs);
+            ovs_list_splice(next ? &next->node : nodes, sub->subs.next,
+                            &sub->subs);
             ovntrace_node_destroy(sub);
         }
     }
@@ -1432,7 +1433,8 @@  ovntrace_node_prune_hard(struct ovs_list *nodes)
             sub->type == OVNTRACE_NODE_OUTPUT) {
             /* Replace 'sub' by its children, if any, */
             ovs_list_remove(&sub->node);
-            ovs_list_splice(&next->node, sub->subs.next, &sub->subs);
+            ovs_list_splice(next ? &next->node : nodes, sub->subs.next,
+                            &sub->subs);
             ovntrace_node_destroy(sub);
         }
     }