summaryrefslogtreecommitdiffstats
path: root/src/stateless/rx/trex_stateless_rx_core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless/rx/trex_stateless_rx_core.cpp')
-rw-r--r--src/stateless/rx/trex_stateless_rx_core.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/stateless/rx/trex_stateless_rx_core.cpp b/src/stateless/rx/trex_stateless_rx_core.cpp
index d6dcd3f4..f2061bf7 100644
--- a/src/stateless/rx/trex_stateless_rx_core.cpp
+++ b/src/stateless/rx/trex_stateless_rx_core.cpp
@@ -69,7 +69,6 @@ void CRFC2544Info::export_data(rfc2544_info_t_ &obj) {
void CRxCoreStateless::create(const CRxSlCfg &cfg) {
m_capture = false;
m_max_ports = cfg.m_max_ports;
- m_num_crc_fix_bytes = cfg.m_num_crc_fix_bytes;
CMessagingManager * cp_rx = CMsgIns::Ins()->getCpRx();
@@ -88,7 +87,8 @@ void CRxCoreStateless::create(const CRxSlCfg &cfg) {
m_rx_port_mngr[i].create(cfg.m_ports[i],
m_rfc2544,
&m_err_cntrs,
- &m_cpu_dp_u);
+ &m_cpu_dp_u,
+ cfg.m_num_crc_fix_bytes);
}
}
@@ -232,6 +232,17 @@ void CRxCoreStateless::capture_pkt(rte_mbuf_t *m) {
}
+int CRxCoreStateless::process_all_pending_pkts(bool flush_rx) {
+
+ int total_pkts = 0;
+ for (int i = 0; i < m_max_ports; i++) {
+ total_pkts += m_rx_port_mngr[i].process_all_pending_pkts(flush_rx);
+ }
+
+ return total_pkts;
+
+}
+
void CRxCoreStateless::reset_rx_stats(uint8_t port_id) {
m_rx_port_mngr[port_id].clear_stats();
}