net/mlx5: fix pattern expansion in RSS flow rules
authorGregory Etelson <getelson@nvidia.com>
Wed, 30 Jun 2021 07:19:52 +0000 (10:19 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 8 Jul 2021 20:09:28 +0000 (22:09 +0200)
commitbe548b9c9d40d33d88bb16641944be4cb2240eb1
tree69bdb4c8493d7ac2db807c99a74d5c84f210c575
parent5db9318f76586ea0373dd505f6dba9eb467675ce
net/mlx5: fix pattern expansion in RSS flow rules

Flow rule pattern may be implicitly expanded by the PMD if the rule
has RSS flow action. The expansion adds network headers to the
original pattern. The new pattern lists all network levels that
participate in the rule RSS action.

The patch validates that buffer for expanded pattern has enough bytes
for new flow items.

Fixes: c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.c