diff options
author | 2019-02-21 08:43:48 +0000 | |
---|---|---|
committer | 2019-02-21 08:43:48 +0000 | |
commit | 0d0e74ffb9207cb56fcf4d5b034906a406c1bffa (patch) | |
tree | cb8ebc20768dd371800613e4797b02383f691b5b /hicn-plugin/src/interest_hitcs_node.c | |
parent | 7734174f81412b1544243d1d358ee2641dcdb3dd (diff) | |
parent | 1c5106f66a6749266cb1d228eda98413c80cbf1f (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/interest_hitcs_node.c')
-rw-r--r-- | hicn-plugin/src/interest_hitcs_node.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/hicn-plugin/src/interest_hitcs_node.c b/hicn-plugin/src/interest_hitcs_node.c index 1d2255fcd..97879b328 100644 --- a/hicn-plugin/src/interest_hitcs_node.c +++ b/hicn-plugin/src/interest_hitcs_node.c @@ -45,17 +45,15 @@ clone_from_cs (vlib_main_t * vm, u32 * bi0_cs, vlib_buffer_t * dest, u8 isv6) /* Retrieve the buffer to clone */ vlib_buffer_t *cs_buf = vlib_get_buffer (vm, *bi0_cs); hicn_buffer_t *hicnb = hicn_get_buffer (cs_buf); - u16 buffer_advance = isv6 ? sizeof (ip6_header_t) + sizeof (tcp_header_t) : - sizeof (ip4_header_t) + sizeof (tcp_header_t); - + word buffer_advance = CLIB_CACHE_LINE_BYTES * 2; if (hicnb->flags & HICN_BUFFER_FLAGS_PKT_LESS_TWO_CL) { clib_memcpy_fast (vlib_buffer_get_current (dest), vlib_buffer_get_current (cs_buf), - cs_buf->current_length); + dest->current_length); clib_memcpy_fast (dest->opaque2, cs_buf->opaque2, sizeof (cs_buf->opaque2)); - dest->current_data = cs_buf->current_data; + dest->current_length = cs_buf->current_length; dest->total_length_not_including_first_buffer = 0; } @@ -71,18 +69,16 @@ clone_from_cs (vlib_main_t * vm, u32 * bi0_cs, vlib_buffer_t * dest, u8 isv6) cs_buf = cs_buf2; } - clib_memcpy (vlib_buffer_get_current (dest), - vlib_buffer_get_current (cs_buf), buffer_advance); + clib_memcpy_fast (vlib_buffer_get_current (dest), + vlib_buffer_get_current (cs_buf), buffer_advance); + clib_memcpy_fast (dest->opaque2, cs_buf->opaque2, + sizeof (cs_buf->opaque2)); dest->current_length = buffer_advance; vlib_buffer_advance (cs_buf, buffer_advance); vlib_buffer_attach_clone (vm, dest, cs_buf); } } -/* - * ICN forwarder node for interests: handling of Interests delivered based on - * ACL. - 1 packet at a time - ipv4/tcp ipv6/tcp - */ static uword hicn_interest_hitcs_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) @@ -190,8 +186,6 @@ hicn_interest_hitcs_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, * Retrieve the incoming iface and forward * the data through it */ - ASSERT (hicnb0->face_dpo_id.dpoi_index < - HICN_PARAM_PIT_ENTRY_PHOPS_MAX); next0 = hicnb0->face_dpo_id.dpoi_next_node; vnet_buffer (b0)->ip.adj_index[VLIB_TX] = hicnb0->face_dpo_id.dpoi_index; |