summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-12-14 13:29:49 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-12-14 13:29:49 +0200
commit511a6dacda5cf45c9194a4fe895de6fe40e7b06a (patch)
tree86728137b8db9f2cb3b163ec5da5300c73d608da /src
parent07d6f068c740fbfafad11241cecaac82a8252a62 (diff)
Fix E1000 stateful latency. Was broken in 227c1ff45fe36be859e9145cb1ec8c364a7fb8b7
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/stateful_rx_core.cpp7
1 files changed, 5 insertions, 2 deletions
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