summaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2018-10-31 10:55:33 +0200
committerEyal Bari <ebari@cisco.com>2018-10-31 10:55:33 +0200
commit11d47af5af3274b7f5dd1ac2b3a1f9fa025b2414 (patch)
tree250de6ebd86bc87f8251885a2187c6fcb422a652 /src/vnet/l2
parent5f56d736cbd752216357357b8de6a120a41c08eb (diff)
l2fib:remove unused bucket arg in lookup functions
Change-Id: Ib138b6e2eac47acc16e81bc88358ae7947420134 Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/l2')
-rw-r--r--src/vnet/l2/l2_fib.h23
-rw-r--r--src/vnet/l2/l2_fwd.c12
-rw-r--r--src/vnet/l2/l2_learn.c5
3 files changed, 7 insertions, 33 deletions
diff --git a/src/vnet/l2/l2_fib.h b/src/vnet/l2/l2_fib.h
index d8b37d2a586..20ba3da9aa3 100644
--- a/src/vnet/l2/l2_fib.h
+++ b/src/vnet/l2/l2_fib.h
@@ -257,9 +257,8 @@ l2fib_make_key (const u8 * mac_address, u16 bd_index)
* 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
@@ -268,12 +267,10 @@ l2fib_lookup_1 (BVT (clib_bihash) * mac_table,
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)
{
@@ -318,8 +315,6 @@ l2fib_lookup_2 (BVT (clib_bihash) * mac_table,
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)
{
@@ -332,9 +327,6 @@ l2fib_lookup_2 (BVT (clib_bihash) * mac_table,
/* Both hit in the one-entry cache */
result0->raw = cached_result->raw;
result1->raw = cached_result->raw;
- *bucket0 = ~0;
- *bucket1 = ~0;
-
}
else
{
@@ -377,10 +369,6 @@ l2fib_lookup_4 (BVT (clib_bihash) * mac_table,
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,
@@ -400,11 +388,6 @@ l2fib_lookup_4 (BVT (clib_bihash) * mac_table,
result1->raw = cached_result->raw;
result2->raw = cached_result->raw;
result3->raw = cached_result->raw;
- *bucket0 = ~0;
- *bucket1 = ~0;
- *bucket2 = ~0;
- *bucket3 = ~0;
-
}
else
{
diff --git a/src/vnet/l2/l2_fwd.c b/src/vnet/l2/l2_fwd.c
index f1d215a87f4..9fb7b7d355a 100644
--- a/src/vnet/l2/l2_fwd.c
+++ b/src/vnet/l2/l2_fwd.c
@@ -262,7 +262,6 @@ l2fwd_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
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. */
{
@@ -303,10 +302,6 @@ l2fwd_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
&key1, /* not used */
&key2, /* not used */
&key3, /* not used */
- &bucket0, /* not used */
- &bucket1, /* not used */
- &bucket2, /* not used */
- &bucket3, /* not used */
&result0,
&result1,
&result2,
@@ -373,7 +368,6 @@ l2fwd_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
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];
@@ -383,9 +377,9 @@ l2fwd_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
#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))
diff --git a/src/vnet/l2/l2_learn.c b/src/vnet/l2/l2_learn.c
index 2c9966148bc..c6ecef33b0f 100644
--- a/src/vnet/l2/l2_learn.c
+++ b/src/vnet/l2/l2_learn.c
@@ -269,7 +269,6 @@ l2learn_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
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. */
{
@@ -353,7 +352,6 @@ l2learn_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
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],
@@ -383,7 +381,6 @@ l2learn_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
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];
@@ -405,7 +402,7 @@ l2learn_node_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
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,