net/dpaa2: fix check for key size
authorApeksha Gupta <apeksha.gupta@nxp.com>
Thu, 24 Sep 2020 04:02:06 +0000 (09:32 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 6 Oct 2020 12:43:40 +0000 (14:43 +0200)
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>
Acked-by: Nipun Gupta <nipun.gupta@nxp.com>
drivers/net/dpaa2/dpaa2_flow.c

index 8430213..29f1f2e 100644 (file)
@@ -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) {