[v2,1/2] net/bnx2x: fix reset of scan FP flag

Message ID 20200126225419.23919-1-rmody@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v2,1/2] net/bnx2x: fix reset of scan FP flag |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues
ci/iol-testing success Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Rasesh Mody Jan. 26, 2020, 10:54 p.m. UTC
  The fastpath task queue handler resets the fastpath scan flag
unconditionally, this patch changes that to reset the flag
only if it was set.

Fixes: 08a6e472c3d7 ("net/bnx2x: fix packet drop")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Jerin Jacob Jan. 28, 2020, 9:59 a.m. UTC | #1
On Mon, Jan 27, 2020 at 4:24 AM Rasesh Mody <rmody@marvell.com> wrote:
>
> The fastpath task queue handler resets the fastpath scan flag
> unconditionally, this patch changes that to reset the flag
> only if it was set.
>
> Fixes: 08a6e472c3d7 ("net/bnx2x: fix packet drop")
> Cc: stable@dpdk.org
>
> Signed-off-by: Rasesh Mody <rmody@marvell.com>

Series applied to dpdk-next-net-mrvl/master. Thanks.


> ---
>  drivers/net/bnx2x/bnx2x.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
> index ed31335ac..50e289b28 100644
> --- a/drivers/net/bnx2x/bnx2x.c
> +++ b/drivers/net/bnx2x/bnx2x.c
> @@ -4577,10 +4577,10 @@ static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)
>                         bnx2x_handle_fp_tq(fp);
>                         return;
>                 }
> +               /* We have completed slow path completion, clear the flag */
> +               rte_atomic32_set(&sc->scan_fp, 0);
>         }
>
> -       /* Assuming we have completed slow path completion, clear the flag */
> -       rte_atomic32_set(&sc->scan_fp, 0);
>         bnx2x_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
>                    le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1);
>  }
> --
> 2.18.0
>
  

Patch

diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index ed31335ac..50e289b28 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -4577,10 +4577,10 @@  static void bnx2x_handle_fp_tq(struct bnx2x_fastpath *fp)
 			bnx2x_handle_fp_tq(fp);
 			return;
 		}
+		/* We have completed slow path completion, clear the flag */
+		rte_atomic32_set(&sc->scan_fp, 0);
 	}
 
-	/* Assuming we have completed slow path completion, clear the flag */
-	rte_atomic32_set(&sc->scan_fp, 0);
 	bnx2x_ack_sb(sc, fp->igu_sb_id, USTORM_ID,
 		   le16toh(fp->fp_hc_idx), IGU_INT_ENABLE, 1);
 }