summaryrefslogtreecommitdiffstats
path: root/src/vnet/dpo/lookup_dpo.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/dpo/lookup_dpo.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/dpo/lookup_dpo.c')
-rw-r--r--src/vnet/dpo/lookup_dpo.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/vnet/dpo/lookup_dpo.c b/src/vnet/dpo/lookup_dpo.c
index 26363a2f0fa..af189eda44f 100644
--- a/src/vnet/dpo/lookup_dpo.c
+++ b/src/vnet/dpo/lookup_dpo.c
@@ -135,11 +135,15 @@ lookup_dpo_add_or_lock_w_fib_index (fib_node_index_t fib_index,
{
if (LOOKUP_UNICAST == cast)
{
- fib_table_lock(fib_index, dpo_proto_to_fib(proto));
+ fib_table_lock(fib_index,
+ dpo_proto_to_fib(proto),
+ FIB_SOURCE_RR);
}
else
{
- mfib_table_lock(fib_index, dpo_proto_to_fib(proto));
+ mfib_table_lock(fib_index,
+ dpo_proto_to_fib(proto),
+ MFIB_SOURCE_RR);
}
}
lookup_dpo_add_or_lock_i(fib_index, proto, cast, input, table_config, dpo);
@@ -161,13 +165,15 @@ lookup_dpo_add_or_lock_w_table_id (u32 table_id,
{
fib_index =
fib_table_find_or_create_and_lock(dpo_proto_to_fib(proto),
- table_id);
+ table_id,
+ FIB_SOURCE_RR);
}
else
{
fib_index =
mfib_table_find_or_create_and_lock(dpo_proto_to_fib(proto),
- table_id);
+ table_id,
+ MFIB_SOURCE_RR);
}
}
@@ -238,12 +244,14 @@ lookup_dpo_unlock (dpo_id_t *dpo)
if (LOOKUP_UNICAST == lkd->lkd_cast)
{
fib_table_unlock(lkd->lkd_fib_index,
- dpo_proto_to_fib(lkd->lkd_proto));
+ dpo_proto_to_fib(lkd->lkd_proto),
+ FIB_SOURCE_RR);
}
else
{
mfib_table_unlock(lkd->lkd_fib_index,
- dpo_proto_to_fib(lkd->lkd_proto));
+ dpo_proto_to_fib(lkd->lkd_proto),
+ MFIB_SOURCE_RR);
}
}
pool_put(lookup_dpo_pool, lkd);