|
|
7f7b2c |
From befea4cc873c25574a62ead84cc4413fcbf23619 Mon Sep 17 00:00:00 2001
|
|
|
7f7b2c |
From: Numan Siddique <numans@ovn.org>
|
|
|
7f7b2c |
Date: Tue, 15 Dec 2020 17:30:17 +0530
|
|
|
7f7b2c |
Subject: [PATCH 6/7] osx: Fix compilation error.
|
|
|
7f7b2c |
|
|
|
7f7b2c |
The commit "northd: Add ECMP support to router policies." introduced
|
|
|
7f7b2c |
compilaton error on osx platform. This patch fixes the issue.
|
|
|
7f7b2c |
|
|
|
7f7b2c |
The errors are:
|
|
|
7f7b2c |
|
|
|
7f7b2c |
----
|
|
|
7f7b2c |
northd/ovn-northd.c:7697:38: error: format specifies type 'unsigned short'
|
|
|
7f7b2c |
but the argument has type 'int' [-Werror,-Wformat]
|
|
|
7f7b2c |
ecmp_group_id, i + 1);
|
|
|
7f7b2c |
^~~~~
|
|
|
7f7b2c |
northd/ovn-northd.c:7713:44: error: format specifies type 'unsigned short'
|
|
|
7f7b2c |
but the argument has type 'int' [-Werror,-Wformat]
|
|
|
7f7b2c |
ds_put_format(&actions, "%"PRIu16, i + 1);
|
|
|
7f7b2c |
~~~~~~~~ ^~~~~
|
|
|
7f7b2c |
----
|
|
|
7f7b2c |
|
|
|
7f7b2c |
Fixes: 35b00c7e7990("northd: Add ECMP support to router policies.")
|
|
|
7f7b2c |
Suggested-by: Dumitru Ceara <dceara@redhat.com>
|
|
|
7f7b2c |
Acked-by: Dumitru Ceara <dceara@redhat.com>
|
|
|
7f7b2c |
Signed-off-by: Numan Siddique <numans@ovn.org>
|
|
|
7f7b2c |
---
|
|
|
7f7b2c |
northd/ovn-northd.c | 8 ++++----
|
|
|
7f7b2c |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
7f7b2c |
|
|
|
7f7b2c |
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
|
|
|
7f7b2c |
index dfd7d69d0..b377dffa1 100644
|
|
|
7f7b2c |
--- a/northd/ovn-northd.c
|
|
|
7f7b2c |
+++ b/northd/ovn-northd.c
|
|
|
7f7b2c |
@@ -7650,7 +7650,7 @@ build_ecmp_routing_policy_flows(struct hmap *lflows, struct ovn_datapath *od,
|
|
|
7f7b2c |
struct ds match = DS_EMPTY_INITIALIZER;
|
|
|
7f7b2c |
struct ds actions = DS_EMPTY_INITIALIZER;
|
|
|
7f7b2c |
|
|
|
7f7b2c |
- for (uint16_t i = 0; i < rule->n_nexthops; i++) {
|
|
|
7f7b2c |
+ for (size_t i = 0; i < rule->n_nexthops; i++) {
|
|
|
7f7b2c |
struct ovn_port *out_port = get_outport_for_routing_policy_nexthop(
|
|
|
7f7b2c |
od, ports, rule->priority, rule->nexthops[i]);
|
|
|
7f7b2c |
if (!out_port) {
|
|
|
7f7b2c |
@@ -7690,7 +7690,7 @@ build_ecmp_routing_policy_flows(struct hmap *lflows, struct ovn_datapath *od,
|
|
|
7f7b2c |
|
|
|
7f7b2c |
ds_clear(&match);
|
|
|
7f7b2c |
ds_put_format(&match, REG_ECMP_GROUP_ID" == %"PRIu16" && "
|
|
|
7f7b2c |
- REG_ECMP_MEMBER_ID" == %"PRIu16,
|
|
|
7f7b2c |
+ REG_ECMP_MEMBER_ID" == %"PRIuSIZE,
|
|
|
7f7b2c |
ecmp_group_id, i + 1);
|
|
|
7f7b2c |
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_POLICY_ECMP,
|
|
|
7f7b2c |
100, ds_cstr(&match),
|
|
|
7f7b2c |
@@ -7702,12 +7702,12 @@ build_ecmp_routing_policy_flows(struct hmap *lflows, struct ovn_datapath *od,
|
|
|
7f7b2c |
"; %s = select(", REG_ECMP_GROUP_ID, ecmp_group_id,
|
|
|
7f7b2c |
REG_ECMP_MEMBER_ID);
|
|
|
7f7b2c |
|
|
|
7f7b2c |
- for (uint16_t i = 0; i < rule->n_nexthops; i++) {
|
|
|
7f7b2c |
+ for (size_t i = 0; i < rule->n_nexthops; i++) {
|
|
|
7f7b2c |
if (i > 0) {
|
|
|
7f7b2c |
ds_put_cstr(&actions, ", ");
|
|
|
7f7b2c |
}
|
|
|
7f7b2c |
|
|
|
7f7b2c |
- ds_put_format(&actions, "%"PRIu16, i + 1);
|
|
|
7f7b2c |
+ ds_put_format(&actions, "%"PRIuSIZE, i + 1);
|
|
|
7f7b2c |
}
|
|
|
7f7b2c |
ds_put_cstr(&actions, ");");
|
|
|
7f7b2c |
ovn_lflow_add_with_hint(lflows, od, S_ROUTER_IN_POLICY,
|
|
|
7f7b2c |
--
|
|
|
7f7b2c |
2.28.0
|
|
|
7f7b2c |
|