Fix Compile errors from clang in FIB2.0 code
Change-Id: Ief769c966888094944b7a6b7f26527e7eff6103f
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/vnet/vnet/adj/adj_internal.h b/vnet/vnet/adj/adj_internal.h
index 8c96659..e3e0e04 100644
--- a/vnet/vnet/adj/adj_internal.h
+++ b/vnet/vnet/adj/adj_internal.h
@@ -86,7 +86,7 @@
}
extern void adj_nbr_update_rewrite_internal (ip_adjacency_t *adj,
- adj_nbr_rewrite_flag_t flags,
+ ip_lookup_next_t adj_next_index,
u32 complete_next_index,
u32 next_index,
u8 *rewrite);
diff --git a/vnet/vnet/adj/adj_midchain.c b/vnet/vnet/adj/adj_midchain.c
index 8786657..d40ea79 100644
--- a/vnet/vnet/adj/adj_midchain.c
+++ b/vnet/vnet/adj/adj_midchain.c
@@ -456,7 +456,7 @@
* time for walkies fido.
*/
fib_node_back_walk_ctx_t bw_ctx = {
- .fnbw_reason = FIB_NODE_BW_REASON_ADJ_UPDATE,
+ .fnbw_reason = FIB_NODE_BW_REASON_FLAG_ADJ_UPDATE,
};
fib_walk_sync(FIB_NODE_TYPE_ADJ, adj_get_index(adj), &bw_ctx);
diff --git a/vnet/vnet/dpo/dpo.h b/vnet/vnet/dpo/dpo.h
index 9065f88..78b657d 100644
--- a/vnet/vnet/dpo/dpo.h
+++ b/vnet/vnet/dpo/dpo.h
@@ -69,8 +69,8 @@
DPO_PROTO_MPLS,
} __attribute__((packed)) dpo_proto_t;
-#define DPO_PROTO_NUM (DPO_PROTO_MPLS+1)
-#define DPO_PROTO_NONE (DPO_PROTO_NUM+1)
+#define DPO_PROTO_NUM ((dpo_proto_t)(DPO_PROTO_MPLS+1))
+#define DPO_PROTO_NONE ((dpo_proto_t)(DPO_PROTO_NUM+1))
#define DPO_PROTOS { \
[DPO_PROTO_IP4] = "ip4", \
diff --git a/vnet/vnet/dpo/lookup_dpo.c b/vnet/vnet/dpo/lookup_dpo.c
index b13000d..e504366 100644
--- a/vnet/vnet/dpo/lookup_dpo.c
+++ b/vnet/vnet/dpo/lookup_dpo.c
@@ -379,8 +379,9 @@
}
/* do lookup */
- ip4_src_fib_lookup_one (fib_index0, input_addr0, &lbi0);
- ip4_src_fib_lookup_one (fib_index1, input_addr1, &lbi1);
+ ip4_src_fib_lookup_two (fib_index0, fib_index1,
+ input_addr0, input_addr1,
+ &lbi0, &lbi1);
lb0 = load_balance_get(lbi0);
lb1 = load_balance_get(lbi1);
diff --git a/vnet/vnet/fib/fib_entry_src_default_route.c b/vnet/vnet/fib/fib_entry_src_default_route.c
index 8615f72..9f4e7c3 100644
--- a/vnet/vnet/fib/fib_entry_src_default_route.c
+++ b/vnet/vnet/fib/fib_entry_src_default_route.c
@@ -22,7 +22,7 @@
static void
fib_entry_src_default_route_init (fib_entry_src_t *src)
{
- src->fes_flags = FIB_ENTRY_FLAG_NONE;
+ src->fes_flags = FIB_ENTRY_SRC_FLAG_NONE;
}
static void
diff --git a/vnet/vnet/fib/fib_entry_src_mpls.c b/vnet/vnet/fib/fib_entry_src_mpls.c
index 4c316f7..14c7310 100644
--- a/vnet/vnet/fib/fib_entry_src_mpls.c
+++ b/vnet/vnet/fib/fib_entry_src_mpls.c
@@ -29,7 +29,7 @@
{
mpls_eos_bit_t eos;
- src->fes_flags = FIB_ENTRY_FLAG_NONE;
+ src->fes_flags = FIB_ENTRY_SRC_FLAG_NONE;
src->mpls.fesm_label = MPLS_LABEL_INVALID;
FOR_EACH_MPLS_EOS_BIT(eos)
diff --git a/vnet/vnet/fib/fib_entry_src_special.c b/vnet/vnet/fib/fib_entry_src_special.c
index f73e280..52a6134 100644
--- a/vnet/vnet/fib/fib_entry_src_special.c
+++ b/vnet/vnet/fib/fib_entry_src_special.c
@@ -22,7 +22,7 @@
static void
fib_entry_src_special_init (fib_entry_src_t *src)
{
- src->fes_flags = FIB_ENTRY_FLAG_NONE;
+ src->fes_flags = FIB_ENTRY_SRC_FLAG_NONE;
}
/**
diff --git a/vnet/vnet/fib/fib_path.c b/vnet/vnet/fib/fib_path.c
index e92e233..7f5aac7 100644
--- a/vnet/vnet/fib/fib_path.c
+++ b/vnet/vnet/fib/fib_path.c
@@ -885,7 +885,7 @@
static fib_path_cfg_flags_t
fib_path_route_flags_to_cfg_flags (const fib_route_path_t *rpath)
{
- fib_path_cfg_flags_t cfg_flags = FIB_PATH_CFG_ATTRIBUTE_FIRST;
+ fib_path_cfg_flags_t cfg_flags = FIB_PATH_CFG_FLAG_NONE;
if (rpath->frp_flags & FIB_ROUTE_PATH_RESOLVE_VIA_HOST)
cfg_flags |= FIB_PATH_CFG_FLAG_RESOLVE_HOST;
diff --git a/vnet/vnet/fib/fib_test.c b/vnet/vnet/fib/fib_test.c
index 78b9ec4..358e912 100644
--- a/vnet/vnet/fib/fib_test.c
+++ b/vnet/vnet/fib/fib_test.c
@@ -962,7 +962,7 @@
/*
* update the exclusive to use a different DPO
*/
- ip_null_dpo_add_and_lock(FIB_PROTOCOL_IP4,
+ ip_null_dpo_add_and_lock(DPO_PROTO_IP4,
IP_NULL_ACTION_SEND_ICMP_UNREACH,
&ex_dpo);
fib_table_entry_special_dpo_update(fib_index,
@@ -6115,7 +6115,7 @@
/*
* enqueue a walk across the parents children.
*/
- high_ctx.fnbw_reason = FIB_NODE_BW_REASON_RESOLVE;
+ high_ctx.fnbw_reason = FIB_NODE_BW_REASON_FLAG_RESOLVE;
fib_walk_async(FIB_NODE_TYPE_TEST, PARENT_INDEX,
FIB_WALK_PRIORITY_HIGH, &high_ctx);
@@ -6245,7 +6245,7 @@
* we do this by giving the queue draining process zero
* time quanta. it's a do..while loop, so it does something.
*/
- high_ctx.fnbw_reason = FIB_NODE_BW_REASON_RESOLVE;
+ high_ctx.fnbw_reason = FIB_NODE_BW_REASON_FLAG_RESOLVE;
fib_walk_async(FIB_NODE_TYPE_TEST, PARENT_INDEX,
FIB_WALK_PRIORITY_HIGH, &high_ctx);
@@ -6332,7 +6332,7 @@
* park a async walk in the middle of the list, then have an sync walk catch
* it. same expectations as async catches async.
*/
- high_ctx.fnbw_reason = FIB_NODE_BW_REASON_RESOLVE;
+ high_ctx.fnbw_reason = FIB_NODE_BW_REASON_FLAG_RESOLVE;
fib_walk_async(FIB_NODE_TYPE_TEST, PARENT_INDEX,
FIB_WALK_PRIORITY_HIGH, &high_ctx);
diff --git a/vnet/vnet/fib/fib_types.c b/vnet/vnet/fib/fib_types.c
index f559ee5..383d48e 100644
--- a/vnet/vnet/fib/fib_types.c
+++ b/vnet/vnet/fib/fib_types.c
@@ -329,5 +329,5 @@
case FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS:
return (DPO_PROTO_MPLS);
}
- return (VNET_LINK_IP4);
+ return (DPO_PROTO_IP4);
}
diff --git a/vnet/vnet/fib/fib_walk.c b/vnet/vnet/fib/fib_walk.c
index 078a651..83f09e3 100644
--- a/vnet/vnet/fib/fib_walk.c
+++ b/vnet/vnet/fib/fib_walk.c
@@ -108,7 +108,7 @@
FIB_WALK_SCHEDULED,
FIB_WALK_COMPLETED,
} fib_walk_queue_stats_t;
-#define FIB_WALK_QUEUE_STATS_NUM (FIB_WALK_COMPLETED+1)
+#define FIB_WALK_QUEUE_STATS_NUM ((fib_walk_queue_stats_t)(FIB_WALK_COMPLETED+1))
#define FIB_WALK_QUEUE_STATS { \
[FIB_WALK_SCHEDULED] = "scheduled", \
diff --git a/vnet/vnet/fib/fib_walk.h b/vnet/vnet/fib/fib_walk.h
index 7ae99d0..7413d8a 100644
--- a/vnet/vnet/fib/fib_walk.h
+++ b/vnet/vnet/fib/fib_walk.h
@@ -29,7 +29,7 @@
FIB_WALK_PRIORITY_LOW = 1,
} fib_walk_priority_t;
-#define FIB_WALK_PRIORITY_NUM (FIB_WALK_PRIORITY_LOW+1)
+#define FIB_WALK_PRIORITY_NUM ((fib_walk_priority_t)(FIB_WALK_PRIORITY_LOW+1))
#define FIB_WALK_PRIORITIES { \
[FIB_WALK_PRIORITY_HIGH] = "high", \
diff --git a/vnet/vnet/lisp-gpe/interface.c b/vnet/vnet/lisp-gpe/interface.c
index 15d203c..b293e2d 100644
--- a/vnet/vnet/lisp-gpe/interface.c
+++ b/vnet/vnet/lisp-gpe/interface.c
@@ -194,7 +194,6 @@
VNET_HW_INTERFACE_CLASS (lisp_gpe_hw_class) = {
.name = "LISP_GPE",
.format_header = format_lisp_gpe_header_with_length,
- .build_rewrite = default_build_rewrite,
.build_rewrite = lisp_gpe_build_rewrite,
.update_adjacency = lisp_gpe_update_adjacency,
};
diff --git a/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index 54ee86d..c7aafc6 100644
--- a/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/vnet/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -267,7 +267,7 @@
dpo_proto_t dproto;
dproto = (ip_prefix_version (&lfe->key->rmt.ippref) == IP4 ?
- FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6);
+ DPO_PROTO_IP4 : DPO_PROTO_IP6);
lfe->src_fib_index = ip_dst_fib_add_route (lfe->eid_fib_index,
&lfe->key->rmt.ippref);
diff --git a/vnet/vnet/mpls/mpls_output.c b/vnet/vnet/mpls/mpls_output.c
index 739e85d..91514d6 100644
--- a/vnet/vnet/mpls/mpls_output.c
+++ b/vnet/vnet/mpls/mpls_output.c
@@ -342,8 +342,6 @@
foreach_mpls_adj_incomplete_next
#undef _
},
-
- .format_trace = format_mpls_output_trace,
};
VLIB_NODE_FUNCTION_MULTIARCH (mpls_adj_incomplete_node,