#include <vnet/bier/bier_fmask.h>
/**
- * Struct maintining the per-worker thread data for BIER lookups
+ * Struct maintaining the per-worker thread data for BIER lookups
*/
typedef struct bier_lookup_main_t_
{
};
/*
- * Keep these values sematically the same as BIER lookup
+ * Keep these values semantically the same as BIER lookup
*/
#define foreach_bier_lookup_next \
_(DROP, "bier-drop") \
vlib_node_registration_t bier_lookup_node;
/**
- * @brief Packet trace recoed for a BIER lookup
+ * @brief Packet trace record for a BIER lookup
*/
typedef struct bier_lookup_trace_t_
{
memcpy(bbs.bbs_buckets, bh0->bh_bit_string, bbs.bbs_len);
/*
- * reset the fmask and clone storage vectors
+ * reset the fmask storage vector
*/
vec_reset_length (blm->blm_fmasks[thread_index]);
- vec_reset_length (blm->blm_clones[thread_index]);
/*
* Loop through the buckets in the header
num_cloned = vlib_buffer_clone(vm, bi0,
blm->blm_clones[thread_index],
n_clones,
- n_bytes + 8);
+ VLIB_BUFFER_CLONE_HEAD_SIZE);
- if (num_cloned != vec_len(blm->blm_fmasks[thread_index]))
+ vec_set_len(blm->blm_clones[thread_index], num_cloned);
+
+ if (num_cloned != n_clones)
{
vlib_node_increment_counter
(vm, node->node_index,
{
bier_lookup_trace_t *tr;
- if (c0 != b0)
- vlib_buffer_copy_trace_flag (vm, b0, ci0);
-
tr = vlib_add_trace (vm, node, c0, sizeof (*tr));
tr->bt_index = bti0;
tr->bfm_index = blm->blm_fmasks[thread_index][clone];