]> git.droids-corp.org - dpdk.git/commit
ethdev: fix variable length flow elements support
authorGregory Etelson <getelson@nvidia.com>
Thu, 4 Nov 2021 11:27:21 +0000 (13:27 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 4 Nov 2021 12:23:29 +0000 (13:23 +0100)
commitde39080bd68254c15f7779e89c88b5cc9842aa36
treeccc89fd1ea8968b9841c88094b234e0045328df6
parentf86d553cc180f9a65e115edb5641a49bbf2cf2f0
ethdev: fix variable length flow elements support

RTE flow API defines two flow elements types - common and PMD private.
Common RTE flow types are defined in rte_flow.h while PMD private
types exists inside specific PMD only. Application can create a flow
rule with PMD private items or actions. RTE flow API restricts
private PMD types to negative values.

Current implementation tried to use negative PMD private item type
value as index in the rte_flow_desc_item[] array.

The patch allows access to rte_flow_desc_item[] and
rte_flow_desc_action[] arrays to non-private PMD types only.

Fixes: 6cf72047332b ("ethdev: support flow elements with variable length")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/ethdev/rte_flow.c