[v3,3/6] net/dpaa2: fix check for key size
diff mbox series

Message ID 20200924040209.32719-4-sachin.saxena@oss.nxp.com
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series
  • enhancement and fixes for nxp dpaax platform
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Sachin Saxena (OSS) Sept. 24, 2020, 4:02 a.m. UTC
From: Apeksha Gupta <apeksha.gupta@nxp.com>

DPAA2 has support for raw flow classification, which can
be used for any protocol rules. This change fixes flow key
pattern length match boundary condition with spec length.

Fixes: 3f881f8d6eb0 ("net/dpaa2: support raw flow classification")
Cc: stable@dpdk.org

Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
---
 drivers/net/dpaa2/dpaa2_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index 843021335..29f1f2e65 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -2901,7 +2901,7 @@  dpaa2_configure_flow_raw(struct rte_flow *flow,
 	flow->tc_id = group;
 	flow->tc_index = attr->priority;
 
-	if (prev_key_size < spec->length) {
+	if (prev_key_size <= spec->length) {
 		ret = dpaa2_flow_extract_add_raw(&priv->extract.qos_key_extract,
 						 spec->length);
 		if (ret) {