DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
@ 2023-06-20  8:51 Thierry Herbelot
  2023-06-20  9:27 ` [EXT] " Ashwin Sekhar T K
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Thierry Herbelot @ 2023-06-20  8:51 UTC (permalink / raw)
  To: dev
  Cc: Thierry Herbelot, Thomas Monjalon, Nithin Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

Unlock mbox when an error is detected.

Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC APIs')
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
---
 drivers/common/cnxk/roc_npa.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 377439c2baaf..38e149da82cc 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -245,8 +245,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t aura_id)
 	if (rc < 0)
 		goto exit;
 
-	if (aura_rsp->hdr.rc != 0)
-		return NPA_ERR_AURA_POOL_FINI;
+	if (aura_rsp->hdr.rc != 0) {
+		rc = NPA_ERR_AURA_POOL_FINI;
+		goto exit;
+	}
 
 	/* Sync NDC-NPA for LF */
 	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
-- 
2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [EXT] [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
  2023-06-20  8:51 [PATCH] common/cnxk/roc_npa: fix npa_aura_fini Thierry Herbelot
@ 2023-06-20  9:27 ` Ashwin Sekhar T K
  2023-06-20  9:29   ` Thierry Herbelot
  2023-06-20  9:32 ` David Marchand
  2023-06-20  9:39 ` [PATCH v2] common/cnxk/roc_npa: unlock mbox in error cases Thierry Herbelot
  2 siblings, 1 reply; 9+ messages in thread
From: Ashwin Sekhar T K @ 2023-06-20  9:27 UTC (permalink / raw)
  To: Thierry Herbelot, dev
  Cc: Thomas Monjalon, Nithin Kumar Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

Hi Thierry,

Could you please add the same fix in npa_aura_pool_fini() as well.

Thanks
Ashwin Sekhar T K 

> -----Original Message-----
> From: Thierry Herbelot <thierry.herbelot@6wind.com>
> Sent: Tuesday, June 20, 2023 2:22 PM
> To: dev@dpdk.org
> Cc: Thierry Herbelot <thierry.herbelot@6wind.com>; Thomas Monjalon
> <thomas@monjalon.net>; Nithin Kumar Dabilpuram
> <ndabilpuram@marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>
> Subject: [EXT] [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
> 
> External Email
> 
> ----------------------------------------------------------------------
> Unlock mbox when an error is detected.
> 
> Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC
> APIs')
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> ---
>  drivers/common/cnxk/roc_npa.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/common/cnxk/roc_npa.c
> b/drivers/common/cnxk/roc_npa.c index 377439c2baaf..38e149da82cc
> 100644
> --- a/drivers/common/cnxk/roc_npa.c
> +++ b/drivers/common/cnxk/roc_npa.c
> @@ -245,8 +245,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t
> aura_id)
>  	if (rc < 0)
>  		goto exit;
> 
> -	if (aura_rsp->hdr.rc != 0)
> -		return NPA_ERR_AURA_POOL_FINI;
> +	if (aura_rsp->hdr.rc != 0) {
> +		rc = NPA_ERR_AURA_POOL_FINI;
> +		goto exit;
> +	}
> 
>  	/* Sync NDC-NPA for LF */
>  	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [EXT] [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
  2023-06-20  9:27 ` [EXT] " Ashwin Sekhar T K
