From 8b4df27252f317b33e11a626997748971625a47c Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Sun, 8 May 2016 20:32:52 +0300 Subject: add cache to CP --- src/stateless/dp/trex_stream_node.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/stateless/dp/trex_stream_node.h') diff --git a/src/stateless/dp/trex_stream_node.h b/src/stateless/dp/trex_stream_node.h index 4d3c2ae1..e9e5cf5b 100644 --- a/src/stateless/dp/trex_stream_node.h +++ b/src/stateless/dp/trex_stream_node.h @@ -361,6 +361,10 @@ public: } } + void clear_const_mbuf(){ + m_flags= ( m_flags & ~SL_NODE_CONST_MBUF ); + } + /* prefix header exits only in non cache mode size is 64/128/512 other are not possible right now */ inline void alloc_prefix_header(uint16_t size){ set_prefix_header_size(size); @@ -371,6 +375,7 @@ public: inline void free_prefix_header(){ if (m_original_packet_data_prefix) { free(m_original_packet_data_prefix); + m_original_packet_data_prefix=0; } } @@ -388,6 +393,10 @@ public: void free_stl_node(); +protected: + + void free_stl_vm_buf(); + public: void cache_mbuf_array_init(); @@ -395,6 +404,8 @@ public: return ( m_flags & SL_NODE_CONST_MBUF_CACHE_ARRAY ? true:false ); } + void cache_mbuf_array_copy(CGenNodeCacheMbuf *obj,uint16_t size); + rte_mbuf_t ** cache_mbuf_array_alloc(uint16_t size); void cache_mbuf_array_free(); -- cgit 1.2.3-korg