Re: [PATCH net 2/6] net: stmmac: selftests: Validate EEE based on the actual LPI timer value

From: Maxime Chevallier

Date: Wed Sep 09 2026 - 09:34:59 EST




On 9/9/26 13:40, Nicolai Buchwitz wrote:
> On 9.9.2026 09:47, Maxime Chevallier wrote:
>> The EEE selftest is a 2-step test :
>>  - It validates that we enter in LPI mode with the
>>    irq_tx_path_in_lpi_mode_n counter
>>  - It then validates that we exit LPI when sending a frame, with the
>>    irq_tx_path_exit_lpi_mode_n counter.
>>
>> The current state of the test lacks 2 main things :
>>
>>  - We don't know exactly when was the previous frame sent (it's from the
>>    previous selftest)
>>
>>  - The timeout is hardcoded, while the LPI is entered after a
>>    user-configurable delay. On top of that, the timeout loop uses a
>>    pre-decrement iterator (--retries) that actually only iterate nine
>>    times, so 900ms while the default LPI value is 1 second.
>>
>> Let's therefore make it more deterministic :
>>
>>  - Send a frame at the beginning of the test
>>  - Wait for more than the lpi timer value, we timeout after about twice
>>    the value,
>>  - Then send another frame, and verify that we do go out of LPI, also
>>    with a timeout.
>>
>> Note that the test's goal isn't to validate the LPI timer value itself,
>> only that we enter/leave LPI mode.
>>
>> Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support")
>> Signed-off-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
>> ---
>
>> [...]
>
> Forget to mention in my last comment:
> The series seems to be broken. I can't find patch 3 and also the cover
> letter is missing on lore and my inbox?

Huh that's strange indeed, it's on lkml but not netdev@ ?

https://lore.kernel.org/lkml/20260909074740.1247762-1-maxime.chevallier@xxxxxxxxxxx/

meh I'll resend if need be

Maxime

>
> Nicolai