summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/strategy_dpo_manager.c
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-03-09 11:39:59 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2020-03-19 08:29:33 +0000
commite6a120973cca65ca464d1323a6f7f4308dcb4717 (patch)
treebf3461cc235f7561069bb28f7b05d184ebc9d496 /hicn-plugin/src/strategy_dpo_manager.c
parent24841120071b95f1a05167898b33091576ba15b8 (diff)
[HICN-547] Removing punting through acl for interests
Change-Id: I71767f732ec6ede1efc66e5a99f09c3207367dcb Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/strategy_dpo_manager.c')
-rw-r--r--hicn-plugin/src/strategy_dpo_manager.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/hicn-plugin/src/strategy_dpo_manager.c b/hicn-plugin/src/strategy_dpo_manager.c
index 470d8d185..f8d41a372 100644
--- a/hicn-plugin/src/strategy_dpo_manager.c
+++ b/hicn-plugin/src/strategy_dpo_manager.c
@@ -16,6 +16,7 @@
#include <vnet/dpo/dpo.h>
#include "strategy_dpo_manager.h"
+#include "strategy_dpo_ctx.h"
#include "strategies/dpo_mw.h"
#include "strategies/dpo_rr.h"
#include "strategy.h"
@@ -94,19 +95,17 @@ hicn_dpo_get_strategy_vft_from_id (u8 vfts_id)
void
hicn_dpos_init (void)
{
+ hicn_strategy_init_dpo_ctx_pool ();
hicn_dpo_strategy_mw_module_init ();
hicn_dpo_strategy_rr_module_init ();
- default_dpo.hicn_dpo_get_ctx = &hicn_strategy_mw_ctx_get;
default_dpo.hicn_dpo_is_type = &hicn_dpo_is_type_strategy_mw;
default_dpo.hicn_dpo_get_type = &hicn_dpo_strategy_mw_get_type;
default_dpo.hicn_dpo_module_init = &hicn_dpo_strategy_mw_module_init;
default_dpo.hicn_dpo_create = &hicn_strategy_mw_ctx_create;
default_dpo.hicn_dpo_add_update_nh = &hicn_strategy_mw_ctx_add_nh;
default_dpo.hicn_dpo_del_nh = &hicn_strategy_mw_ctx_del_nh;
- default_dpo.hicn_dpo_lock_dpo_ctx = &hicn_strategy_mw_ctx_lock;
- default_dpo.hicn_dpo_unlock_dpo_ctx = hicn_strategy_mw_ctx_unlock;
- default_dpo.format_hicn_dpo = &format_hicn_strategy_mw_ctx;
+ default_dpo.hicn_dpo_format = &hicn_strategy_mw_format_ctx;
}
u8 *
@@ -117,13 +116,13 @@ format_hicn_strategy_list (u8 * s, int n, ...)
u32 indent = va_arg (ap, u32);
va_end (ap);
- s = format (s, "Strategies:\n", indent);
+ s = format (s, "%U Strategies:\n", format_white_space, indent);
indent += 4;
int i;
vec_foreach_index (i, strategies_id)
{
- s = format (s, "(%d) ", i, indent);
- s = hicn_dpo_vfts[strategies_id[i]]->format_hicn_dpo (s, &ap);
+ s = format (s, "%U (%d) ", format_white_space, indent, i);
+ s = hicn_strategy_vfts[strategies_id[i]]->hicn_format_strategy (s, &ap);
}
return (s);