File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -79,16 +79,6 @@ void FlowRecord::reuse()
7979#endif /* WITH_CTT */
8080}
8181
82- bool FlowRecord::is_empty () const noexcept
83- {
84- return m_hash == 0 ;
85- }
86-
87- bool FlowRecord::belongs (uint64_t hash) const noexcept
88- {
89- return hash == m_hash;
90- }
91-
9282void FlowRecord::create (const Packet &pkt, uint64_t hash)
9383{
9484 m_flow.src_packets = 1 ;
Original file line number Diff line number Diff line change @@ -37,9 +37,11 @@ class alignas(64) FlowRecord
3737public:
3838 Flow m_flow;
3939#ifdef WITH_CTT
40- bool is_in_ctt; /* *< Flow is ofloaded by CTT if set. */
41- bool is_waiting_for_export; /* *< Flow cant be exported if set. */
42- timeval export_time; /* *< Time until the export of the flow is delayed. */
40+ bool is_in_ctt; /* *< Flow is offloaded by CTT if set. */
41+ bool is_waiting_for_export; /* *< Export request of flow was sent to ctt,
42+ but still has not been processed in ctt. */
43+ timeval export_time; /* *< Time point when we sure that the export request has already been processed by ctt,
44+ and flow is not in ctt anymore. */
4345#endif /* WITH_CTT */
4446
4547 FlowRecord ();
@@ -48,8 +50,16 @@ class alignas(64) FlowRecord
4850 void erase ();
4951 void reuse ();
5052
51- bool is_empty () const noexcept ;
52- bool belongs (uint64_t pkt_hash) const noexcept ;
53+ __attribute__ ((always_inline)) bool is_empty () const noexcept
54+ {
55+ return m_hash == 0 ;
56+ }
57+
58+ __attribute__ ((always_inline)) bool belongs (uint64_t hash) const noexcept
59+ {
60+ return hash == m_hash;
61+ }
62+
5363 void create (const Packet &pkt, uint64_t pkt_hash);
5464 void update (const Packet &pkt);
5565};
You can’t perform that action at this time.
0 commit comments