Skip to content

selftests: drv-net: Introduce flow-control selftest

Maxime Chevallier (Netdev Foundation) linux-doc lkml netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyApplied 3/3
  2. v23 patches 7 repliesSuperseded
  3. v13 patches 9 repliesSuperseded

Changes in v3 from the cover letter

- Use Jakub's loop on carrier state when waiting for the interface to be up
- Following discussions with Andrew, we now detect the link partner using ethtool -r to trigger an autoneg, instead of assuming the link will drop when the interface is brought down
- Numerous typo fixes and comment reworks
- wait_for_link and wait_for_aneg have been reworked
- We no longer expect that pause advertising is empty when pause autoneg is off, as documented in uAPI.

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3selftests: drv-net: Introduce a selftest for ethtool flow controltools/testing/selftests/drivers/net/hw/Makefile tools/testing/selftests/drivers/net/hw/pause.py+370 -00 repliesApplied
2/3selftests: drv-net: pause: Validate the pause autonegotiation with a partnertools/testing/selftests/drivers/net/hw/pause.py+308 -00 repliesApplied
3/3selftests: drv-net: pause: Validate pause autoneg interactions with link autonegtools/testing/selftests/drivers/net/hw/pause.py+268 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net-next v3 0/3] selftests: drv-net: Introduce flow-control selftest

Hi everyone,

This is V3 for the ethtool flow control test.

This test aims at validating the flow control implementation in drivers, using the ethtool API.

The test can run in various conditions :

DUT <-----> Anything that has link up (not controllable) DUT <-----> A directly connected device

It enumerates the local and remote device's capabilities, to test as much as possibly testable. I've run it on 17 different boards connected to other boards through various means : Usb to Eth dongles, direct connection to the board, connection through a switch. Some of the ports tested were user ports of DSA switches too.

Contrary to V2, on V3 we really only have a collection of actual failures that show during tests, as one of the peer's I'm running these on has a v6.18 kernel that pre-dates the realtek phylink port and show actual bugs in the driver.

Thanks to the Netdev Foundation for funding this work :)

Maxime

Changes in V3:
- Use Jakub's loop on carrier state when waiting for the interface to be up
- Following discussions with Andrew, we now detect the link partner using ethtool -r to trigger an autoneg, instead of assuming the link will drop when the interface is brought down
- Numerous typo fixes and comment reworks
- wait_for_link and wait_for_aneg have been reworked
- We no longer expect that pause advertising is empty when pause autoneg is off, as documented in uAPI.

Changes in V2:
V2: https://lore.kernel.org/r/[email protected]
- Don't add stuff to the lib
- Fix most pylink errors (module's too long for pylint ...)
- Ditch the fail=False from the defer()
- Remove duplicate patches
- Clean the comments
- Drop the return type annotations, most were wrong...

V1 : https://lore.kernel.org/netdev/[email protected]/

Maxime Chevallier (Netdev Foundation) (3):
selftests: drv-net: Introduce a selftest for ethtool flow control
selftests: drv-net: pause: Validate the pause autonegotiation with a
partner
selftests: drv-net: pause: Validate pause autoneg interactions with
link autoneg

 .../testing/selftests/drivers/net/hw/Makefile |   1 +
 .../testing/selftests/drivers/net/hw/pause.py | 944 ++++++++++++++++++
 2 files changed, 945 insertions(+)
 create mode 100755 tools/testing/selftests/drivers/net/hw/pause.py
Signature · 1 line
2.55.0