Skip to content

RFC mlxsw: spectrum_router: Add extack messages for RIF and VRF overflow

David Ahern netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: ipv6: Make inet6addr_validator a blocking notifiernet/ipv6/addrconf.c net/ipv6/addrconf_core.c+20 -134 replies
2/4net: Add extack to validator_info structs used for address notifierdrivers/net/ipvlan/ipvlan_main.c include/linux/inetdevice.h include/net/addrconf.h +2 more+28 -151 reply
3/4mlxsw: spectrum: router: Add support for address validator notifierdrivers/net/ethernet/mellanox/mlxsw/spectrum.c drivers/net/ethernet/mellanox/mlxsw/spectrum.h drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+67 -02 replies
4/4mlxsw: spectrum_router: Add extack message for RIF and VRF overflowdrivers/net/ethernet/mellanox/mlxsw/spectrum_router.c+69 -453 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchIdo Schimmel
1/4R-b
2/4R-b
3/4
4/4R-b

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

Read the v1 thread

Cover letter [RFC net-next 0/4] mlxsw: spectrum_router: Add extack messages for RIF and VRF overflow

Currently, exceeding the number of VRF instances or the number of router interfaces either fails with a non-intuitive EBUSY:

    $ ip li set swp1s1.6 vrf vrf-1s1-6 up
    RTNETLINK answers: Device or resource busy

or fails silently (IPv6) since the checks are done in a work queue. This set adds support for the address validator notifier to spectrum which allows ext-ack based messages to be returned on failure.

To make that happen the IPv6 version needs to be converted from atomic to blocking (patch 1), and then support for extack needs to be added to the notifier (patch 2). Patches 3 and 4 add the validator notifier to spectrum and then plumb the extack argument.

With this set, VRF overflows fail with:

   $ ip li set swp1s1.6 vrf vrf-1s1-6 up
   Error: spectrum: Exceeded number of supported VRF.

and RIF overflows fail with:

   $ ip addr add dev swp1s2.191 10.12.191.1/24
   Error: spectrum: Exceeded number of supported router interfaces.

David Ahern (4):
net: ipv6: Make inet6addr_validator a blocking notifier
net: Add extack to validator_info structs used for address notifier
mlxsw: spectrum: router: Add support for address validator notifier
mlxsw: spectrum_router: Add extack message for RIF and VRF overflow

 drivers/net/ethernet/mellanox/mlxsw/spectrum.c     |  10 ++
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h     |   4 +
 .../net/ethernet/mellanox/mlxsw/spectrum_router.c  | 163 +++++++++++++++------
 drivers/net/ipvlan/ipvlan_main.c                   |  10 +-
 include/linux/inetdevice.h                         |   1 +
 include/net/addrconf.h                             |   1 +
 net/ipv4/devinet.c                                 |   8 +-
 net/ipv6/addrconf.c                                |  51 ++++---
 net/ipv6/addrconf_core.c                           |   9 +-
 9 files changed, 184 insertions(+), 73 deletions(-)
Signature · 1 line
2.1.4