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>
This commit is contained in:
parent
f31d7a0171
commit
64927f72a7
@ -4042,7 +4042,7 @@ flow_create_split_meter(struct rte_eth_dev *dev,
|
||||
sfx_items++;
|
||||
}
|
||||
sfx_items->type = RTE_FLOW_ITEM_TYPE_END;
|
||||
sfx_items -= METER_SUFFIX_ITEM;
|
||||
sfx_items -= sfx_port_id_item ? 2 : 1;
|
||||
/* Setting the sfx group atrr. */
|
||||
sfx_attr.group = sfx_attr.transfer ?
|
||||
(MLX5_FLOW_TABLE_LEVEL_SUFFIX - 1) :
|
||||
|
Loading…
x
Reference in New Issue
Block a user