classify: add simple mechanism for automatic flow creation (VPP-338)
VPP-338 Support wildcards in IPFIX flow configuration Change-Id: Ie5ab4f89d70153c3b15fc6bd8d97fa383ee842d9 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
This commit is contained in:

committed by
Damjan Marion

parent
11fa895bb9
commit
7e9e6e1f1c
@@ -228,35 +228,17 @@ flow_classify_inline (vlib_main_t * vm,
|
||||
hash0 = vnet_buffer(b0)->l2_classify.hash;
|
||||
t0 = pool_elt_at_index (vcm->tables, table_index0);
|
||||
e0 = vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
|
||||
|
||||
if (e0)
|
||||
{
|
||||
hits++;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (PREDICT_TRUE(t0->next_table_index != ~0))
|
||||
{
|
||||
t0 = pool_elt_at_index (vcm->tables,
|
||||
t0->next_table_index);
|
||||
}
|
||||
else
|
||||
{
|
||||
misses++;
|
||||
break;
|
||||
}
|
||||
|
||||
hash0 = vnet_classify_hash_packet (t0, (u8 *) h0);
|
||||
e0 = vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
|
||||
if (e0)
|
||||
{
|
||||
hits++;
|
||||
chain_hits++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
misses++;
|
||||
vnet_classify_add_del_session (vcm, table_index0,
|
||||
h0, ~0, 0, 0, 0, 0, 1);
|
||||
/* increment counter */
|
||||
vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
|
||||
}
|
||||
}
|
||||
if (PREDICT_FALSE((node->flags & VLIB_NODE_FLAG_TRACE)
|
||||
|
Reference in New Issue
Block a user