Skip to content

netdevsim: support setting a permanent address

Toke Høiland-Jørgensen netdev 4 versions – Applied

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

Get series with b4
b4 am [email protected] change-id 20250128-netdevsim-perm_addr-5fca47a08157

Versions newest first

  1. v4 Latest2 patches 0 repliesApplied 2/2
  2. v32 patches 4 repliesSuperseded
  3. v22 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v11 patch10 repliesSuperseded

Changes in v4 from the cover letter

- Check permaddr with is_valid_ether_addr() before setting
- Use ip -j and jq to parse address output
- Add a test that setting an invalid perm_addr fails
- Link to v3: https://lore.kernel.org/r/[email protected]

Patches in v4 All 2 applied

#Subject and filesSizeRepliesApplied
1/2net: netdevsim: Support setting dev->perm_addr on port creationdrivers/net/netdevsim/bus.c drivers/net/netdevsim/dev.c drivers/net/netdevsim/netdev.c +1 more+40 -180 repliesApplied
2/2selftests: net: add netdev-l2addr.sh for testing L2 address functionalitytools/testing/selftests/net/Makefile tools/testing/selftests/net/lib.sh tools/testing/selftests/net/netdev-l2addr.sh+83 -00 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSimon Horman
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net-next v4 0/2] netdevsim: support setting a permanent address

Network management daemons that match on the device permanent address currently have no virtual interface types to test against. NetworkManager, in particular, has carried an out of tree patch to set the permanent address on netdevsim devices to use in its CI for this purpose.

This series adds support to netdevsim to set a permanent address on port creation, and adds a test script to test setting and getting of the different L2 address types.

---
Changes in v4:
- Check permaddr with is_valid_ether_addr() before setting
- Use ip -j and jq to parse address output
- Add a test that setting an invalid perm_addr fails
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Fix shellcheck warnings in test script
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Set the permanent address on port creation instead of through debugfs
- Add test script for testing L2 address setting and getting
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Toke Høiland-Jørgensen (2):
net: netdevsim: Support setting dev->perm_addr on port creation
selftests: net: add netdev-l2addr.sh for testing L2 address functionality

 drivers/net/netdevsim/bus.c                  | 26 ++++++++++--
 drivers/net/netdevsim/dev.c                  | 14 +++----
 drivers/net/netdevsim/netdev.c               |  9 +++--
 drivers/net/netdevsim/netdevsim.h            |  9 +++--
 tools/testing/selftests/net/Makefile         |  1 +
 tools/testing/selftests/net/lib.sh           | 23 +++++++++++
 tools/testing/selftests/net/netdev-l2addr.sh | 59 ++++++++++++++++++++++++++++
 7 files changed, 123 insertions(+), 18 deletions(-)

---
base-commit: e96ee511c906c59b7c4e6efd9d9b33917730e000
change-id: 20250128-netdevsim-perm_addr-5fca47a08157