aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sr
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/sr')
-rwxr-xr-xsrc/vnet/sr/sr_localsid.c8
-rwxr-xr-xsrc/vnet/sr/sr_policy_rewrite.c23
-rwxr-xr-xsrc/vnet/sr/sr_steering.c36
3 files changed, 32 insertions, 35 deletions
diff --git a/src/vnet/sr/sr_localsid.c b/src/vnet/sr/sr_localsid.c
index 6d72a506..32fc5f82 100755
--- a/src/vnet/sr/sr_localsid.c
+++ b/src/vnet/sr/sr_localsid.c
@@ -93,9 +93,9 @@ sr_cli_localsid (char is_del, ip6_address_t * localsid_addr,
}
};
- fib_table_entry_delete (fib_table_id_find_fib_index
- (FIB_PROTOCOL_IP6, fib_table), &pfx,
- FIB_SOURCE_SR);
+ fib_table_entry_delete (fib_table_find (FIB_PROTOCOL_IP6,
+ fib_table),
+ &pfx, FIB_SOURCE_SR);
/* In case it is a Xconnect iface remove the (OIF, NHOP) adj */
if (ls->behavior == SR_BEHAVIOR_X || ls->behavior == SR_BEHAVIOR_DX6
@@ -135,7 +135,7 @@ sr_cli_localsid (char is_del, ip6_address_t * localsid_addr,
pfx.fp_addr.as_u64[1] = localsid_addr->as_u64[1];
/* Lookup the FIB index associated to the table id provided */
- u32 fib_index = fib_table_id_find_fib_index (FIB_PROTOCOL_IP6, fib_table);
+ u32 fib_index = fib_table_find (FIB_PROTOCOL_IP6, fib_table);
if (fib_index == ~0)
return -3;
diff --git a/src/vnet/sr/sr_policy_rewrite.c b/src/vnet/sr/sr_policy_rewrite.c
index 61cf4437..c4024070 100755
--- a/src/vnet/sr/sr_policy_rewrite.c
+++ b/src/vnet/sr/sr_policy_rewrite.c
@@ -376,10 +376,9 @@ update_lb (ip6_sr_policy_t * sr_policy)
load_balance_create (0, DPO_PROTO_IP6, fhc));
/* Update FIB entry's to point to the LB DPO in the main FIB and hidden one */
- fib_table_entry_special_dpo_update (fib_table_id_find_fib_index
- (FIB_PROTOCOL_IP6,
- sr_policy->fib_table), &pfx,
- FIB_SOURCE_SR,
+ fib_table_entry_special_dpo_update (fib_table_find (FIB_PROTOCOL_IP6,
+ sr_policy->fib_table),
+ &pfx, FIB_SOURCE_SR,
FIB_ENTRY_FLAG_EXCLUSIVE,
&sr_policy->bsid_dpo);
@@ -470,10 +469,9 @@ update_replicate (ip6_sr_policy_t * sr_policy)
.ip6 = sr_policy->bsid,
}
};
- fib_table_entry_special_dpo_update (fib_table_id_find_fib_index
- (FIB_PROTOCOL_IP6,
- sr_policy->fib_table), &pfx,
- FIB_SOURCE_SR,
+ fib_table_entry_special_dpo_update (fib_table_find (FIB_PROTOCOL_IP6,
+ sr_policy->fib_table),
+ &pfx, FIB_SOURCE_SR,
FIB_ENTRY_FLAG_EXCLUSIVE,
&sr_policy->bsid_dpo);
@@ -568,9 +566,8 @@ sr_policy_add (ip6_address_t * bsid, ip6_address_t * segments,
};
/* Lookup the FIB index associated to the table selected */
- u32 fib_index = fib_table_id_find_fib_index (FIB_PROTOCOL_IP6,
- (fib_table !=
- (u32) ~ 0 ? fib_table : 0));
+ u32 fib_index = fib_table_find (FIB_PROTOCOL_IP6,
+ (fib_table != (u32) ~ 0 ? fib_table : 0));
if (fib_index == ~0)
return -13;
@@ -653,8 +650,8 @@ sr_policy_del (ip6_address_t * bsid, u32 index)
,
};
- fib_table_entry_special_remove (fib_table_id_find_fib_index
- (FIB_PROTOCOL_IP6, sr_policy->fib_table),
+ fib_table_entry_special_remove (fib_table_find (FIB_PROTOCOL_IP6,
+ sr_policy->fib_table),
&pfx, FIB_SOURCE_SR);
fib_table_entry_special_remove (sm->fib_table_ip6, &pfx, FIB_SOURCE_SR);
diff --git a/src/vnet/sr/sr_steering.c b/src/vnet/sr/sr_steering.c
index 5156b204..04646198 100755
--- a/src/vnet/sr/sr_steering.c
+++ b/src/vnet/sr/sr_steering.c
@@ -115,10 +115,10 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index,
pfx.fp_len = steer_pl->classify.l3.mask_width;
pfx.fp_addr.ip6 = steer_pl->classify.l3.prefix.ip6;
- fib_table_entry_delete (fib_table_id_find_fib_index
+ fib_table_entry_delete (fib_table_find
(FIB_PROTOCOL_IP6,
- steer_pl->classify.l3.fib_table), &pfx,
- FIB_SOURCE_SR);
+ steer_pl->classify.l3.fib_table),
+ &pfx, FIB_SOURCE_SR);
}
else if (steer_pl->classify.traffic_type == SR_STEER_IPV4)
{
@@ -127,7 +127,7 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index,
pfx.fp_len = steer_pl->classify.l3.mask_width;
pfx.fp_addr.ip4 = steer_pl->classify.l3.prefix.ip4;
- fib_table_entry_delete (fib_table_id_find_fib_index
+ fib_table_entry_delete (fib_table_find
(FIB_PROTOCOL_IP4,
steer_pl->classify.l3.fib_table), &pfx,
FIB_SOURCE_SR);
@@ -194,10 +194,10 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index,
pfx.fp_len = steer_pl->classify.l3.mask_width;
pfx.fp_addr.ip6 = steer_pl->classify.l3.prefix.ip6;
- fib_table_entry_delete (fib_table_id_find_fib_index
+ fib_table_entry_delete (fib_table_find
(FIB_PROTOCOL_IP6,
- steer_pl->classify.l3.fib_table), &pfx,
- FIB_SOURCE_SR);
+ steer_pl->classify.l3.fib_table),
+ &pfx, FIB_SOURCE_SR);
/* Create a new one */
goto update_fib;
@@ -209,10 +209,10 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index,
pfx.fp_len = steer_pl->classify.l3.mask_width;
pfx.fp_addr.ip4 = steer_pl->classify.l3.prefix.ip4;
- fib_table_entry_delete (fib_table_id_find_fib_index
+ fib_table_entry_delete (fib_table_find
(FIB_PROTOCOL_IP4,
- steer_pl->classify.l3.fib_table), &pfx,
- FIB_SOURCE_SR);
+ steer_pl->classify.l3.fib_table),
+ &pfx, FIB_SOURCE_SR);
/* Create a new one */
goto update_fib;
@@ -304,10 +304,10 @@ update_fib:
pfx.fp_len = steer_pl->classify.l3.mask_width;
pfx.fp_addr.ip6 = steer_pl->classify.l3.prefix.ip6;
- fib_table_entry_path_add (fib_table_id_find_fib_index (FIB_PROTOCOL_IP6,
- (table_id !=
- (u32) ~ 0 ?
- table_id : 0)),
+ fib_table_entry_path_add (fib_table_find (FIB_PROTOCOL_IP6,
+ (table_id !=
+ (u32) ~ 0 ?
+ table_id : 0)),
&pfx, FIB_SOURCE_SR,
FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT,
FIB_PROTOCOL_IP6,
@@ -321,10 +321,10 @@ update_fib:
pfx.fp_len = steer_pl->classify.l3.mask_width;
pfx.fp_addr.ip4 = steer_pl->classify.l3.prefix.ip4;
- fib_table_entry_path_add (fib_table_id_find_fib_index (FIB_PROTOCOL_IP4,
- (table_id !=
- (u32) ~ 0 ?
- table_id : 0)),
+ fib_table_entry_path_add (fib_table_find (FIB_PROTOCOL_IP4,
+ (table_id !=
+ (u32) ~ 0 ?
+ table_id : 0)),
&pfx, FIB_SOURCE_SR,
FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT,
FIB_PROTOCOL_IP6,