diff options
author | Juraj Sloboda <jsloboda@cisco.com> | 2016-08-25 06:40:29 -0700 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2016-12-21 10:18:42 +0000 |
commit | 7e9e6e1f1c1b9f41547899aeff5a05a5a7421103 (patch) | |
tree | f78c3682546f769b9bf5608cbe76eacfe8240dc6 | |
parent | 11fa895bb9fc8f577a0ad7c7e102c44a78474c3b (diff) |
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>
-rw-r--r-- | vnet/vnet/classify/flow_classify_node.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/vnet/vnet/classify/flow_classify_node.c b/vnet/vnet/classify/flow_classify_node.c index 5c9e0820a26..d3261d33bca 100644 --- a/vnet/vnet/classify/flow_classify_node.c +++ b/vnet/vnet/classify/flow_classify_node.c @@ -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) |