[3/3] net/mlx5: remove the assert for rxq cq

Message ID 1574864323-85580-3-git-send-email-xiangxia.m.yue@gmail.com (mailing list archive)
State Rejected, archived
Delegated to: Raslan Darawsheh
Headers
Series [1/3] net/mlx5: avoid crash when setting hairpin queues |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Tonghao Zhang Nov. 27, 2019, 2:18 p.m. UTC
  From: Tonghao Zhang <xiangxia.m.yue@gmail.com>

The mlx5_rxq_obj_hairpin_new doesn't alloc the
cq anymore. When releasing it, don't check it.

Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
Cc: Ori Kam <orika@mellanox.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ori Kam Nov. 27, 2019, 2:52 p.m. UTC | #1
This patch is not correct,
You are using old code. This was already solved.

Thanks,
Ori

> -----Original Message-----
> From: xiangxia.m.yue@gmail.com <xiangxia.m.yue@gmail.com>
> Sent: Wednesday, November 27, 2019 4:19 PM
> To: dev@dpdk.org
> Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>; Ori Kam
> <orika@mellanox.com>
> Subject: [PATCH dpdk-dev 3/3] net/mlx5: remove the assert for rxq cq
> 
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> 
> The mlx5_rxq_obj_hairpin_new doesn't alloc the
> cq anymore. When releasing it, don't check it.
> 
> Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
> Cc: Ori Kam <orika@mellanox.com>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> ---
>  drivers/net/mlx5/mlx5_rxq.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index 2a12d5fa3436..582a2330e575 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -673,7 +673,6 @@ mlx5_rxq_obj_release(struct mlx5_rxq_obj
> *rxq_obj)
>  	assert(rxq_obj);
>  	if (rxq_obj->type == MLX5_RXQ_OBJ_TYPE_IBV)
>  		assert(rxq_obj->wq);
> -	assert(rxq_obj->cq);
>  	if (rte_atomic32_dec_and_test(&rxq_obj->refcnt)) {
>  		switch (rxq_obj->type) {
>  		case MLX5_RXQ_OBJ_TYPE_IBV:
> --
> 2.23.0
  
Tonghao Zhang Nov. 28, 2019, 1:18 a.m. UTC | #2
On Wed, Nov 27, 2019 at 10:52 PM Ori Kam <orika@mellanox.com> wrote:
>
> This patch is not correct,
> You are using old code. This was already solved.
Thanks for your review, and tips
> Thanks,
> Ori
>
> > -----Original Message-----
> > From: xiangxia.m.yue@gmail.com <xiangxia.m.yue@gmail.com>
> > Sent: Wednesday, November 27, 2019 4:19 PM
> > To: dev@dpdk.org
> > Cc: Tonghao Zhang <xiangxia.m.yue@gmail.com>; Ori Kam
> > <orika@mellanox.com>
> > Subject: [PATCH dpdk-dev 3/3] net/mlx5: remove the assert for rxq cq
> >
> > From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> >
> > The mlx5_rxq_obj_hairpin_new doesn't alloc the
> > cq anymore. When releasing it, don't check it.
> >
> > Fixes: e79c9be91515 ("net/mlx5: support Rx hairpin queues")
> > Cc: Ori Kam <orika@mellanox.com>
> > Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> > ---
> >  drivers/net/mlx5/mlx5_rxq.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> > index 2a12d5fa3436..582a2330e575 100644
> > --- a/drivers/net/mlx5/mlx5_rxq.c
> > +++ b/drivers/net/mlx5/mlx5_rxq.c
> > @@ -673,7 +673,6 @@ mlx5_rxq_obj_release(struct mlx5_rxq_obj
> > *rxq_obj)
> >       assert(rxq_obj);
> >       if (rxq_obj->type == MLX5_RXQ_OBJ_TYPE_IBV)
> >               assert(rxq_obj->wq);
> > -     assert(rxq_obj->cq);
> >       if (rte_atomic32_dec_and_test(&rxq_obj->refcnt)) {
> >               switch (rxq_obj->type) {
> >               case MLX5_RXQ_OBJ_TYPE_IBV:
> > --
> > 2.23.0
>
>
>
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 2a12d5fa3436..582a2330e575 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -673,7 +673,6 @@  mlx5_rxq_obj_release(struct mlx5_rxq_obj *rxq_obj)
 	assert(rxq_obj);
 	if (rxq_obj->type == MLX5_RXQ_OBJ_TYPE_IBV)
 		assert(rxq_obj->wq);
-	assert(rxq_obj->cq);
 	if (rte_atomic32_dec_and_test(&rxq_obj->refcnt)) {
 		switch (rxq_obj->type) {
 		case MLX5_RXQ_OBJ_TYPE_IBV: