On 02/07/2025 3:23, Jakub Kicinski wrote:
> On Sun, 29 Jun 2025 14:18:12 +0300 Nimrod Oren wrote:
>> A few packets may still be sent and received during the termination of
>> the iperf processes. These late packets cause failures when they arrive
>> on queues expected to be empty.
>>
>> Add a one second delay between repeated _send_traffic_check() calls in
>> rss_ctx tests to ensure such packets are processed before the next
>> traffic checks are performed.
> 
> Sprinklings sleeps should be last resort. Is there a way to wait for
> iperf to shut down cleanly, or wait for the socket to be closed fully?
> Like wait_port_listen() ?

The socket may end up in TIME_WAIT state, so waiting for it to be fully
closed can take ~2 mins. We could opt for a single sleep during
GenerateTraffic.stop(), but that would also affect tests that aren't
impacted by late packets. WDYT?

Reply via email to