]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-Switch, Refactor rule offload forward action processing
authorVlad Buslov <vladbu@nvidia.com>
Wed, 20 Jan 2021 19:51:45 +0000 (21:51 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 6 Feb 2021 04:53:35 +0000 (20:53 -0800)
commit7d6c47824ae95e12c430a5062a14e44e1f7573d8
tree1fa1ed855e0c2a3ec74190de9bed1117560928a4
parent1e1d1ccdef3fde9ba0802018538da05fc7a0e793
net/mlx5: E-Switch, Refactor rule offload forward action processing

Following patches in the series extend forwarding functionality with VF
tunnel TX and RX handling. Extract action forwarding processing code into
dedicated functions to simplify further extensions:

- Handle every forwarding case with dedicated function instead of inline
code.

- Extract forwarding dest dispatch conditional into helper function
esw_setup_dests().

- Unify forwaring cleanup code in error path of
mlx5_eswitch_add_offloaded_rule() and in rule deletion code of
__mlx5_eswitch_del_rule() in new helper function esw_cleanup_dests() (dual
to new esw_setup_dests() helper).

This patch does not change functionality.

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