forked from kevintraynor/dpdk-stable-queue-1811
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx5: fix header modify action validation
The header modify actions number supported now has some limitation, and it is decided by both driver and hardware. If the configuration is different or the table to insert the flow is different, the result might be different if the flow contains header modify actions. Currently, the actual action number could only be calculated in the later stage called translate, from user specified value to the driver format. And the action numbers checking is missed in the flow validation. So PMD will return incorrect result to indicate the flow actions are valid by rte_flow_validate but then it will fail when calling rte_flow_create. Adding some simple checking in the validation will help to get rid of this incorrect checking. Most of the actions will only consume 1 SW action field except the MAC address and IPv6 address. And from SW POV, the maximal action fields for these will be consumed even if only part of such field will be modified because that there is no mask in the flow actions and the mask will always be all ONEs. The metering or extra metadata supports will cost one more action. Fixes: 9597330 ("net/mlx5: update modify header action translator") Cc: stable@dpdk.org Signed-off-by: Bing Zhao <bingz@mellanox.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
- Loading branch information
Bing Zhao
authored and
Ferruh Yigit
committed
Apr 21, 2020
1 parent
0d7d180
commit 72a944d
Showing
4 changed files
with
108 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.