net/mlx5: fix VLAN actions in meter
authorSuanming Mou <suanmingm@mellanox.com>
Thu, 20 Feb 2020 07:45:44 +0000 (09:45 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Feb 2020 10:41:21 +0000 (11:41 +0100)
commit50f576d657d78e87a3eac597353d236969969c17
tree49efc826df07f97759b3841fad1239811e0a609b
parent6e77151286b2f551ae30aac0f251ed067f1ec011
net/mlx5: fix VLAN actions in meter

Meter suffix subflow only has the port id and tag match item, if VLAN
push and set VLAN id actions exist in the suffix subflow, the user
defined VLAN items is required for the actions to set a correct VLAN
id.

Currently, the VLAN item stays in the meter prefix subflow. Without
the VLAN item, VLAN id or pcp will not be inherited.

Actions require the VLAN item as below:
RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN
RTE_FLOW_ACTION_TYPE_OF_SET_VLAN_VID

Add a private VLAN item to copy the user defined VLAN item to the meter
suffix subflow, so the suffix subflow will have the chance to get the
correct original VLAN id and pcp value from the VLAN item.

Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c