aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/strategy.c
diff options
context:
space:
mode:
authorLuca Muscariello <lumuscar+fdio@cisco.com>2019-02-21 08:43:48 +0000
committerGerrit Code Review <gerrit@fd.io>2019-02-21 08:43:48 +0000
commit0d0e74ffb9207cb56fcf4d5b034906a406c1bffa (patch)
treecb8ebc20768dd371800613e4797b02383f691b5b /hicn-plugin/src/strategy.c
parent7734174f81412b1544243d1d358ee2641dcdb3dd (diff)
parent1c5106f66a6749266cb1d228eda98413c80cbf1f (diff)
Merge "[HICN-71] - Handling the case in which a pushed data hit an existing pit entry (created after the data has gone through the data_pcslookup_node). In this case the data packet is forwarded to the data_fwd_node - Handling the case in which the hash table (in pcs) is full and it is not possible to allocate another bucket. In this case the packet is dropped. - Copying packets whose length is less than 128B. VPP prevents to create a chain of vlib_buffer where the first, or middle, vlib_buffer are holding less then 128B."
Diffstat (limited to 'hicn-plugin/src/strategy.c')
-rw-r--r--hicn-plugin/src/strategy.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hicn-plugin/src/strategy.c b/hicn-plugin/src/strategy.c
index 247de9d07..747e155b1 100644
--- a/hicn-plugin/src/strategy.c
+++ b/hicn-plugin/src/strategy.c
@@ -118,7 +118,9 @@ hicn_new_interest (hicn_strategy_runtime_t * rt, vlib_buffer_t * b0,
hicn_store_internal_state (b0, hicnb0->name_hash, node_id0,
dpo_ctx_id0, vft_id0, hash_entry_id,
bucket_id, bucket_is_overflow);
- *next = HICN_STRATEGY_NEXT_INTEREST_HITPIT;
+ *next =
+ is_cs0 ? HICN_STRATEGY_NEXT_INTEREST_HITCS :
+ HICN_STRATEGY_NEXT_INTEREST_HITPIT;
}
else
{
@@ -199,7 +201,6 @@ hicn_forward_interest_fn (vlib_main_t * vm,
next0 = HICN_STRATEGY_NEXT_ERROR_DROP;
ret = hicn_interest_parse_pkt (b0, &name, &namelen, &hicn0, &isv6);
-
stats.pkts_processed++;
/* Select next hop */
/*
@@ -209,9 +210,8 @@ hicn_forward_interest_fn (vlib_main_t * vm,
*/
if (PREDICT_TRUE
(ret == HICN_ERROR_NONE && HICN_IS_NAMEHASH_CACHED (b0)
- && strategy->hicn_select_next_hop (vnet_buffer (b0)->
- ip.adj_index[VLIB_TX],
- &nh_idx,
+ && strategy->hicn_select_next_hop (vnet_buffer (b0)->ip.
+ adj_index[VLIB_TX], &nh_idx,
&outface) ==
HICN_ERROR_NONE))
{