On 6/1/25 8:24 AM, Eli Britstein wrote:
> I also faced it and was about to send a similar fix.
> 
> Acked.

Thanks!  Applied.

Best regards, Ilya Maximets.

> 
>> -----Original Message-----
>> From: Ilya Maximets <i.maxim...@ovn.org>
>> Sent: Friday, May 30, 2025 3:54 PM
>> To: ovs-dev@openvswitch.org
>> Cc: Eli Britstein <el...@nvidia.com>; Roi Dayan <r...@nvidia.com>; Ilya
>> Maximets <i.maxim...@ovn.org>
>> Subject: [PATCH] tests: tunnel-push-pop: Fix occasional failure of the drop 
>> test.
>>
>> External email: Use caution opening links or attachments
>>
>>
>> Datapath port zero is normally taken by the 'datapath interface', i.e.
>> the ovs-dummy interface.  This makes it not possible to allocate port zero 
>> for
>> the p0 interface.  So, it will race with p1 for the number 1.
>> If p0 happens to be created first, it will take the 1 and p1 will get the 
>> port 2 and
>> then the test passes.  However, if p1 is created first, then it will take 
>> the 1 and
>> p0 will take the 2.  In this case the test fails as the port name in the 
>> trace will be
>> different.
>>
>> Use '--names' to avoid this problem, but also fix the port numbers and use 
>> the
>> 'add_of_ports' macro instead of plain-coding the port addition.
>> The macro would've made the issue more obvious in the first place.
>>
>> Fixes: 1015b13f054d ("ofproto-dpif-xlate: Add a drop action for native tunnel
>> failure.")
>> Signed-off-by: Ilya Maximets <i.maxim...@ovn.org>
>> ---
>> tests/tunnel-push-pop.at | 11 +++++------
>> 1 file changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/tests/tunnel-push-pop.at b/tests/tunnel-push-pop.at index
>> 5217cf7b3..d07fb6a67 100644
>> --- a/tests/tunnel-push-pop.at
>> +++ b/tests/tunnel-push-pop.at
>> @@ -1415,15 +1415,14 @@ AT_CLEANUP
>> AT_SETUP([tunnel_push_pop - tunnel drop])  OVS_VSWITCHD_START([dnl
>>     -- add-port br0 t1 -- set Interface t1 type=geneve \
>> -        options:remote_ip=1.1.1.1 \
>> -    -- add-port br0 p0 -- set Interface p0 type=dummy ofport_request=1 \
>> -    -- add-port br0 p1 -- set Interface p1 type=dummy ofport_request=2])
>> +                                           options:remote_ip=1.1.1.1])
>> +add_of_ports br0 1 2
>>
>> -AT_CHECK([ovs-ofctl add-flow br0 in_port=p0,action=t1,p1])
>> +AT_CHECK([ovs-ofctl add-flow br0 in_port=p1,action=t1,p2])
>>
>> -AT_CHECK([ovs-appctl ofproto/trace br0 in_port=p0], [0], [stdout])
>> +AT_CHECK([ovs-appctl ofproto/trace --names br0 in_port=p1], [0],
>> +[stdout])
>> AT_CHECK([tail -1 stdout], [0],
>> -  [Datapath actions: clone(drop),2
>> +  [Datapath actions: clone(drop),p2
>> ])
>>
>> OVS_VSWITCHD_STOP
>> --
>> 2.49.0
> 

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to