]> 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)
commit3504dbd09e297bc2b6d919cc8fd3984525b240f5
tree77de7bc3d6bf8385b62a6243fd40ddd635cb9580
parent6fea958db052ccf80b47d30c8509dd70e9a666e9
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