DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: "xiangxia.m.yue@gmail.com" <xiangxia.m.yue@gmail.com>,
	Suanming Mou <suanmingm@mellanox.com>,
	"david.marchand@redhat.com" <david.marchand@redhat.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix crash when releasing the meter	table
Date: Tue, 21 Apr 2020 15:02:50 +0000	[thread overview]
Message-ID: <AM0PR05MB67079B2889392E7D70EE82E2C2D50@AM0PR05MB6707.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1586940749-35960-1-git-send-email-xiangxia.m.yue@gmail.com>

Hi,

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of
> xiangxia.m.yue@gmail.com
> Sent: Wednesday, April 15, 2020 11:52 AM
> To: Suanming Mou <suanmingm@mellanox.com>;
> david.marchand@redhat.com
> Cc: dev@dpdk.org; Tonghao Zhang <xiangxia.m.yue@gmail.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix crash when releasing the meter
> table
> 
> From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> 
> The meters of ports share the same meter table on
> the port. When releasing meters, don't check value returned
> using assert. Because other meters may reference to it.
> 
> Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables")
> Fixes: 708aa5608f98 ("net/mlx5: fix meter suffix table leak")
> 
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index ae00ca431eec..2174b9aa37dc 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -8552,11 +8552,9 @@ struct field_modify_info modify_tcp[] = {
>  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
>  			  (mtd->egress.any_matcher));
>  	if (mtd->egress.tbl)
> -		claim_zero(flow_dv_tbl_resource_release(dev,
> -							mtd->egress.tbl));
> +		flow_dv_tbl_resource_release(dev, mtd->egress.tbl);
>  	if (mtd->egress.sfx_tbl)
> -		claim_zero(flow_dv_tbl_resource_release(dev,
> -							mtd-
> >egress.sfx_tbl));
> +		flow_dv_tbl_resource_release(dev, mtd->egress.sfx_tbl);
>  	if (mtd->ingress.color_matcher)
>  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
>  			  (mtd->ingress.color_matcher));
> @@ -8564,11 +8562,9 @@ struct field_modify_info modify_tcp[] = {
>  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
>  			  (mtd->ingress.any_matcher));
>  	if (mtd->ingress.tbl)
> -		claim_zero(flow_dv_tbl_resource_release(dev,
> -							mtd->ingress.tbl));
> +		flow_dv_tbl_resource_release(dev, mtd->ingress.tbl);
>  	if (mtd->ingress.sfx_tbl)
> -		claim_zero(flow_dv_tbl_resource_release(dev,
> -							mtd-
> >ingress.sfx_tbl));
> +		flow_dv_tbl_resource_release(dev, mtd->ingress.sfx_tbl);
>  	if (mtd->transfer.color_matcher)
>  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
>  			  (mtd->transfer.color_matcher));
> @@ -8576,11 +8572,9 @@ struct field_modify_info modify_tcp[] = {
>  		claim_zero(mlx5_glue->dv_destroy_flow_matcher
>  			  (mtd->transfer.any_matcher));
>  	if (mtd->transfer.tbl)
> -		claim_zero(flow_dv_tbl_resource_release(dev,
> -							mtd->transfer.tbl));
> +		flow_dv_tbl_resource_release(dev, mtd->transfer.tbl);
>  	if (mtd->transfer.sfx_tbl)
> -		claim_zero(flow_dv_tbl_resource_release(dev,
> -							mtd-
> >transfer.sfx_tbl));
> +		flow_dv_tbl_resource_release(dev, mtd->transfer.sfx_tbl);
>  	if (mtd->drop_actn)
>  		claim_zero(mlx5_glue->destroy_flow_action(mtd-
> >drop_actn));
>  	rte_free(mtd);
> --
> 1.8.3.1

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      parent reply	other threads:[~2020-04-21 15:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  8:52 xiangxia.m.yue
2020-04-17  2:02 ` Suanming Mou
2020-04-21  7:47 ` Slava Ovsiienko
2020-04-21 15:02 ` Raslan Darawsheh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR05MB67079B2889392E7D70EE82E2C2D50@AM0PR05MB6707.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=suanmingm@mellanox.com \
    --cc=xiangxia.m.yue@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).