summaryrefslogtreecommitdiffstats
path: root/src/stateless
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2017-02-27 17:54:14 +0200
committerIdo Barnea <ibarnea@cisco.com>2017-02-28 16:12:54 +0200
commit0e80bd4f57b89c01a8b12889a260264a8eae08ad (patch)
treebe1e8bc0b2f946ea04eefca799d9c076e2478d12 /src/stateless
parent871c0537424d2572708b3645dac07d26a5e17938 (diff)
Introduce capability flags in each driver, to reduce the use of get_vm_one_queue_enable
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/stateless')
-rw-r--r--src/stateless/cp/trex_stateless_port.h12
-rw-r--r--src/stateless/cp/trex_stream.cpp7
2 files changed, 2 insertions, 17 deletions
diff --git a/src/stateless/cp/trex_stateless_port.h b/src/stateless/cp/trex_stateless_port.h
index 5c2c8397..a1f7b76a 100644
--- a/src/stateless/cp/trex_stateless_port.h
+++ b/src/stateless/cp/trex_stateless_port.h
@@ -358,18 +358,6 @@ public:
return m_rx_count_num;
}
- /**
- * return true if port adds CRC to a packet (not occurs for
- * VNICs)
- *
- * @author imarom (24-Feb-16)
- *
- * @return bool
- */
- bool has_crc_added() const {
- return m_api_info.has_crc;
- }
-
TrexPortOwner & get_owner() {
return m_owner;
}
diff --git a/src/stateless/cp/trex_stream.cpp b/src/stateless/cp/trex_stream.cpp
index 7a3dfef7..90c8493b 100644
--- a/src/stateless/cp/trex_stream.cpp
+++ b/src/stateless/cp/trex_stream.cpp
@@ -265,13 +265,10 @@ TrexStreamRate::get_line_speed_bps() {
double
TrexStreamRate::get_pkt_size() {
- TrexStatelessPort *port = get_stateless_obj()->get_port_by_id(m_stream.m_port_id);
-
double pkt_size = m_stream.get_pkt_size();
- if (port->has_crc_added()) {
- pkt_size += 4;
- }
+ // compensate for Ethernet FCS (CRC) added by driver
+ pkt_size += 4;
return pkt_size;
}