On 8/27/25 11:41 AM, Eelco Chaudron wrote:
> 
> 
> On 26 Aug 2025, at 14:44, Ilya Maximets wrote:
> 
>> The last ACK from the 3-WAY handshake in this test goes to userspace
>> (miss upcall) after going through conntrack because +est traffic is
>> handled differently from +new in this set of OpenFlow rules.
>>
>> The sender though proceeds with sending the data that may end up
>> re-ordered with the aforementioned ACK.  Since connection is very
>> short, it is possible that this one ACK will be delivered even after
>> the connection is already closed, i.e., after all the data is sent
>> and the connection termination sequence (FIN-ACK-FIN-ACK) is done.
>> Delivery in this case triggers an RST reply.  And RST transitions
>> TIME_WAIT into CLOSE (CLOSING in OVS terms), causing the test failure.
>>
>> It's not really possible to fully avoid the packet re-ordering as it
>> is part of the upcall mechanism.  But there is a couple ways to avoid
>> it in this particular case, e.g., if we predict how the +est packet
>> will look like and install the datapath flow for +est while processing
>> the original +new, or by storing the upcall PID in the kernel for the
>> whole time of action execution and not only for one packet we're
>> executing actions for (TCP handshake replies are happening in the
>> context of the initiator, which is OVS handler thread in our case).
>> But these are large changes that will not help with test failures
>> on older branches / older kernels.  For now, fixing the test instead.
>>
>> The intention in the test was to check that the state is terminal at
>> the end of the connection, i.e., that our actions do not leave
>> established or incomplete conntrack entries.  So it should be fine to
>> check for both TIME_WAIT and CLOSING, as both of these are terminal
>> states.
>>
>> Fixes: 8d48d5f39436 ("system-traffic: Add conntrack floating IP test")
> 
> Thank you for taking the time to investigate and resolve this intermediate 
> failure.
> 
> The change looks good to me!
> 
> Cheers,
> 
> Eelco
> 
> Acked-by: Eelco Chaudron <[email protected]>
> 

Thanks, Eelco!

Somehow I never replied to this, but I did apply the change to all
branches down to 3.2 last week.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to