@ 2023-06-20  9:29   ` Thierry Herbelot
  0 siblings, 0 replies; 9+ messages in thread
From: Thierry Herbelot @ 2023-06-20  9:29 UTC (permalink / raw)
  To: Ashwin Sekhar T K, dev
  Cc: Thomas Monjalon, Nithin Kumar Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

Hello Ashwin,

I will resend a patch with a fix also in npa_aura_pool_fini

	Thierry

On 6/20/23 11:27, Ashwin Sekhar T K wrote:
> Hi Thierry,
> 
> Could you please add the same fix in npa_aura_pool_fini() as well.
> 
> Thanks
> Ashwin Sekhar T K
> 
>> -----Original Message-----
>> From: Thierry Herbelot <thierry.herbelot@6wind.com>
>> Sent: Tuesday, June 20, 2023 2:22 PM
>> To: dev@dpdk.org
>> Cc: Thierry Herbelot <thierry.herbelot@6wind.com>; Thomas Monjalon
>> <thomas@monjalon.net>; Nithin Kumar Dabilpuram
>> <ndabilpuram@marvell.com>; Satha Koteswara Rao Kottidi
>> <skoteshwar@marvell.com>; Jerin Jacob Kollanukkaran
>> <jerinj@marvell.com>
>> Subject: [EXT] [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
>>
>> External Email
>>
>> ----------------------------------------------------------------------
>> Unlock mbox when an error is detected.
>>
>> Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC
>> APIs')
>> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
>> ---
>>   drivers/common/cnxk/roc_npa.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/common/cnxk/roc_npa.c
>> b/drivers/common/cnxk/roc_npa.c index 377439c2baaf..38e149da82cc
>> 100644
>> --- a/drivers/common/cnxk/roc_npa.c
>> +++ b/drivers/common/cnxk/roc_npa.c
>> @@ -245,8 +245,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t
>> aura_id)
>>   	if (rc < 0)
>>   		goto exit;
>>
>> -	if (aura_rsp->hdr.rc != 0)
>> -		return NPA_ERR_AURA_POOL_FINI;
>> +	if (aura_rsp->hdr.rc != 0) {
>> +		rc = NPA_ERR_AURA_POOL_FINI;
>> +		goto exit;
>> +	}
>>
>>   	/* Sync NDC-NPA for LF */
>>   	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
>> --
>> 2.39.2
> 

-- 
Thierry Herbelot
Senior Software Engineer
Tel: +33 1 39 30 92 61
http://www.6wind.com/

Follow us:
https://www.linkedin.com/company/6wind/
https://twitter.com/6WINDsoftware
https://www.youtube.com/user/6windsoftware

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
  2023-06-20  8:51 [PATCH] common/cnxk/roc_npa: fix npa_aura_fini Thierry Herbelot
  2023-06-20  9:27 ` [EXT] " Ashwin Sekhar T K
@ 2023-06-20  9:32 ` David Marchand
  2023-06-20  9:49   ` Thierry Herbelot
  2023-06-20  9:39 ` [PATCH v2] common/cnxk/roc_npa: unlock mbox in error cases Thierry Herbelot
  2 siblings, 1 reply; 9+ messages in thread
From: David Marchand @ 2023-06-20  9:32 UTC (permalink / raw)
  To: Thierry Herbelot, Ashwin Sekhar T K, Nithin Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran
  Cc: dev, Thomas Monjalon

On Tue, Jun 20, 2023 at 10:51 AM Thierry Herbelot
<thierry.herbelot@6wind.com> wrote:
>
> Unlock mbox when an error is detected.

Out of curiosity, how did you catch it?

This issue could probably be caught with clang thread safety checks,
but it is disabled on this driver atm.
https://git.dpdk.org/dpdk/commit/drivers/common/cnxk?id=70cc4e1fed665712e68f2f45d98dda4abc6accda


-- 
David Marchand


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] common/cnxk/roc_npa: unlock mbox in error cases
  2023-06-20  8:51 [PATCH] common/cnxk/roc_npa: fix npa_aura_fini Thierry Herbelot
  2023-06-20  9:27 ` [EXT] " Ashwin Sekhar T K
  2023-06-20  9:32 ` David Marchand
@ 2023-06-20  9:39 ` Thierry Herbelot
  2023-06-20  9:43   ` [PATCH v3] " Thierry Herbelot
  2 siblings, 1 reply; 9+ messages in thread
From: Thierry Herbelot @ 2023-06-20  9:39 UTC (permalink / raw)
  To: dev
  Cc: Thierry Herbelot, Thomas Monjalon, Nithin Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

In npa_aura_pool_fini and in npa_aura_fini, Unlock mbox when an error is
detected.

Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC APIs')
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
--
V2: also patch npa_aura_pool_fini
---
 drivers/common/cnxk/roc_npa.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 377439c2baaf..cf5b24813532 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -197,8 +197,10 @@ npa_aura_pool_fini(struct mbox *m_box, uint32_t aura_id, uint64_t aura_handle)
 	off = mbox->rx_start + pool_rsp->hdr.next_msgoff;
 	aura_rsp = (struct npa_aq_enq_rsp *)((uintptr_t)mdev->mbase + off);
 
-	if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0)
-		return NPA_ERR_AURA_POOL_FINI;
+	if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0){
+		rc = NPA_ERR_AURA_POOL_FINI;
+		goto exit;
+	}
 
 	/* Sync NDC-NPA for LF */
 	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
@@ -245,8 +247,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t aura_id)
 	if (rc < 0)
 		goto exit;
 
-	if (aura_rsp->hdr.rc != 0)
-		return NPA_ERR_AURA_POOL_FINI;
+	if (aura_rsp->hdr.rc != 0) {
+		rc = NPA_ERR_AURA_POOL_FINI;
+		goto exit;
+	}
 
 	/* Sync NDC-NPA for LF */
 	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
-- 
2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v3] common/cnxk/roc_npa: unlock mbox in error cases
  2023-06-20  9:39 ` [PATCH v2] common/cnxk/roc_npa: unlock mbox in error cases Thierry Herbelot
@ 2023-06-20  9:43   ` Thierry Herbelot
  2023-06-21  4:46     ` [EXT] " Ashwin Sekhar T K
  0 siblings, 1 reply; 9+ messages in thread
From: Thierry Herbelot @ 2023-06-20  9:43 UTC (permalink / raw)
  To: dev
  Cc: Thierry Herbelot, Thomas Monjalon, Nithin Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

In npa_aura_pool_fini and in npa_aura_fini, Unlock mbox when an error is
detected.

Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC APIs')
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
--
V2: also patch npa_aura_pool_fini
V3: add missing space
---
 drivers/common/cnxk/roc_npa.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 377439c2baaf..3b9a70028ba2 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -197,8 +197,10 @@ npa_aura_pool_fini(struct mbox *m_box, uint32_t aura_id, uint64_t aura_handle)
 	off = mbox->rx_start + pool_rsp->hdr.next_msgoff;
 	aura_rsp = (struct npa_aq_enq_rsp *)((uintptr_t)mdev->mbase + off);
 
-	if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0)
-		return NPA_ERR_AURA_POOL_FINI;
+	if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0) {
+		rc = NPA_ERR_AURA_POOL_FINI;
+		goto exit;
+	}
 
 	/* Sync NDC-NPA for LF */
 	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
@@ -245,8 +247,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t aura_id)
 	if (rc < 0)
 		goto exit;
 
-	if (aura_rsp->hdr.rc != 0)
-		return NPA_ERR_AURA_POOL_FINI;
+	if (aura_rsp->hdr.rc != 0) {
+		rc = NPA_ERR_AURA_POOL_FINI;
+		goto exit;
+	}
 
 	/* Sync NDC-NPA for LF */
 	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
-- 
2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] common/cnxk/roc_npa: fix npa_aura_fini
  2023-06-20  9:32 ` David Marchand
@ 2023-06-20  9:49   ` Thierry Herbelot
  0 siblings, 0 replies; 9+ messages in thread
From: Thierry Herbelot @ 2023-06-20  9:49 UTC (permalink / raw)
  To: David Marchand, Ashwin Sekhar T K, Nithin Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran
  Cc: dev, Thomas Monjalon

Hello David,

I added a trace in mbox_get() to print when a mbox lock was already locked.
The traces were displayed when running an internal CI/CD test suite.

	Best regards

	Thierry

On 6/20/23 11:32, David Marchand wrote:
> On Tue, Jun 20, 2023 at 10:51 AM Thierry Herbelot
> <thierry.herbelot@6wind.com> wrote:
>>
>> Unlock mbox when an error is detected.
> 
> Out of curiosity, how did you catch it?
> 
> This issue could probably be caught with clang thread safety checks,
> but it is disabled on this driver atm.
> https://git.dpdk.org/dpdk/commit/drivers/common/cnxk?id=70cc4e1fed665712e68f2f45d98dda4abc6accda
> 
> 

-- 
Thierry Herbelot
Senior Software Engineer
Tel: +33 1 39 30 92 61
http://www.6wind.com/

Follow us:
https://www.linkedin.com/company/6wind/
https://twitter.com/6WINDsoftware
https://www.youtube.com/user/6windsoftware

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [EXT] [PATCH v3] common/cnxk/roc_npa: unlock mbox in error cases
  2023-06-20  9:43   ` [PATCH v3] " Thierry Herbelot
@ 2023-06-21  4:46     ` Ashwin Sekhar T K
  2023-06-21  5:00       ` Jerin Jacob
  0 siblings, 1 reply; 9+ messages in thread
From: Ashwin Sekhar T K @ 2023-06-21  4:46 UTC (permalink / raw)
  To: Thierry Herbelot, dev
  Cc: Thomas Monjalon, Nithin Kumar Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

Acked-by: Ashwin Sekhar T K <asekhar@marvell.com>

> -----Original Message-----
> From: Thierry Herbelot <thierry.herbelot@6wind.com>
> Sent: Tuesday, June 20, 2023 3:14 PM
> To: dev@dpdk.org
> Cc: Thierry Herbelot <thierry.herbelot@6wind.com>; Thomas Monjalon
> <thomas@monjalon.net>; Nithin Kumar Dabilpuram
> <ndabilpuram@marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar@marvell.com>; Jerin Jacob Kollanukkaran
> <jerinj@marvell.com>
> Subject: [EXT] [PATCH v3] common/cnxk/roc_npa: unlock mbox in error
> cases
> 
> External Email
> 
> ----------------------------------------------------------------------
> In npa_aura_pool_fini and in npa_aura_fini, Unlock mbox when an error is
> detected.
> 
> Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC
> APIs')
> Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
> --
> V2: also patch npa_aura_pool_fini
> V3: add missing space
> ---
>  drivers/common/cnxk/roc_npa.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/common/cnxk/roc_npa.c
> b/drivers/common/cnxk/roc_npa.c index 377439c2baaf..3b9a70028ba2
> 100644
> --- a/drivers/common/cnxk/roc_npa.c
> +++ b/drivers/common/cnxk/roc_npa.c
> @@ -197,8 +197,10 @@ npa_aura_pool_fini(struct mbox *m_box, uint32_t
> aura_id, uint64_t aura_handle)
>  	off = mbox->rx_start + pool_rsp->hdr.next_msgoff;
>  	aura_rsp = (struct npa_aq_enq_rsp *)((uintptr_t)mdev->mbase +
> off);
> 
> -	if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0)
> -		return NPA_ERR_AURA_POOL_FINI;
> +	if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0) {
> +		rc = NPA_ERR_AURA_POOL_FINI;
> +		goto exit;
> +	}
> 
>  	/* Sync NDC-NPA for LF */
>  	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox); @@ -245,8
> +247,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t aura_id)
>  	if (rc < 0)
>  		goto exit;
> 
> -	if (aura_rsp->hdr.rc != 0)
> -		return NPA_ERR_AURA_POOL_FINI;
> +	if (aura_rsp->hdr.rc != 0) {
> +		rc = NPA_ERR_AURA_POOL_FINI;
> +		goto exit;
> +	}
> 
>  	/* Sync NDC-NPA for LF */
>  	ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
> --
> 2.39.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [EXT] [PATCH v3] common/cnxk/roc_npa: unlock mbox in error cases
  2023-06-21  4:46     ` [EXT] " Ashwin Sekhar T K
