RFC 791 permits zero-payload last fragments, but common stacks
including the Linux kernel discard them.  Align the reassembly test
with that policy: use valid one-byte fragments, and update the expiry
coverage expectation for duplicate handling.

Assisted-by: composer-2.5-fast, Cursor
Signed-off-by: Eli Britstein <[email protected]>
---
 tests/ofproto-dpif.at | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index cc1d1d388..6de6f293f 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -5536,9 +5536,9 @@ table=2 tcp actions=3
 AT_CHECK([ovs-ofctl -O OpenFlow11 replace-flows br0 flows.txt])
 
 dnl Test frag expiry.
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0014 0001 8192 40 06 3316 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0015 0001 8192 40 06 3315 ac11370d ac11370b 00"])
 ovs-appctl time/warp 10000
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0014 0001 8192 40 06 3316 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0015 0001 8192 40 06 3315 ac11370d ac11370b 00"])
 
 dnl Test that no packets flow.
 AT_CHECK([ovs-appctl dpctl/dump-flows filter=in_port\(90\) | strip_recirc | 
sort], [0], [dnl
@@ -5550,9 +5550,9 @@ dnl Expire second frag.
 ovs-appctl time/warp 10000
 
 dnl Test frag purge
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0014 0002 8192 40 06 3315 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0015 0002 8192 40 06 3314 ac11370d ac11370b 00"])
 ovs-appctl time/warp 33000
-AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0014 0003 8192 40 06 3314 ac11370d ac11370b"])
+AT_CHECK([ovs-appctl netdev-dummy/receive p90 "0021853763af 0026b98cb0f9 0800 
4500 0015 0003 8192 40 06 3313 ac11370d ac11370b 00"])
 
 dnl Test that no packets flow.
 AT_CHECK([ovs-appctl dpctl/dump-flows filter=in_port\(90\) | strip_recirc | 
sort], [0], [dnl
@@ -5563,8 +5563,9 @@ 
recirc_id(<recirc>),in_port(90),packet_type(ns=0,id=0),eth(src=00:26:b9:8c:b0:f9
 dnl Purge second frag
 ovs-appctl time/warp 33000
 
-dnl Make sure all four packets are counted properly in the coverage.
-AT_CHECK([ovs-appctl coverage/show | grep -c "^ipf.*total: 2"], [0], [2
+dnl Make sure expiry and purge counters reflect the four packets sent.
+dnl The duplicate second fragment is counted as overlap, not a second expiry.
+AT_CHECK([ovs-appctl coverage/show | grep -c "^ipf.*total: 2"], [0], [1
 ])
 
 zero1208=$(printf '%0*d' 2416 0)
-- 
2.43.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to