net/mlx5e: Move code chunk setting encap dests into its own function
authorRoi Dayan <roid@nvidia.com>
Thu, 23 Sep 2021 06:43:06 +0000 (09:43 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 27 Jan 2022 20:37:31 +0000 (12:37 -0800)
commit39542e234b5215dc267b425f8315747849c5e520
treeea19d09d144bfe233fc10b7409f95f2e26ad1922
parente2cf07654efb0fd7bbcb475c6f74be7b5755a8fd
net/mlx5e: Move code chunk setting encap dests into its own function

Split setting encap dests code chunk out of mlx5e_tc_add_fdb_flow()
to make the function smaller for maintainability and reuse.
For symmetry do the same for mlx5e_tc_del_fdb_flow().
While at it refactor cleanup to first check for encap flag like
done when setting encap dests.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c