net/mlx5: E-switch, Combine metadata enable/disable functionality
authorParav Pandit <parav@mellanox.com>
Mon, 29 Jul 2019 21:13:02 +0000 (21:13 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 1 Aug 2019 18:14:25 +0000 (11:14 -0700)
commit332bd3a5b931eb67deb370db62d59f9cc7f76dac
tree59287cad91657932ca1fdcd9c2e39d7de91f3470
parent6cedde4513990af7191afa43528533f80e92c989
net/mlx5: E-switch, Combine metadata enable/disable functionality

Except bit toggling code, rest of the code is same to enable/disable
metadata passing functionality.
Hence, combine them to single function and control using enable flag.

Also instead of checking metadata supported at multiple places,
fold into the helper function.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c