net/mlx5: fix match information in meter
authorSuanming Mou <suanmingm@mellanox.com>
Thu, 20 Feb 2020 13:53:44 +0000 (15:53 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Feb 2020 10:41:21 +0000 (11:41 +0100)
commit6e77151286b2f551ae30aac0f251ed067f1ec011
tree24d58ca5400613ed32987d24adeebeee01ff26ae
parentbc42413bb9c0b767e40c5a52e529277c06608a3b
net/mlx5: fix match information in meter

As meter flows are split into three subflows each, the prefix subflow
with meter action color the packet, the meter subflow filters out the
colored packets, the suffix subflow applies all the remaining actions
to the passed packets.

Currently, all the user defined items are matched in the prefix flow.
Flow id tag match item is the only item added to the meter suffix
subflow. Some of the remaining actions to be applied in the suffix
subflow require more information in the match item, or the suffix
subflow will not be created successfully.

Actions require the L3/L4 type in the match items as below:
RTE_FLOW_ACTION_TYPE_SET_TP_SRC
RTE_FLOW_ACTION_TYPE_SET_TP_DST
RTE_FLOW_ACTION_TYPE_DEC_TTL
RTE_FLOW_ACTION_TYPE_SET_TTL
RTE_FLOW_ACTION_TYPE_RSS
RTE_FLOW_ACTION_TYPE_QUEUE

Inherit the match item flags from meter prefix subflow to make actions
in suffix subflow get sufficient information.

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_dv.c