summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib
diff options
context:
space:
mode:
authorChristophe Fontaine <christophe.fontaine@enea.com>2017-10-02 18:10:54 +0200
committerChris Luke <chris_luke@comcast.com>2017-10-04 17:31:13 +0000
commitd3c008d108aa2187d1a2afe2833b4de25ca2c2ab (patch)
tree03c85d4348fc955b33e6a6d628b5f8b81a2c8af6 /src/vnet/fib
parent9bce0f6d7c3f7f1d5f2989ff1157c2a1039cdef6 (diff)
[aarch64] Fixes CLI crashes on dpaa2 platform.
- always use 'va_args' as pointer in all format_* functions - u32 for all 'indent' params as it's declaration was inconsistent Change-Id: Ic5799309a6b104c9b50fec309cba789c8da99e79 Signed-off-by: Christophe Fontaine <christophe.fontaine@enea.com>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r--src/vnet/fib/fib_table.c6
-rw-r--r--src/vnet/fib/fib_table.h2
-rw-r--r--src/vnet/fib/fib_test.c12
-rw-r--r--src/vnet/fib/fib_test.h4
-rw-r--r--src/vnet/fib/fib_types.c8
-rw-r--r--src/vnet/fib/fib_types.h4
-rw-r--r--src/vnet/fib/fib_urpf_list.c4
-rw-r--r--src/vnet/fib/fib_urpf_list.h2
-rw-r--r--src/vnet/fib/fib_walk.c12
-rw-r--r--src/vnet/fib/fib_walk.h2
10 files changed, 28 insertions, 28 deletions
diff --git a/src/vnet/fib/fib_table.c b/src/vnet/fib/fib_table.c
index 627e5cba9e1..6daa61c2612 100644
--- a/src/vnet/fib/fib_table.c
+++ b/src/vnet/fib/fib_table.c
@@ -1228,10 +1228,10 @@ fib_table_get_num_entries (u32 fib_index,
}
u8*
-format_fib_table_name (u8* s, va_list ap)
+format_fib_table_name (u8* s, va_list* ap)
{
- fib_node_index_t fib_index = va_arg(ap, fib_node_index_t);
- fib_protocol_t proto = va_arg(ap, int); // int promotion
+ fib_node_index_t fib_index = va_arg(*ap, fib_node_index_t);
+ fib_protocol_t proto = va_arg(*ap, int); // int promotion
fib_table_t *fib_table;
fib_table = fib_table_get(fib_index, proto);
diff --git a/src/vnet/fib/fib_table.h b/src/vnet/fib/fib_table.h
index 923d7afff9a..6c2640458b9 100644
--- a/src/vnet/fib/fib_table.h
+++ b/src/vnet/fib/fib_table.h
@@ -79,7 +79,7 @@ typedef struct fib_table_t_
* @brief
* Format the description/name of the table
*/
-extern u8* format_fib_table_name(u8* s, va_list ap);
+extern u8* format_fib_table_name(u8* s, va_list *ap);
/**
* @brief
diff --git a/src/vnet/fib/fib_test.c b/src/vnet/fib/fib_test.c
index 540289ce989..64d9047163b 100644
--- a/src/vnet/fib/fib_test.c
+++ b/src/vnet/fib/fib_test.c
@@ -353,7 +353,7 @@ typedef struct fib_test_rep_bucket_t_ {
int
fib_test_validate_rep_v (const replicate_t *rep,
u16 n_buckets,
- va_list ap)
+ va_list *ap)
{
const fib_test_rep_bucket_t *exp;
const dpo_id_t *dpo;
@@ -364,7 +364,7 @@ fib_test_validate_rep_v (const replicate_t *rep,
for (bucket = 0; bucket < n_buckets; bucket++)
{
- exp = va_arg(ap, fib_test_rep_bucket_t*);
+ exp = va_arg(*ap, fib_test_rep_bucket_t*);
dpo = replicate_get_bucket_i(rep, bucket);
@@ -429,7 +429,7 @@ fib_test_validate_rep_v (const replicate_t *rep,
int
fib_test_validate_lb_v (const load_balance_t *lb,
u16 n_buckets,
- va_list ap)
+ va_list *ap)
{
const dpo_id_t *dpo;
int bucket;
@@ -440,7 +440,7 @@ fib_test_validate_lb_v (const load_balance_t *lb,
{
const fib_test_lb_bucket_t *exp;
- exp = va_arg(ap, fib_test_lb_bucket_t*);
+ exp = va_arg(*ap, fib_test_lb_bucket_t*);
dpo = load_balance_get_bucket_i(lb, bucket);
switch (exp->type)
@@ -648,7 +648,7 @@ fib_test_validate_entry (fib_node_index_t fei,
const replicate_t *rep;
rep = replicate_get(dpo.dpoi_index);
- res = fib_test_validate_rep_v(rep, n_buckets, ap);
+ res = fib_test_validate_rep_v(rep, n_buckets, &ap);
}
else
{
@@ -659,7 +659,7 @@ fib_test_validate_entry (fib_node_index_t fei,
format_dpo_type, dpo.dpoi_type);
lb = load_balance_get(dpo.dpoi_index);
- res = fib_test_validate_lb_v(lb, n_buckets, ap);
+ res = fib_test_validate_lb_v(lb, n_buckets, &ap);
/*
* ensure that the LB contributed by the entry is the
diff --git a/src/vnet/fib/fib_test.h b/src/vnet/fib/fib_test.h
index b98680bf683..3692f57386d 100644
--- a/src/vnet/fib/fib_test.h
+++ b/src/vnet/fib/fib_test.h
@@ -97,11 +97,11 @@ typedef struct fib_test_rep_bucket_t_ {
extern int fib_test_validate_rep_v(const replicate_t *rep,
u16 n_buckets,
- va_list ap);
+ va_list *ap);
extern int fib_test_validate_lb_v(const load_balance_t *lb,
u16 n_buckets,
- va_list ap);
+ va_list *ap);
extern int fib_test_validate_entry(fib_node_index_t fei,
fib_forward_chain_type_t fct,
diff --git a/src/vnet/fib/fib_types.c b/src/vnet/fib/fib_types.c
index 8165f3eb313..d84642d29da 100644
--- a/src/vnet/fib/fib_types.c
+++ b/src/vnet/fib/fib_types.c
@@ -27,17 +27,17 @@ static const char* vnet_link_names[] = VNET_LINKS;
static const char* fib_forw_chain_names[] = FIB_FORW_CHAINS;
u8 *
-format_fib_protocol (u8 * s, va_list ap)
+format_fib_protocol (u8 * s, va_list * ap)
{
- fib_protocol_t proto = va_arg(ap, int); // fib_protocol_t promotion
+ fib_protocol_t proto = va_arg(*ap, int); // fib_protocol_t promotion
return (format (s, "%s", fib_protocol_names[proto]));
}
u8 *
-format_vnet_link (u8 * s, va_list ap)
+format_vnet_link (u8 * s, va_list * ap)
{
- vnet_link_t link = va_arg(ap, int); // vnet_link_t promotion
+ vnet_link_t link = va_arg(*ap, int); // vnet_link_t promotion
return (format (s, "%s", vnet_link_names[link]));
}
diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h
index f11a55da63f..b5d4ec95911 100644
--- a/src/vnet/fib/fib_types.h
+++ b/src/vnet/fib/fib_types.h
@@ -261,8 +261,8 @@ typedef enum fib_special_type_t_ {
for (_item = FIB_TYPE_SPEICAL_FIRST; \
_item <= FIB_SPEICAL_TYPE_LAST; _item++)
-extern u8 * format_fib_protocol(u8 * s, va_list ap);
-extern u8 * format_vnet_link(u8 *s, va_list ap);
+extern u8 * format_fib_protocol(u8 * s, va_list *ap);
+extern u8 * format_vnet_link(u8 *s, va_list *ap);
/**
* Path flags from the control plane
diff --git a/src/vnet/fib/fib_urpf_list.c b/src/vnet/fib/fib_urpf_list.c
index b484442026a..d5a406e6191 100644
--- a/src/vnet/fib/fib_urpf_list.c
+++ b/src/vnet/fib/fib_urpf_list.c
@@ -22,13 +22,13 @@
fib_urpf_list_t *fib_urpf_list_pool;
u8 *
-format_fib_urpf_list (u8 *s, va_list args)
+format_fib_urpf_list (u8 *s, va_list *args)
{
fib_urpf_list_t *urpf;
index_t ui;
u32 *swi;
- ui = va_arg(args, index_t);
+ ui = va_arg(*args, index_t);
if (INDEX_INVALID != ui)
{
diff --git a/src/vnet/fib/fib_urpf_list.h b/src/vnet/fib/fib_urpf_list.h
index 09f475747cf..a3116bb93ec 100644
--- a/src/vnet/fib/fib_urpf_list.h
+++ b/src/vnet/fib/fib_urpf_list.h
@@ -83,7 +83,7 @@ extern void fib_urpf_list_combine(index_t urpf1, index_t urpf2);
extern void fib_urpf_list_bake(index_t urpf);
-extern u8 *format_fib_urpf_list(u8 *s, va_list ap);
+extern u8 *format_fib_urpf_list(u8 *s, va_list *ap);
extern void fib_urpf_list_show_mem(void);
diff --git a/src/vnet/fib/fib_walk.c b/src/vnet/fib/fib_walk.c
index 94297442ca6..d0942401153 100644
--- a/src/vnet/fib/fib_walk.c
+++ b/src/vnet/fib/fib_walk.c
@@ -185,18 +185,18 @@ typedef struct fib_walk_history_t_ {
static fib_walk_history_t fib_walk_history[HISTORY_N_WALKS];
u8*
-format_fib_walk_priority (u8 *s, va_list ap)
+format_fib_walk_priority (u8 *s, va_list *ap)
{
- fib_walk_priority_t prio = va_arg(ap, fib_walk_priority_t);
+ fib_walk_priority_t prio = va_arg(*ap, fib_walk_priority_t);
ASSERT(prio < FIB_WALK_PRIORITY_NUM);
return (format(s, "%s", fib_walk_priority_names[prio]));
}
static u8*
-format_fib_walk_queue_stats (u8 *s, va_list ap)
+format_fib_walk_queue_stats (u8 *s, va_list *ap)
{
- fib_walk_queue_stats_t wqs = va_arg(ap, fib_walk_queue_stats_t);
+ fib_walk_queue_stats_t wqs = va_arg(*ap, fib_walk_queue_stats_t);
ASSERT(wqs < FIB_WALK_QUEUE_STATS_NUM);
@@ -927,9 +927,9 @@ fib_walk_module_init (void)
}
static u8*
-format_fib_walk (u8* s, va_list ap)
+format_fib_walk (u8* s, va_list *ap)
{
- fib_node_index_t fwi = va_arg(ap, fib_node_index_t);
+ fib_node_index_t fwi = va_arg(*ap, fib_node_index_t);
fib_walk_t *fwalk;
fwalk = fib_walk_get(fwi);
diff --git a/src/vnet/fib/fib_walk.h b/src/vnet/fib/fib_walk.h
index fdf2f10c196..503e705d065 100644
--- a/src/vnet/fib/fib_walk.h
+++ b/src/vnet/fib/fib_walk.h
@@ -52,7 +52,7 @@ extern void fib_walk_sync(fib_node_type_t parent_type,
fib_node_index_t parent_index,
fib_node_back_walk_ctx_t *ctx);
-extern u8* format_fib_walk_priority(u8 *s, va_list ap);
+extern u8* format_fib_walk_priority(u8 *s, va_list *ap);
extern void fib_walk_process_enable(void);
extern void fib_walk_process_disable(void);