Skip to content

selftests: Add selftest for link layer and performance testing

Mohan Prasad J linux-kselftest lkml netdev 2 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. v4 Latest3 patches 1 replyApplied 3/3
  2. v33 patches 4 repliesSuperseded

Changes in v4 from the cover letter

- Type hints are added for arguments and return types.
- Test values can be modified through command line.
- Minor code improvements.
- GenerateTraffic class extended for throughput test.
- Protocol testcases separated.

Patches in v4 All 3 applied

#Subject and filesSizeRepliesApplied
1/3selftests: nic_link_layer: Add link layer selftest for NIC drivertools/testing/selftests/drivers/net/hw/Makefile tools/testing/selftests/drivers/net/hw/lib/py/__init__.py tools/testing/selftests/drivers/net/hw/lib/py/linkconfig.py +1 more+315 -00 repliesApplied
2/3selftests: nic_link_layer: Add selftest case for speed and duplex statestools/testing/selftests/drivers/net/hw/nic_link_layer.py+22 -00 repliesApplied
3/3selftests: nic_performance: Add selftest for performance of NIC drivertools/testing/selftests/drivers/net/hw/Makefile tools/testing/selftests/drivers/net/hw/nic_performance.py tools/testing/selftests/drivers/net/lib/py/load.py+157 -11 replyApplied

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH net-next v4 0/3] selftests: Add selftest for link layer and performance testing

The series of patches are for doing basic tests of NIC driver. Test comprises checks for auto-negotiation, speed, duplex state and throughput between local NIC and partner. Tools such as ethtool, iperf3 are used.

---
Changes in v4:
- Type hints are added for arguments and return types.
- Test values can be modified through command line.
- Minor code improvements.
- GenerateTraffic class extended for throughput test.
- Protocol testcases separated.

Changes in v3:
Link to v3: https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]/
- LinkConfig class is included in the hw library. This contains
generic APIs for doing link layer operations.
- Auto-negotiation checks involve changing the auto-neg state
both in local and partner NIC.
- Link layer test and performance test are separated to
different selftest files.
- Resetting of NIC driver done after test completion.

Changes in v2:
Link to v2: https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]/
- Changed the hardcoded implementation of speed, duplex states,
throughput to generic values, in order to support all type
of NIC drivers.
- Test executes based on the supported link modes between local
NIC driver and partner.
- Instead of lan743x directory, selftest file is now relocated
to /selftests/drivers/net/hw.
Link to v1: https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]/
---
Mohan Prasad J (3):
selftests: nic_link_layer: Add link layer selftest for NIC driver
selftests: nic_link_layer: Add selftest case for speed and duplex
states
selftests: nic_performance: Add selftest for performance of NIC driver

 .../testing/selftests/drivers/net/hw/Makefile |   6 +-
 .../drivers/net/hw/lib/py/__init__.py         |   1 +
 .../drivers/net/hw/lib/py/linkconfig.py       | 222 ++++++++++++++++++
 .../drivers/net/hw/nic_link_layer.py          | 113 +++++++++
 .../drivers/net/hw/nic_performance.py         | 137 +++++++++++
 .../selftests/drivers/net/lib/py/load.py      |  20 +-
 6 files changed, 496 insertions(+), 3 deletions(-)
 create mode 100644 tools/testing/selftests/drivers/net/hw/lib/py/linkconfig.py
 create mode 100644 tools/testing/selftests/drivers/net/hw/nic_link_layer.py
 create mode 100644 tools/testing/selftests/drivers/net/hw/nic_performance.py
Signature · 1 line
2.43.0