mlxsw: spectrum: Add support for flower matches on VLAN ID, PCP
authorPetr Machata <petrm@mellanox.com>
Thu, 9 Mar 2017 08:25:20 +0000 (09:25 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 02:35:35 +0000 (18:35 -0800)
commit9caab08a7685c874e7f20ef16f8191daf85609ae
tree3177b6d8736e4d4249f62aeb1b364e2586400d1e
parenta150201a70da3bcbe76c85c255c6ab2d342c3278
mlxsw: spectrum: Add support for flower matches on VLAN ID, PCP

Introduce MLXSW_AFK_ELEMENT_VID, PCP and declare them in afk_element
infos that contain them.  Use the elements when VLAD ID or priority are
used in the flow.

Also add MLXSW_AFK_ELEMENT_VID, PCP to mlxsw_sp_acl_tcam_pattern_ipv4.
Both items are included in mlxsw_sp_afk_element_info_l2_dmac,
resp. _smac, and both MLXSW_AFK_ELEMENT_SMAC and _DMAC are already in
the pattern.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_keys.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_flex_keys.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c