Skip to content

neighbour: Add IPv4/IPv6-specific wrappers for neigh_lookup() and friends.

Kuniyuki Iwashima 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. v2 Latest9 patches 7 repliesApplied 9/9
  2. v18 patches 1 replySuperseded

Changes in v2 from the cover letter

* Add Patch 9
* Patch 6 & 7: Convert __teql_resolve()

Patches in v2 All 9 applied

#Subject and filesSizeRepliesApplied
1/9ipv4: Rename ipv4_neigh_lookup() to ipv4_dst_neigh_lookup().net/ipv4/route.c+8 -80 repliesApplied
2/9ipv6: Rename ip6_neigh_lookup() to __ip6_dst_neigh_lookup().include/net/ip6_route.h net/ipv6/ndisc.c net/ipv6/route.c+15 -150 repliesApplied
3/9ipv4: Add wrappers for neigh_lookup() and neigh_create().include/net/arp.h+16 -00 repliesApplied
4/9ipv6: Add wrappers for neigh_lookup() and (__)?neigh_create().include/net/ndisc.h+24 -00 repliesApplied
5/9mlxsw: spectrum: Resolve neigh_table right before neigh_lookup().drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c+58 -380 repliesApplied
6/9ipv6: Use ipv6_neigh_lookup() and friends.drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +12 more+90 -703 repliesApplied
7/9ipv4: Use ipv4_neigh_lookup() and friends.drivers/net/ethernet/marvell/prestera/prestera_router.c drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c +11 more+42 -590 repliesApplied
8/9neighbour: Remove __neigh_lookup() and __neigh_lookup_errno().include/net/neighbour.h net/core/neighbour.c+7 -260 repliesApplied
9/9neighbour: Check n->parms->tbl under tbl->lock in ___neigh_create().net/core/neighbour.c+1 -10 repliesApplied

Reviews trailers per patch

None of the 9 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFernando Fernandez ManceraIdo Schimmel
SeriesR-b R-b
1/9
2/9
3/9
4/9
5/9
6/9
7/9
8/9
9/9

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

Read the v2 thread

Cover letter [PATCH v2 net-next 0/9] neighbour: Add IPv4/IPv6-specific wrappers for neigh_lookup() and friends.

syzbot reported that ip6_finish_output2() could pass tbl and dev from different netns to neigh_create().

When namespacifying neigh_table, I chose to resolve neigh_table in callers to minimise changes, but it turned out to be error-prone.

This series adds IPv4/IPv6-specific helpers for neigh_lookup() and neigh_create() that always fetch the netns from dev to fix the problem.

Along the way, the confusing and now mostly redundant helpers __neigh_lookup() and __neigh_lookup_errno() are converted and removed.

Changes:
v2:
* Add Patch 9
* Patch 6 & 7: Convert __teql_resolve()

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

Kuniyuki Iwashima (9):
ipv4: Rename ipv4_neigh_lookup() to ipv4_dst_neigh_lookup().
ipv6: Rename ip6_neigh_lookup() to __ip6_dst_neigh_lookup().
ipv4: Add wrappers for neigh_lookup() and neigh_create().
ipv6: Add wrappers for neigh_lookup() and (__)?neigh_create().
mlxsw: spectrum: Resolve neigh_table right before neigh_lookup().
ipv6: Use ipv6_neigh_lookup() and friends.
ipv4: Use ipv4_neigh_lookup() and friends.
neighbour: Remove __neigh_lookup() and __neigh_lookup_errno().
neighbour: Check n->parms->tbl under tbl->lock in ___neigh_create().

 .../marvell/prestera/prestera_router.c        | 14 ++--
 .../mellanox/mlx5/core/en/tc_tun_encap.c      | 14 ++--
 .../mellanox/mlx5/core/en_accel/ipsec.c       |  6 +-
 .../ethernet/mellanox/mlxsw/spectrum_router.c | 77 +++++++++++--------
 .../ethernet/mellanox/mlxsw/spectrum_span.c   | 42 ++++++----
 .../netronome/nfp/flower/tunnel_conf.c        |  8 +-
 drivers/net/ethernet/rocker/rocker_ofdpa.c    |  2 +-
 drivers/net/ethernet/sfc/tc_counters.c        | 11 +--
 drivers/net/vrf.c                             |  4 +-
 drivers/net/vxlan/vxlan_core.c                | 14 +---
 include/net/arp.h                             | 16 ++++
 include/net/ip6_route.h                       |  6 +-
 include/net/ndisc.h                           | 31 ++++++--
 include/net/neighbour.h                       | 24 ------
 net/bridge/br_arp_nd_proxy.c                  |  4 +-
 net/core/neighbour.c                          | 11 ++-
 net/ieee802154/6lowpan/tx.c                   |  3 +-
 net/ipv4/arp.c                                | 26 ++++---
 net/ipv4/fib_semantics.c                      |  5 +-
 net/ipv4/route.c                              | 18 ++---
 net/ipv6/ip6_output.c                         |  2 +-
 net/ipv6/ndisc.c                              | 48 +++++++-----
 net/ipv6/route.c                              | 23 +++---
 net/sched/sch_teql.c                          | 15 +++-
 24 files changed, 234 insertions(+), 190 deletions(-)
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog