[v1] common/cnxk: fix initialization of timer LF count

Message ID e25bb2c73d173211c49616b37d4fa344ceb7d360.1678765587.git.sthotton@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series [v1] common/cnxk: fix initialization of timer LF count |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK
ci/github-robot: build fail github build: failed
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Shijith Thotton March 14, 2023, 3:46 a.m. UTC
  Assignment of nb_lfs variable with the available number of timer LFs was
not happening in the success case after the addition of the new label
"done". This patch fixes the same by moving the assignment under the
label.

Fixes: 44a9307c0908 ("common/cnxk: support mailbox locking")

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 drivers/common/cnxk/roc_tim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Pavan Nikhilesh Bhagavatula March 14, 2023, 5:59 a.m. UTC | #1
> -----Original Message-----
> From: Shijith Thotton <sthotton@marvell.com>
> Sent: Tuesday, March 14, 2023 9:17 AM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Cc: Shijith Thotton <sthotton@marvell.com>; dev@dpdk.org; Pavan
> Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> Subject: [PATCH v1] common/cnxk: fix initialization of timer LF count
> 
> Assignment of nb_lfs variable with the available number of timer LFs was
> not happening in the success case after the addition of the new label
> "done". This patch fixes the same by moving the assignment under the
> label.
> 
> Fixes: 44a9307c0908 ("common/cnxk: support mailbox locking")
> 
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>

Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

> ---
>  drivers/common/cnxk/roc_tim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/common/cnxk/roc_tim.c
> b/drivers/common/cnxk/roc_tim.c
> index 6f256c60fa..f8607b2852 100644
> --- a/drivers/common/cnxk/roc_tim.c
> +++ b/drivers/common/cnxk/roc_tim.c
> @@ -394,11 +394,11 @@ roc_tim_init(struct roc_tim *roc_tim)
>  	} else {
>  		goto done;
>  	}
> -	roc_tim->nb_lfs = nb_lfs;
> 
>  fail:
>  	mbox_put(dev->mbox);
>  done:
> +	roc_tim->nb_lfs = nb_lfs;
>  	return nb_lfs;
>  }
> 
> --
> 2.25.1
  
Jerin Jacob March 15, 2023, 5:52 a.m. UTC | #2
On Tue, Mar 14, 2023 at 11:29 AM Pavan Nikhilesh Bhagavatula
<pbhagavatula@marvell.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Shijith Thotton <sthotton@marvell.com>
> > Sent: Tuesday, March 14, 2023 9:17 AM
> > To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> > Cc: Shijith Thotton <sthotton@marvell.com>; dev@dpdk.org; Pavan
> > Nikhilesh Bhagavatula <pbhagavatula@marvell.com>
> > Subject: [PATCH v1] common/cnxk: fix initialization of timer LF count
> >
> > Assignment of nb_lfs variable with the available number of timer LFs was
> > not happening in the success case after the addition of the new label
> > "done". This patch fixes the same by moving the assignment under the
> > label.
> >
> > Fixes: 44a9307c0908 ("common/cnxk: support mailbox locking")
> >
> > Signed-off-by: Shijith Thotton <sthotton@marvell.com>
>
> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Applied to dpdk-next-net-mrvl/for-next-net. Thanks


>
> > ---
> >  drivers/common/cnxk/roc_tim.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/common/cnxk/roc_tim.c
> > b/drivers/common/cnxk/roc_tim.c
> > index 6f256c60fa..f8607b2852 100644
> > --- a/drivers/common/cnxk/roc_tim.c
> > +++ b/drivers/common/cnxk/roc_tim.c
> > @@ -394,11 +394,11 @@ roc_tim_init(struct roc_tim *roc_tim)
> >       } else {
> >               goto done;
> >       }
> > -     roc_tim->nb_lfs = nb_lfs;
> >
> >  fail:
> >       mbox_put(dev->mbox);
> >  done:
> > +     roc_tim->nb_lfs = nb_lfs;
> >       return nb_lfs;
> >  }
> >
> > --
> > 2.25.1
>
  

Patch

diff --git a/drivers/common/cnxk/roc_tim.c b/drivers/common/cnxk/roc_tim.c
index 6f256c60fa..f8607b2852 100644
--- a/drivers/common/cnxk/roc_tim.c
+++ b/drivers/common/cnxk/roc_tim.c
@@ -394,11 +394,11 @@  roc_tim_init(struct roc_tim *roc_tim)
 	} else {
 		goto done;
 	}
-	roc_tim->nb_lfs = nb_lfs;
 
 fail:
 	mbox_put(dev->mbox);
 done:
+	roc_tim->nb_lfs = nb_lfs;
 	return nb_lfs;
 }