aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_entry.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-09-10 04:39:11 -0700
committerDamjan Marion <dmarion.lists@gmail.com>2017-09-11 10:14:36 +0000
commit1500254bee11355bbd69cc1dd9705be4f002f2bd (patch)
treec403642105f399baccb3a727020232b5732fe8f7 /src/vnet/fib/fib_entry.c
parenta7191840beeb2c3a0f2598707ed1051a9f23c45f (diff)
FIB table add/delete API
part 2; - this adds the code to create an IP and MPLS table via the API. - but the enforcement that the table must be created before it is used is still missing, this is so that CSIT can pass. Change-Id: Id124d884ade6cb7da947225200e3bb193454c555 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_entry.c')
-rw-r--r--src/vnet/fib/fib_entry.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_entry.c b/src/vnet/fib/fib_entry.c
index 2027f2be8b9..4cb6cf6050c 100644
--- a/src/vnet/fib/fib_entry.c
+++ b/src/vnet/fib/fib_entry.c
@@ -90,6 +90,17 @@ fib_entry_get_default_chain_type (const fib_entry_t *fib_entry)
}
u8 *
+format_fib_source (u8 * s, va_list * args)
+{
+ fib_source_t source = va_arg (*args, int);
+
+ s = format (s, "\n src:%s ",
+ fib_source_names[source]);
+
+ return (s);
+}
+
+u8 *
format_fib_entry (u8 * s, va_list * args)
{
fib_forward_chain_type_t fct;
@@ -114,8 +125,8 @@ format_fib_entry (u8 * s, va_list * args)
FOR_EACH_SRC_ADDED(fib_entry, src, source,
({
- s = format (s, "\n src:%s ",
- fib_source_names[source]);
+ s = format (s, "\n src:%U ",
+ format_fib_source, source);
s = fib_entry_src_format(fib_entry, source, s);
s = format (s, " refs:%d ", src->fes_ref_count);
if (FIB_ENTRY_FLAG_NONE != src->fes_entry_flags) {