RX core stateless - do not go to idle mode in VM
authorIdo Barnea <[email protected]>
Tue, 29 Nov 2016 13:01:21 +0000 (15:01 +0200)
committerIdo Barnea <[email protected]>
Sun, 4 Dec 2016 09:24:28 +0000 (11:24 +0200)
Signed-off-by: Ido Barnea <[email protected]>
src/stateless/rx/trex_stateless_rx_core.cpp
src/stateless/rx/trex_stateless_rx_core.h

index dc63716..50dc04f 100644 (file)
@@ -182,17 +182,12 @@ void CRxCoreStateless::port_manager_tick() {
     }
 }
 
-void CRxCoreStateless::handle_work_stage(bool do_try_rx_queue) {
+void CRxCoreStateless::handle_work_stage() {
     
     /* set the next sync time to */
     dsec_t sync_time_sec = now_sec() + (1.0 / 1000);
     
     while (m_state == STATE_WORKING) {
-        
-        if (do_try_rx_queue) {
-            try_rx_queues();
-        }
-
         process_all_pending_pkts();
 
         dsec_t now = now_sec();
@@ -209,21 +204,17 @@ void CRxCoreStateless::handle_work_stage(bool do_try_rx_queue) {
 }
 
 void CRxCoreStateless::start() {
-    bool do_try_rx_queue = CGlobalInfo::m_options.preview.get_vm_one_queue_enable() ? true : false;
-
     /* register a watchdog handle on current core */
     m_monitor.create("STL RX CORE", 1);
     TrexWatchDog::getInstance().register_monitor(&m_monitor);
 
     while (m_state != STATE_QUIT) {
-
         switch (m_state) {
         case STATE_IDLE:
             idle_state_loop();
             break;
-
         case STATE_WORKING:
-            handle_work_stage(do_try_rx_queue);
+            handle_work_stage();
             break;
 
         default:
@@ -277,20 +268,6 @@ void CRxCoreStateless::handle_rx_queue_msgs(uint8_t thread_id, CNodeRing * r) {
     }
 }
 
-// VM mode function. Handle messages from DP
-void CRxCoreStateless::try_rx_queues() {
-
-    CMessagingManager * rx_dp = CMsgIns::Ins()->getRxDp();
-    uint8_t threads=CMsgIns::Ins()->get_num_threads();
-    int ti;
-    for (ti = 0; ti < (int)threads; ti++) {
-        CNodeRing * r = rx_dp->getRingDpToCp(ti);
-        if ( ! r->isEmpty() ) {
-            handle_rx_queue_msgs((uint8_t)ti, r);
-        }
-    }
-}
-
 int CRxCoreStateless::process_all_pending_pkts(bool flush_rx) {
 
     int total_pkts = 0;
index 7481ae2..52196e6 100644 (file)
@@ -159,7 +159,7 @@ class CRxCoreStateless {
 
     void capture_pkt(rte_mbuf_t *m);
     void handle_rx_queue_msgs(uint8_t thread_id, CNodeRing * r);
-    void handle_work_stage(bool do_try_rx_queue);
+    void handle_work_stage();
     void port_manager_tick();
     
     int process_all_pending_pkts(bool flush_rx = false);