Oops, forgot to include the branch-22.03 in the title. This one should
be the one backported to 22.03 and 21.12.
Thanks,
Ales
On Thu, Jun 30, 2022 at 3:59 PM Ales Musil <[email protected]
<mailto:[email protected]>> wrote:
From: Adrian Moreno <[email protected] <mailto:[email protected]>>
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
<https://bugzilla.redhat.com/2102618>
Co-authored-by: Adrian Moreno <[email protected]
<mailto:[email protected]>>
Co-authored-by: Dumitru Ceara <[email protected]
<mailto:[email protected]>>
Co-authored-by: Mark Michelson <[email protected]
<mailto:[email protected]>>
Signed-off-by: Ales Musil <[email protected] <mailto:[email protected]>>
---
controller/ofctrl.c | 7 ++++++-
lib/actions.c | 2 +-
lib/expr.c | 31 ++++++++++++++++++-------------
lib/ovn-util.c | 2 +-
ovs | 2 +-
utilities/ovn-nbctl.c | 6 +++---
utilities/ovn-trace.c | 8 +++++---
7 files changed, 35 insertions(+), 23 deletions(-)
diff --git a/controller/ofctrl.c b/controller/ofctrl.c
index 19aa787f9..198f13983 100644
--- a/controller/ofctrl.c
+++ b/controller/ofctrl.c
@@ -924,7 +924,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 5d3caaf2b..2219c5b37 100644
--- a/lib/actions.c
+++ b/lib/actions.c
@@ -2336,7 +2336,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 47ef6108e..058390a16 100644
--- a/lib/expr.c
+++ b/lib/expr.c
@@ -211,16 +211,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);
+ 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);
}
}
@@ -2101,7 +2102,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;
@@ -2301,7 +2303,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);
@@ -2334,7 +2336,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);
@@ -2444,12 +2447,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);
@@ -2463,7 +2467,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) {
@@ -2559,7 +2563,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) {
@@ -2725,7 +2729,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) {
@@ -2886,8 +2891,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
@@ -2964,7 +2968,8 @@ expr_normalize_or(struct expr *expr)
}
expr_destroy(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 a22ae84fe..2f2f7ae39 100644
--- a/lib/ovn-util.c
+++ b/lib/ovn-util.c
@@ -735,7 +735,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 91e1ff5dd..45ecaa9e5 160000
--- a/ovs
+++ b/ovs
@@ -1 +1 @@
-Subproject commit 91e1ff5dde396fbcc8623ac0726066e970e6de15
+Subproject commit 45ecaa9e574d63496e54a4093128302e2c2e10d0
diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index adb08c6c9..2684870be 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -2847,7 +2847,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;
@@ -2877,7 +2877,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;
@@ -3023,7 +3023,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 ece5803f2..096d691d5 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);
}
}
--
2.35.3
--
Ales Musil
Senior Software Engineer - OVN Core
Red Hat EMEA <https://www.redhat.com>
[email protected] <mailto:[email protected]> IM: amusil
<https://red.ht/sig>