]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mlxsw: spectrum_router: Have FIB entry op context allocated for the instance
authorJiri Pirko <jiri@nvidia.com>
Tue, 10 Nov 2020 09:48:57 +0000 (11:48 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 23:55:21 +0000 (15:55 -0800)
commit91d20d71b2f0b1e3ff4197d27a69b22da3d8de0d
tree2c8ec316ae5d591175209befd7cf64ab35a71c29
parent505cd65c66e82233e0791da8f39312c1e53b6791
mlxsw: spectrum_router: Have FIB entry op context allocated for the instance

Get the max size needed for FIB entry op context and allocate it once
for the instance. Use it repeatedly from the scheduled work.
By this, allow to extend the context to hold more data than it is wise
to do when it was on the stack. Make sure to signalize that the context
needs to be initialized in case families of subsequent FIB entries differ.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.h