]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Refactor tun routing helpers
authorVlad Buslov <vladbu@nvidia.com>
Fri, 22 Jan 2021 12:34:37 +0000 (14:34 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 6 Feb 2021 04:53:35 +0000 (20:53 -0800)
commitfd4207f1211fbfd355a447dc07be366f1d1e4162
tree77de7bc3d6bf8385b62a6243fd40ddd635cb9580
parent7e645301d73e25590d0d0f568cbe6e4c594f6510
net/mlx5e: Refactor tun routing helpers

Refactor tun routing helpers to use dedicated struct
mlx5e_tc_tun_route_attr instead of multiple output arguments. This
simplifies the callers (no need to keep track of bunch of output param
pointers) and allows to unify struct release code in new
mlx5e_tc_tun_route_attr_cleanup() helper instead of requiring callers to
manually release some of the output parameters that require it.

Simplify code by unifying error handling at the end of the function and
rearranging code. Remove redundant empty line.

Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Dmytro Linkin <dlinkin@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c