Change comments for rte_flow_validate() function to indicate that flow rule collision and resource validation is optional for PMD and therefore the return codes may have different meanings.
Fixes: b1a4b4cbc0a8 ("ethdev: introduce generic flow API") Signed-off-by: John Daley <johnd...@cisco.com> --- lib/librte_ether/rte_flow.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index 8013ecab2..bbc5ec2e3 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -983,9 +983,10 @@ struct rte_flow_error { /** * Check whether a flow rule can be created on a given port. * - * While this function has no effect on the target device, the flow rule is - * validated against its current configuration state and the returned value - * should be considered valid by the caller for that state only. + * The flow rule is validated for correctness and whether it could be accepted + * by the device given sufficient resources. The rule is checked against the + * current device mode and queue configuration. The flow rule may optionally + * be validated against existing flow rules and resources. * * The returned value is guaranteed to remain valid only as long as no * successful calls to rte_flow_create() or rte_flow_destroy() are made in @@ -1016,9 +1017,15 @@ struct rte_flow_error { * -ENOTSUP: valid but unsupported rule specification (e.g. partial * bit-masks are unsupported). * - * -EEXIST: collision with an existing rule. + * -EEXIST: collision with an existing rule. Only returned if device + * supports flow rule collision checking and there was a flow rule + * collision. Not receiving this return code is no gaurantee that creating + * the rule will not fail due to a collision. + * + * -ENOMEM: If the device supports resource checking: device resouce + * limitation. If not supported: not enough resouces to execute the validate + * command. * - * -ENOMEM: not enough resources. * * -EBUSY: action cannot be performed due to busy device resources, may * succeed if the affected queues or even the entire port are in a stopped -- 2.12.0