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)
commit6717986e15a067ac49370e3f563063c8154e6854
tree77de7bc3d6bf8385b62a6243fd40ddd635cb9580
parent10742efc20a429b2040658af685d6bb2aa674a73
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