@ 2023-06-21  5:00       ` Jerin Jacob
  0 siblings, 0 replies; 9+ messages in thread
From: Jerin Jacob @ 2023-06-21  5:00 UTC (permalink / raw)
  To: Ashwin Sekhar T K
  Cc: Thierry Herbelot, dev, Thomas Monjalon, Nithin Kumar Dabilpuram,
	Satha Koteswara Rao Kottidi, Jerin Jacob Kollanukkaran

On Wed, Jun 21, 2023 at 10:17 AM Ashwin Sekhar T K <asekhar@marvell.com> wrote:
>
> Acked-by: Ashwin Sekhar T K <asekhar@marvell.com>
>
> > -----Original Message-----
> > From: Thierry Herbelot <thierry.herbelot@6wind.com>
> > Sent: Tuesday, June 20, 2023 3:14 PM
> > To: dev@dpdk.org
> > Cc: Thierry Herbelot <thierry.herbelot@6wind.com>; Thomas Monjalon
> > <thomas@monjalon.net>; Nithin Kumar Dabilpuram
> > <ndabilpuram@marvell.com>; Satha Koteswara Rao Kottidi
> > <skoteshwar@marvell.com>; Jerin Jacob Kollanukkaran
> > <jerinj@marvell.com>
> > Subject: [EXT] [PATCH v3] common/cnxk/roc_npa: unlock mbox in error
> > cases
> >
> > External Email
> >
> > ----------------------------------------------------------------------
> > In npa_aura_pool_fini and in npa_aura_fini, Unlock mbox when an error is
> > detected.
> >
> > Fixes: ea4d70cc4f0b46d5 ('common/cnxk: add NPA aura create/destroy ROC
> > APIs')
> > Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>


Updated the git commit as follows and applied to
dpdk-next-net-mrvl/for-next-net. Thanks


    common/cnxk: fix mbox unlocking in error cases

    Fix mbox unlock issues in npa_aura_pool_fini() and in npa_aura_fini(),
    when an error is detected.

    Fixes: ea4d70cc4f0b ("common/cnxk: add NPA aura create/destroy ROC API")
    Cc: stable@dpdk.org

    Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
    Acked-by: Ashwin Sekhar T K <asekhar@marvell.com>


> > --
> > V2: also patch npa_aura_pool_fini
> > V3: add missing space
> > ---
> >  drivers/common/cnxk/roc_npa.c | 12 ++++++++----
> >  1 file changed, 8 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/common/cnxk/roc_npa.c
> > b/drivers/common/cnxk/roc_npa.c index 377439c2baaf..3b9a70028ba2
> > 100644
> > --- a/drivers/common/cnxk/roc_npa.c
> > +++ b/drivers/common/cnxk/roc_npa.c
> > @@ -197,8 +197,10 @@ npa_aura_pool_fini(struct mbox *m_box, uint32_t
> > aura_id, uint64_t aura_handle)
> >       off = mbox->rx_start + pool_rsp->hdr.next_msgoff;
> >       aura_rsp = (struct npa_aq_enq_rsp *)((uintptr_t)mdev->mbase +
> > off);
> >
> > -     if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0)
> > -             return NPA_ERR_AURA_POOL_FINI;
> > +     if (aura_rsp->hdr.rc != 0 || pool_rsp->hdr.rc != 0) {
> > +             rc = NPA_ERR_AURA_POOL_FINI;
> > +             goto exit;
> > +     }
> >
> >       /* Sync NDC-NPA for LF */
> >       ndc_req = mbox_alloc_msg_ndc_sync_op(mbox); @@ -245,8
> > +247,10 @@ npa_aura_fini(struct mbox *m_box, uint32_t aura_id)
> >       if (rc < 0)
> >               goto exit;
> >
> > -     if (aura_rsp->hdr.rc != 0)
> > -             return NPA_ERR_AURA_POOL_FINI;
> > +     if (aura_rsp->hdr.rc != 0) {
> > +             rc = NPA_ERR_AURA_POOL_FINI;
> > +             goto exit;
> > +     }
> >
> >       /* Sync NDC-NPA for LF */
> >       ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
> > --
> > 2.39.2
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-21  5:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20  8:51 [PATCH] common/cnxk/roc_npa: fix npa_aura_fini Thierry Herbelot
2023-06-20  9:27 ` [EXT] " Ashwin Sekhar T K
2023-06-20  9:29   ` Thierry Herbelot
2023-06-20  9:32 ` David Marchand
2023-06-20  9:49   ` Thierry Herbelot
2023-06-20  9:39 ` [PATCH v2] common/cnxk/roc_npa: unlock mbox in error cases Thierry Herbelot
2023-06-20  9:43   ` [PATCH v3] " Thierry Herbelot
2023-06-21  4:46     ` [EXT] " Ashwin Sekhar T K
2023-06-21  5:00       ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).