diff options
Diffstat (limited to 'src/bp_sim.h')
-rwxr-xr-x | src/bp_sim.h | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/bp_sim.h b/src/bp_sim.h index 435c054b..8c882c51 100755 --- a/src/bp_sim.h +++ b/src/bp_sim.h @@ -580,7 +580,12 @@ public: } } - // m_flags1 - bit 2 is free + + + bool get_vm_one_queue_enable(){ + return (btGetMaskBit32(m_flags1,2,2) ? true:false); + } + void set_no_keyboard(bool enable){ btSetMaskBit32(m_flags1,5,5,enable?1:0); } @@ -589,6 +594,10 @@ public: return (btGetMaskBit32(m_flags1,5,5) ? true:false); } + void set_vm_one_queue_enable(bool enable){ + btSetMaskBit32(m_flags1,2,2,enable?1:0); + } + /* -e */ void setClientServerFlowFlipAddr(bool enable){ btSetMaskBit32(m_flags1,3,3,enable?1:0); @@ -1241,14 +1250,6 @@ public: class CGlobalInfo { public: - typedef enum { - Q_MODE_NORMAL, - Q_MODE_ONE_QUEUE, // One RX queue and one TX queue - Q_MODE_RSS, - Q_MODE_MANY_DROP_Q // For Mellanox - } queues_mode; - - static void init_pools(uint32_t rx_buffers); /* for simulation */ static void free_pools(); @@ -1335,20 +1336,15 @@ public: static void dump_pool_as_json(Json::Value &json); static std::string dump_pool_as_json_str(void); - static inline int get_queues_mode() { - return m_q_mode; - } - static inline void set_queues_mode(queues_mode mode) { - m_q_mode = mode; - } - + + public: static CRteMemPool m_mem_pool[MAX_SOCKETS_SUPPORTED]; + static uint32_t m_nodes_pool_size; static CParserOption m_options; static CGlobalMemory m_memory_cfg; static CPlatformSocketInfo m_socket; - static queues_mode m_q_mode; }; static inline int get_is_stateless(){ @@ -1362,9 +1358,7 @@ static inline int get_is_rx_check_mode(){ static inline bool get_is_rx_filter_enable(){ uint32_t latency_rate=CGlobalInfo::m_options.m_latency_rate; return ( ( get_is_rx_check_mode() || CGlobalInfo::is_learn_mode() || latency_rate != 0 - || get_is_stateless()) && ((CGlobalInfo::get_queues_mode() != CGlobalInfo::Q_MODE_RSS) - || (CGlobalInfo::get_queues_mode() != CGlobalInfo::Q_MODE_ONE_QUEUE)) - ?true:false ); + || get_is_stateless()) ?true:false ); } static inline uint16_t get_rx_check_hops() { return (CGlobalInfo::m_options.m_rx_check_hops); |