net/mlx5: fix actions validation on root table
authorBing Zhao <bingz@mellanox.com>
Wed, 29 Apr 2020 12:54:20 +0000 (20:54 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 5 May 2020 13:54:26 +0000 (15:54 +0200)
commit0ba70e439ee44c222cccf6bef6460db31611dfaa
treed579de957f5ec95ba2694f5babe175771faf3861
parent691b3d3ebb6acf7f6a88b64690b1f6b319ab7b6d
net/mlx5: fix actions validation on root table

The maximal supported header modifications number of a single modify
context on the root table cannot be queried from firmware directly.
It is a fixed value of 16 in the latest releases. In the validation
stage, PMD driver should ensure that no more than 16 header modify
actions exist in a single context.
In some old firmware releases, the supported value is 8. PMD driver
should try its best to create the flow. Firmware will return error
and refuse to create the flow if the actions number exceeds the
maximal value.

Fixes: 72a944dba163 ("net/mlx5: fix header modify action validation")
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5_flow.h
drivers/net/mlx5/mlx5_flow_dv.c