mlxsw: spectrum_router: Add extack messages for RIF and VRF overflow
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest5 patches 1 replyIn review
- v25 patches 1 replySuperseded
- v15 patches 6 repliesSuperseded
Changes in v3 from the cover letter
- fix surround context of patch 4 which was altered by c30f5d012edf
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ipv6: addrconf: cleanup locking in ipv6_add_addrnet/ | +60 | 0 replies | |
| 2/5 | net: ipv6: Make inet6addr_validator a blocking notifierdrivers/ net/ net/ | +19 | 0 replies | |
| 3/5 | net: Add extack to validator_info structs used for address notifierdrivers/ include/ include/ +2 more | +27 | 0 replies | |
| 4/5 | mlxsw: spectrum: router: Add support for address validator notifierdrivers/ drivers/ drivers/ | +70 | 0 replies | |
| 5/5 | mlxsw: spectrum_router: Add extack message for RIF and VRF overflowdrivers/ | +69 | 0 replies |
Reviews trailers per patch
4 of 5 patches have a Reviewed-by or Acked-by.
| Patch | Ido Schimmel |
|---|---|
| 1/5 | |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 net-next 0/5] 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 busyor 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 2), and then support for extack needs to be added to the notifier (patch 3). Patch 1 reworks the locking in ipv6_add_addr to work better in the atomic and non-atomic code paths. Patches 4 and 5 add the validator notifier to spectrum and then plumb the extack argument through spectrum_router.
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.
v2 -> v3
- fix surround context of patch 4 which was altered by c30f5d012edf
v1 -> v2
- fix error path in ipv6_add_addr: reset rt to NULL (Ido comment) and add in6_dev_put on ifa once the hold has been done
RFC -> v1
- addressed various comments from Ido
- refactored ipv6_add_addr to allow ifa's to be allocated with GFP_KERNEL as requested by DaveM
David Ahern (5):
ipv6: addrconf: cleanup locking in ipv6_add_addr
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 | 15 +- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 4 + .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 162 +++++++++++++++------ drivers/net/ipvlan/ipvlan_main.c | 14 +- include/linux/inetdevice.h | 1 + include/net/addrconf.h | 1 + net/ipv4/devinet.c | 8 +- net/ipv6/addrconf.c | 129 +++++++++------- net/ipv6/addrconf_core.c | 9 +- 9 files changed, 234 insertions(+), 109 deletions(-)
Signature · 1 line
2.1.4