Skip to content

Commit 0b3bd97

Browse files
committed
++ cache
1 parent cb66019 commit 0b3bd97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

storage/cache.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ void NHTFlowCache::create_record(const Packet& packet, size_t flow_index, size_t
267267
if (post_create_return_flags & ProcessPlugin::FlowAction::FLUSH) {
268268
export_flow(flow_index);
269269
m_cache_stats.flushed++;
270+
return;
270271
}
271272
#ifdef WITH_CTT
272273
// if metadata are valid, add flow hash ctt to the flow record
@@ -453,13 +454,14 @@ int NHTFlowCache::put_pkt(Packet &pkt)
453454
#endif /* WITH_CTT */
454455
row_span.advance_flow_to(victim_index, m_new_flow_insert_index);
455456
flow_index = row_begin + m_new_flow_insert_index;
456-
plugins_pre_export(m_flow_table[flow_index.value()]->m_flow);
457-
export_flow(flow_index.value(), FLOW_END_NO_RES);
458457
#ifdef WITH_CTT
459458
if (m_flow_table[flow_index.value()]->is_in_ctt){
460459
send_export_request_to_ctt(m_flow_table[flow_index.value()]->m_flow.flow_hash_ctt);
461460
}
462461
#endif /* WITH_CTT */
462+
plugins_pre_export(m_flow_table[flow_index.value()]->m_flow);
463+
export_flow(flow_index.value(), FLOW_END_NO_RES);
464+
463465
m_cache_stats.not_empty++;
464466
}
465467
create_record(pkt, flow_index.value(), hash_value.value());

0 commit comments

Comments
 (0)