netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v4 0/2] net: core: improvements to device lookup by hardware address.
@ 2025-02-13 12:42 Breno Leitao
  2025-02-13 12:42 ` [PATCH net v4 1/2] net: Add non-RCU dev_getbyhwaddr() helper Breno Leitao
  2025-02-13 12:42 ` [PATCH net v4 2/2] arp: switch to dev_getbyhwaddr() in arp_req_set_public() Breno Leitao
  0 siblings, 2 replies; 9+ messages in thread
From: Breno Leitao @ 2025-02-13 12:42 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Andrew Lunn, David Ahern
  Cc: linux-kernel, netdev, Eric Dumazet, Breno Leitao, kuniyu,
	ushankar, kuniyu

The first patch adds a new dev_getbyhwaddr() helper function for
finding devices by hardware address when the rtnl lock is held. This
prevents PROVE_LOCKING warnings that occurred when rtnl lock was held
but the RCU read lock wasn't. The common address comparison logic is
extracted into dev_comp_addr() to avoid code duplication.

The second coverts arp_req_set_public() to the new helper.

Signed-off-by: Breno Leitao <leitao@debian.org>
---
Changes in v4:
- Split the patchset in two, and now targeting `net` instead of
  `net-next` (Kuniyuki Iwashima)
- Identended the kernel-doc in the new way. The other functions will
  come in a separate patchset. (Kuniyuki Iwashima)
- Link to v3: https://lore.kernel.org/r/20250212-arm_fix_selftest-v3-0-72596cb77e44@debian.org

Changes in v3:
- Fixed the cover letter (Kuniyuki Iwashima)
- Added a third patch converting arp_req_set_public() to the new helper
  (Kuniyuki Iwashima)
- Link to v2:
  https://lore.kernel.org/r/20250210-arm_fix_selftest-v2-0-ba84b5bc58c8@debian.org

Changes in v2:
- Fixed the documentation (Jakub)
- Renamed the function from dev_getbyhwaddr_rtnl() to dev_getbyhwaddr()
  (Jakub)
- Exported the function in the header (Jakub)
- Link to v1: https://lore.kernel.org/r/20250207-arm_fix_selftest-v1-1-487518d2fd1c@debian.org

---
Breno Leitao (2):
      net: Add non-RCU dev_getbyhwaddr() helper
      arp: switch to dev_getbyhwaddr() in arp_req_set_public()

 include/linux/netdevice.h |  2 ++
 net/core/dev.c            | 37 ++++++++++++++++++++++++++++++++++---
 net/ipv4/arp.c            |  2 +-
 3 files changed, 37 insertions(+), 4 deletions(-)
---
base-commit: 0469b410c888414c3505d8d2b5814eb372404638
change-id: 20250207-arm_fix_selftest-ee29dbc33a06

Best regards,
-- 
Breno Leitao <leitao@debian.org>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-02-18 16:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-13 12:42 [PATCH net v4 0/2] net: core: improvements to device lookup by hardware address Breno Leitao
2025-02-13 12:42 ` [PATCH net v4 1/2] net: Add non-RCU dev_getbyhwaddr() helper Breno Leitao
2025-02-14  5:49   ` Kuniyuki Iwashima
2025-02-18  0:32   ` Jakub Kicinski
2025-02-13 12:42 ` [PATCH net v4 2/2] arp: switch to dev_getbyhwaddr() in arp_req_set_public() Breno Leitao
2025-02-18  0:33   ` Jakub Kicinski
2025-02-18  9:36     ` Breno Leitao
2025-02-18 14:29       ` Jakub Kicinski
2025-02-18 16:27         ` Breno Leitao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).