net/mlx5: fix meter header modify before decap
authorSuanming Mou <suanmingm@mellanox.com>
Thu, 6 Feb 2020 04:14:25 +0000 (06:14 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 14 Feb 2020 11:42:12 +0000 (12:42 +0100)
commit431f199883e5b7eeea87a2f9f0272daf3354c1da
treedb41a675577dffe6f712899007c84a2ea3de782b
parent00f75a40576b28aa5633d2cadd86f23c30c7d220
net/mlx5: fix meter header modify before decap

The 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. The tag header modify action is added to the
prefix subflow to make the suffix subflow to match the packets from the
prefix subflow.

Currently, the tag header modify action is added at the beginning in the
prefix subflow even before decap action. The header modify action does
not make sense to the later decap action, so the flow create will be
validated as incorrect flow rule and failed.

Move the tag header modify action just before meter action in the prefix
subflow to make the flow with decap action to do the decap first, then
do the tag and meter to fix that issue.

Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
Cc: stable@dpdk.org
Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_flow.c