net/mlx5: fix meter suffix flow
authorSuanming Mou <suanmingm@mellanox.com>
Wed, 8 Jan 2020 10:41:09 +0000 (12:41 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 20 Jan 2020 17:02:17 +0000 (18:02 +0100)
commit64927f72a72fad39898b084e0cf66cc97b40959f
treed9abf45389896bb5d677c616412cf4152e0ef965
parentf31d7a0171dade2db6f26d331c762c0324e24523
net/mlx5: fix meter suffix flow

The meter suffix flow item pointer restore is not correct to decrease
a fixed value. The incorrect operation will cause incorrect match to
the meter suffix flow, the flow create will fail once the magic number
in the wrong offset memory start with RTE_FLOW_ITEM_TYPE_END.
The pointer should decrease the real offset it increases.

Set the decrease value to the real offset the pointer increases to fix
the 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>
drivers/net/mlx5/mlx5_flow.c