diff options
author | Mauro Sardara <msardara@cisco.com> | 2021-07-20 13:20:35 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2021-07-20 13:29:03 +0200 |
commit | b4353c871463c06ed47db1ed9c3106f9dd201838 (patch) | |
tree | dd8e670e597a4e10bf214adf926ade5f135ce52c /hicn-plugin/src/strategy_dpo_ctx.c | |
parent | f62e74657d802555db61345eaa46362b09b12e88 (diff) |
HICN-716 Upgrade to VPP 21.06
Also:
- Format hicn-plugin code
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Change-Id: I0f4626fdeaf0fc5ae1f43904ca006b092e3e9d5f
Diffstat (limited to 'hicn-plugin/src/strategy_dpo_ctx.c')
-rw-r--r-- | hicn-plugin/src/strategy_dpo_ctx.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/hicn-plugin/src/strategy_dpo_ctx.c b/hicn-plugin/src/strategy_dpo_ctx.c index 342c78bb5..edfe75aa8 100644 --- a/hicn-plugin/src/strategy_dpo_ctx.c +++ b/hicn-plugin/src/strategy_dpo_ctx.c @@ -22,11 +22,10 @@ void hicn_strategy_init_dpo_ctx_pool () { pool_init_fixed (hicn_strategy_dpo_ctx_pool, 256); - } void -hicn_strategy_dpo_ctx_lock (dpo_id_t * dpo) +hicn_strategy_dpo_ctx_lock (dpo_id_t *dpo) { hicn_dpo_ctx_t *dpo_ctx = hicn_strategy_dpo_ctx_get (dpo->dpoi_index); @@ -37,7 +36,7 @@ hicn_strategy_dpo_ctx_lock (dpo_id_t * dpo) } void -hicn_strategy_dpo_ctx_unlock (dpo_id_t * dpo) +hicn_strategy_dpo_ctx_unlock (dpo_id_t *dpo) { hicn_dpo_ctx_t *hicn_strategy_dpo_ctx = (hicn_dpo_ctx_t *) hicn_strategy_dpo_ctx_get (dpo->dpoi_index); @@ -54,7 +53,7 @@ hicn_strategy_dpo_ctx_unlock (dpo_id_t * dpo) } u8 * -hicn_strategy_dpo_format_ctx (u8 * s, va_list * ap) +hicn_strategy_dpo_format_ctx (u8 *s, va_list *ap) { index_t index = va_arg (*ap, index_t); hicn_dpo_ctx_t *dpo = NULL; @@ -70,7 +69,7 @@ hicn_strategy_dpo_format_ctx (u8 * s, va_list * ap) } index_t -hicn_strategy_dpo_ctx_get_index (hicn_dpo_ctx_t * cd) +hicn_strategy_dpo_ctx_get_index (hicn_dpo_ctx_t *cd) { return (cd - hicn_strategy_dpo_ctx_pool); } @@ -97,20 +96,20 @@ hicn_strategy_dpo_ctx_alloc () } int -hicn_strategy_dpo_ctx_add_nh (hicn_face_id_t nh, hicn_dpo_ctx_t * dpo_ctx, - u8 * pos) +hicn_strategy_dpo_ctx_add_nh (hicn_face_id_t nh, hicn_dpo_ctx_t *dpo_ctx, + u8 *pos) { int empty = dpo_ctx->entry_count; - /* Iterate through the list of faces to find if the face is already a next hop */ + /* Iterate through the list of faces to find if the face is already a next + * hop */ for (int i = 0; i < dpo_ctx->entry_count; i++) { if (nh == dpo_ctx->next_hops[i]) { /* If face is marked as deleted, ignore it */ - hicn_face_t *face = - hicn_dpoi_get_from_idx (dpo_ctx->next_hops[i]); + hicn_face_t *face = hicn_dpoi_get_from_idx (dpo_ctx->next_hops[i]); if (face->flags & HICN_FACE_FLAGS_DELETED) { continue; @@ -134,8 +133,7 @@ hicn_strategy_dpo_ctx_add_nh (hicn_face_id_t nh, hicn_dpo_ctx_t * dpo_ctx, } int -hicn_strategy_dpo_ctx_del_nh (hicn_face_id_t face_id, - hicn_dpo_ctx_t * dpo_ctx) +hicn_strategy_dpo_ctx_del_nh (hicn_face_id_t face_id, hicn_dpo_ctx_t *dpo_ctx) { int ret = HICN_ERROR_DPO_CTX_NOT_FOUND; hicn_face_id_t invalid = NEXT_HOP_INVALID; @@ -154,7 +152,6 @@ hicn_strategy_dpo_ctx_del_nh (hicn_face_id_t face_id, } return ret; - } /* |