* mac0 and bd_index0 are the keys. The entry is written to result0.
* If the entry was not found, result0 is set to ~0.
*
- * key0 and bucket0 return with the computed key and hash bucket,
- * convenient if the entry needs to be updated afterward.
- * If the cached_result was used, bucket0 is set to ~0.
+ * key0 return with the computed key, convenient if the entry needs,
+ * to be updated afterward.
*/
static_always_inline void
l2fib_entry_result_t * cached_result,
u8 * mac0,
u16 bd_index0,
- l2fib_entry_key_t * key0,
- u32 * bucket0, l2fib_entry_result_t * result0)
+ l2fib_entry_key_t * key0, l2fib_entry_result_t * result0)
{
/* set up key */
key0->raw = l2fib_make_key (mac0, bd_index0);
- *bucket0 = ~0;
if (key0->raw == cached_key->raw)
{
u16 bd_index1,
l2fib_entry_key_t * key0,
l2fib_entry_key_t * key1,
- u32 * bucket0,
- u32 * bucket1,
l2fib_entry_result_t * result0,
l2fib_entry_result_t * result1)
{
/* Both hit in the one-entry cache */
result0->raw = cached_result->raw;
result1->raw = cached_result->raw;
- *bucket0 = ~0;
- *bucket1 = ~0;
-
}
else
{
l2fib_entry_key_t * key1,
l2fib_entry_key_t * key2,
l2fib_entry_key_t * key3,
- u32 * bucket0,
- u32 * bucket1,
- u32 * bucket2,
- u32 * bucket3,
l2fib_entry_result_t * result0,
l2fib_entry_result_t * result1,
l2fib_entry_result_t * result2,
result1->raw = cached_result->raw;
result2->raw = cached_result->raw;
result3->raw = cached_result->raw;
- *bucket0 = ~0;
- *bucket1 = ~0;
- *bucket2 = ~0;
- *bucket3 = ~0;
-
}
else
{
const ethernet_header_t *h0, *h1, *h2, *h3;
l2fib_entry_key_t key0, key1, key2, key3;
l2fib_entry_result_t result0, result1, result2, result3;
- u32 bucket0, bucket1, bucket2, bucket3;
/* Prefetch next iteration. */
{
&key1, /* not used */
&key2, /* not used */
&key3, /* not used */
- &bucket0, /* not used */
- &bucket1, /* not used */
- &bucket2, /* not used */
- &bucket3, /* not used */
&result0,
&result1,
&result2,
ethernet_header_t *h0;
l2fib_entry_key_t key0;
l2fib_entry_result_t result0;
- u32 bucket0;
sw_if_index0 = vnet_buffer (b[0])->sw_if_index[VLIB_RX];
#ifdef COUNTERS
em->counters[node_counter_base_index + L2FWD_ERROR_L2FWD] += 1;
#endif
- l2fib_lookup_1 (msm->mac_table, &cached_key, &cached_result, h0->dst_address, vnet_buffer (b[0])->l2.bd_index, &key0, /* not used */
- &bucket0, /* not used */
- &result0);
+ l2fib_lookup_1 (msm->mac_table, &cached_key, &cached_result,
+ h0->dst_address, vnet_buffer (b[0])->l2.bd_index, &key0,
+ /* not used */ &result0);
l2fwd_process (vm, node, msm, em, b[0], sw_if_index0, &result0, next);
if (do_trace && PREDICT_FALSE (b[0]->flags & VLIB_BUFFER_IS_TRACED))
const ethernet_header_t *h0, *h1, *h2, *h3;
l2fib_entry_key_t key0, key1, key2, key3;
l2fib_entry_result_t result0, result1, result2, result3;
- u32 bucket0, bucket1, bucket2, bucket3;
/* Prefetch next iteration. */
{
vnet_buffer (b[2])->l2.bd_index,
vnet_buffer (b[3])->l2.bd_index,
&key0, &key1, &key2, &key3,
- &bucket0, &bucket1, &bucket2, &bucket3,
&result0, &result1, &result2, &result3);
l2learn_process (node, msm, &em->counters[node_counter_base_index],
ethernet_header_t *h0;
l2fib_entry_key_t key0;
l2fib_entry_result_t result0;
- u32 bucket0;
sw_if_index0 = vnet_buffer (b[0])->sw_if_index[VLIB_RX];
l2fib_lookup_1 (msm->mac_table, &cached_key, &cached_result,
h0->src_address, vnet_buffer (b[0])->l2.bd_index,
- &key0, &bucket0, &result0);
+ &key0, &result0);
l2learn_process (node, msm, &em->counters[node_counter_base_index],
b[0], sw_if_index0, &key0, &cached_key,