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

Message ID 20200911083520.24020-4-sachin.saxena@oss.nxp.com
State Superseded, archived
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. 11, 2020, 8:35 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.

Fixes: 3f881f8d6eb0 ("net/dpaa2: support raw flow classification")

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

Comments

Hemant Agrawal Sept. 14, 2020, 10:51 a.m. UTC | #1
> -----Original Message-----
> From: Sachin Saxena (OSS) <sachin.saxena@oss.nxp.com>
> Sent: Friday, September 11, 2020 2:05 PM
> To: dev@dpdk.org; ferruh.yigit@intel.com
> Subject: [PATCH v2 3/8] net/dpaa2: fix check for key size
> 
> 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.

 [Hemant] Can you add more about, how it fixes?

> 
> Fixes: 3f881f8d6eb0 ("net/dpaa2: support raw flow classification")

[Hemant]  please Cc it to stable@dpdk.org
With that
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> 
> Signed-off-by: Apeksha Gupta <apeksha.gupta@nxp.com>
> ---
>  drivers/net/dpaa2/dpaa2_flow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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) {
> --
> 2.28.0

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) {