net/mlx5: E-switch, Introduce and use vlan rule config helper
authorParav Pandit <parav@mellanox.com>
Mon, 28 Oct 2019 23:35:03 +0000 (23:35 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 1 Nov 2019 21:40:26 +0000 (14:40 -0700)
commitfdde49e00b9d2041086568b52670043a8def96ff
treee404f80f55e090aff25df01c5b93e05f24712efe
parentb1a3380aa709082761c1dba89234ac16c19037c6
net/mlx5: E-switch, Introduce and use vlan rule config helper

Between legacy mode and switchdev mode, only two fields are changed,
vlan_tag and flow action.
Hence to avoid duplicte code between two modes, introduce and and use
helper function to configure allowed VLAN rule.

While at it, get rid of duplicate debug message.

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