Skip to content

Commit 10f3094

Browse files
committed
++ cache
1 parent 71b3fc9 commit 10f3094

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

storage/cache.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ bool NHTFlowCache::try_to_export_on_inactive_timeout(size_t flow_index, const ti
265265

266266
bool NHTFlowCache::needs_to_be_offloaded(size_t flow_index) const noexcept
267267
{
268+
return false;
268269
return true;
269270
return only_metadata_required(m_flow_table[flow_index]->m_flow) && m_flow_table[flow_index]->m_flow.src_packets + m_flow_table[flow_index]->m_flow.dst_packets > 30;
270271
}
@@ -534,10 +535,7 @@ int NHTFlowCache::put_pkt(Packet& packet)
534535
export_expired(packet.ts);
535536
return 0;
536537
}
537-
const size_t index = flow_identification.index();
538-
if (!std::holds_alternative<std::pair<size_t, bool>>(flow_identification)) {
539-
std::cout << std::endl;
540-
}
538+
541539
const auto& [flow_index, source_to_destination] = std::get<std::pair<size_t, bool>>(flow_identification);
542540

543541
#ifdef WITH_CTT

storage/cacheRowSpan.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CacheRowSpan {
6666
*/
6767
std::optional<size_t> find_empty() const noexcept;
6868

69-
__attribute__((always_inline)) FlowRecord*& operator[](const size_t index) const noexcept
69+
FlowRecord*& operator[](const size_t index) const noexcept
7070
{
7171
return m_begin[index];
7272
}

0 commit comments

Comments
 (0)