summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-11-29 15:01:21 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-12-04 11:24:28 +0200
commit72b154271b5b307963ab3ce9c4bd4092cf0f03a2 (patch)
treed28bd755227eb65cf5c7535c51e0b386df34db8c /src/stateless
parent227c1ff45fe36be859e9145cb1ec8c364a7fb8b7 (diff)
RX core stateless - do not go to idle mode in VM
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/rx/trex_stateless_rx_core.cpp27
-rw-r--r--src/stateless/rx/trex_stateless_rx_core.h2
2 files changed, 3 insertions, 26 deletions
diff --git a/src/stateless/rx/trex_stateless_rx_core.cpp b/src/stateless/rx/trex_stateless_rx_core.cpp
index dc637163..50dc04f4 100644
--- a/src/stateless/rx/trex_stateless_rx_core.cpp
+++ b/src/stateless/rx/trex_stateless_rx_core.cpp
@@ -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;
diff --git a/src/stateless/rx/trex_stateless_rx_core.h b/src/stateless/rx/trex_stateless_rx_core.h
index 7481ae2f..52196e61 100644
--- a/src/stateless/rx/trex_stateless_rx_core.h
+++ b/src/stateless/rx/trex_stateless_rx_core.h
@@ -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);