summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-12-01 10:19:01 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-12-04 11:24:28 +0200
commit9464519d16d203f0d0ca33e8079c5735eb1c4c36 (patch)
treec76c6b7e220b7a0a6230af7c5bfe21f09e630dbf /src/stateless
parent72b154271b5b307963ab3ce9c4bd4092cf0f03a2 (diff)
take care of extra Ethernet FCS bytes handed to software in e1000
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/rx/trex_stateless_rx_core.cpp6
-rw-r--r--src/stateless/rx/trex_stateless_rx_core.h35
2 files changed, 38 insertions, 3 deletions
diff --git a/src/stateless/rx/trex_stateless_rx_core.cpp b/src/stateless/rx/trex_stateless_rx_core.cpp
index 50dc04f4..df5e8e8e 100644
--- a/src/stateless/rx/trex_stateless_rx_core.cpp
+++ b/src/stateless/rx/trex_stateless_rx_core.cpp
@@ -69,6 +69,7 @@ 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();
@@ -231,6 +232,8 @@ void CRxCoreStateless::capture_pkt(rte_mbuf_t *m) {
}
+#if 0
+//??????? remove
// In VM setup, handle packets coming as messages from DP cores.
void CRxCoreStateless::handle_rx_queue_msgs(uint8_t thread_id, CNodeRing * r) {
while ( true ) {
@@ -269,14 +272,11 @@ void CRxCoreStateless::handle_rx_queue_msgs(uint8_t thread_id, CNodeRing * r) {
}
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;
-
}
diff --git a/src/stateless/rx/trex_stateless_rx_core.h b/src/stateless/rx/trex_stateless_rx_core.h
index 52196e61..900abf2b 100644
--- a/src/stateless/rx/trex_stateless_rx_core.h
+++ b/src/stateless/rx/trex_stateless_rx_core.h
@@ -29,10 +29,43 @@
class TrexStatelessCpToRxMsgBase;
+<<<<<<< HEAD
/**
* RFC 2544 implementation
*
*/
+=======
+class CCPortLatencyStl {
+ public:
+ void reset();
+
+ public:
+ rx_per_flow_t m_rx_pg_stat[MAX_FLOW_STATS];
+ rx_per_flow_t m_rx_pg_stat_payload[MAX_FLOW_STATS_PAYLOAD];
+};
+
+class CLatencyManagerPerPortStl {
+public:
+ CCPortLatencyStl m_port;
+ CPortLatencyHWBase * m_io;
+};
+
+class CRxSlCfg {
+ public:
+ CRxSlCfg (){
+ m_max_ports = 0;
+ m_cps = 0.0;
+ m_num_crc_fix_bytes = 0;
+ }
+
+ public:
+ uint32_t m_max_ports;
+ double m_cps;
+ CPortLatencyHWBase * m_ports[TREX_MAX_PORTS];
+ uint8_t m_num_crc_fix_bytes;
+};
+
+>>>>>>> f4198c7... take care of extra Ethernet FCS bytes handed to software in e1000
class CRFC2544Info {
public:
void create();
@@ -173,6 +206,8 @@ class CRxCoreStateless {
private:
TrexMonitor m_monitor;
uint32_t m_max_ports;
+ // compensate for the fact that hardware send us packets without Ethernet CRC, and we report with it
+ uint8_t m_num_crc_fix_bytes;
bool m_capture;
state_e m_state;
CNodeRing *m_ring_from_cp;