aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/strategy_dpo_ctx.h
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/strategy_dpo_ctx.h')
-rw-r--r--hicn-plugin/src/strategy_dpo_ctx.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/hicn-plugin/src/strategy_dpo_ctx.h b/hicn-plugin/src/strategy_dpo_ctx.h
index 737071766..2a534c4dc 100644
--- a/hicn-plugin/src/strategy_dpo_ctx.h
+++ b/hicn-plugin/src/strategy_dpo_ctx.h
@@ -25,7 +25,7 @@
//FIB table for hicn. 0 is the default one used by ip
#define HICN_FIB_TABLE 0
-#define NEXT_HOP_INVALID DPO_INVALID
+#define NEXT_HOP_INVALID ~0
#define INIT_SEQ 0
@@ -41,8 +41,8 @@
typedef struct __attribute__ ((packed)) hicn_dpo_ctx_s
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
- /* 8B*5 = 40B */
- dpo_id_t next_hops[HICN_PARAM_FIB_ENTRY_NHOPS_MAX];
+ /* 4B*10 = 40B */
+ hicn_face_id_t next_hops[HICN_PARAM_FIB_ENTRY_NHOPS_MAX];
/* 40B + 4B = 44B */
u32 locks;
/* 44B + 1B = 45B */
@@ -55,7 +55,7 @@ typedef struct __attribute__ ((packed)) hicn_dpo_ctx_s
u16 padding; /* To align to 8B */
/* 48 + 4B = 52; last sequence number */
- seq_t seq;
+ u32 seq;
/* 48 + 1B = 53; last sequence number */
dpo_type_t dpo_type;
@@ -76,10 +76,10 @@ extern hicn_dpo_ctx_t *hicn_strategy_dpo_ctx_pool;
* @param dpo_type Type of dpo. It identifies the strategy.
*/
always_inline void
-init_dpo_ctx (hicn_dpo_ctx_t * dpo_ctx, const dpo_id_t * next_hop,
+init_dpo_ctx (hicn_dpo_ctx_t * dpo_ctx, const hicn_face_id_t * next_hop,
int nh_len, dpo_type_t dpo_type)
{
- dpo_id_t invalid = NEXT_HOP_INVALID;
+ hicn_face_id_t invalid = NEXT_HOP_INVALID;
dpo_ctx->entry_count = 0;
dpo_ctx->locks = 0;
@@ -91,7 +91,7 @@ init_dpo_ctx (hicn_dpo_ctx_t * dpo_ctx, const dpo_id_t * next_hop,
for (int i = 0; i < HICN_PARAM_FIB_ENTRY_NHOPS_MAX && i < nh_len; i++)
{
- clib_memcpy (&dpo_ctx->next_hops[i], &next_hop[i], sizeof (dpo_id_t));
+ dpo_ctx->next_hops[i] = next_hop[i];
dpo_ctx->entry_count++;
}
@@ -151,7 +151,7 @@ void hicn_strategy_dpo_ctx_unlock (dpo_id_t * dpo);
* otherwise HICN_ERROR_DPO_CTX_NOT_FOUND
*/
int
-hicn_strategy_dpo_ctx_add_nh (const dpo_id_t * nh, hicn_dpo_ctx_t * dpo_ctx,
+hicn_strategy_dpo_ctx_add_nh (hicn_face_id_t nh, hicn_dpo_ctx_t * dpo_ctx,
u8 * pos);
/**