Code Review
/
trex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
07d6f06
)
Fix E1000 stateful latency. Was broken in 227c1ff45fe36be859e9145cb1ec8c364a7fb8b7
08/4308/1
author
Ido Barnea
<
[email protected]
>
Wed, 14 Dec 2016 11:29:49 +0000
(13:29 +0200)
committer
Ido Barnea
<
[email protected]
>
Wed, 14 Dec 2016 11:29:49 +0000
(13:29 +0200)
Signed-off-by: Ido Barnea <
[email protected]
>
src/stateful_rx_core.cpp
patch
|
blob
|
history
diff --git
a/src/stateful_rx_core.cpp
b/src/stateful_rx_core.cpp
index
65d0a17
..
cd2263a
100644
(file)
--- 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