From: Ido Barnea Date: Wed, 14 Dec 2016 11:29:49 +0000 (+0200) Subject: Fix E1000 stateful latency. Was broken in 227c1ff45fe36be859e9145cb1ec8c364a7fb8b7 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=511a6dacda5cf45c9194a4fe895de6fe40e7b06a;p=trex.git Fix E1000 stateful latency. Was broken in 227c1ff45fe36be859e9145cb1ec8c364a7fb8b7 Signed-off-by: Ido Barnea --- diff --git a/src/stateful_rx_core.cpp b/src/stateful_rx_core.cpp index 65d0a17d..cd2263a4 100644 --- a/src/stateful_rx_core.cpp +++ b/src/stateful_rx_core.cpp @@ -461,8 +461,11 @@ bool CCPortLatency::check_packet(rte_mbuf_t * m,CRx_check_header * & rx_p) { } if ( (pkt_size-vlan_offset) != m_pkt_size ) { - m_length_error++; - return (false); + // patch for e1000 card. e1000 hands us the packet with Ethernet FCS, so it is 4 bytes longer + if ((pkt_size - vlan_offset - 4) != m_pkt_size ) { + m_length_error++; + return (false); + } } c_l_pkt_mode->update_recv(p + m_l4_offset + vlan_offset, &m_icmp_rx_seq, &m_icmp_tx_seq); #ifdef LATENCY_DEBUG