patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Shahaf Shuler <shahafs@mellanox.com>
To: Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix flow counters deletion in Verbs
Date: Sun, 28 Oct 2018 12:53:26 +0000	[thread overview]
Message-ID: <DB7PR05MB4426E9D211CC6D2D26572097C3F20@DB7PR05MB4426.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1540637629-9233-1-git-send-email-viacheslavo@mellanox.com>

Saturday, October 27, 2018 1:54 PM¸ Slava Ovsiienko:
> Subject: [PATCH] net/mlx5: fix flow counters deletion in Verbs
> 
> The Flow counters created with Verbs are erroneously destroyed in Flow
> remove function (flow_verbs_remove()). Counter Verbs handles stored in
> the translated rule buffer become invalid.
> If rule is reapplied with these invalid counter handles the driver hangs.
> 
> The counter should be destroyed with Verbs in the Flow destroy function.
> The Flow remove function should keep counters intact.
> 
> Fixes: 60bd8c9747e8 ("net/mlx5: add count flow action")
> Cc: stable@dpdk.org
> 

Very nice commit log.

> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

Acked-by: Shahaf Shuler <shahafs@mellanox.com>

Applied to next-net-mlx, thanks. 

> ---
>  drivers/net/mlx5/mlx5_flow_verbs.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c
> b/drivers/net/mlx5/mlx5_flow_verbs.c
> index 81bc39f..2e506b9 100644
> --- a/drivers/net/mlx5/mlx5_flow_verbs.c
> +++ b/drivers/net/mlx5/mlx5_flow_verbs.c
> @@ -1669,10 +1669,6 @@
>  			verbs->hrxq = NULL;
>  		}
>  	}
> -	if (flow->counter) {
> -		flow_verbs_counter_release(flow->counter);
> -		flow->counter = NULL;
> -	}
>  }
> 
>  /**
> @@ -1696,6 +1692,10 @@
>  		LIST_REMOVE(dev_flow, next);
>  		rte_free(dev_flow);
>  	}
> +	if (flow->counter) {
> +		flow_verbs_counter_release(flow->counter);
> +		flow->counter = NULL;
> +	}
>  }
> 
>  /**
> --
> 1.8.3.1

      reply	other threads:[~2018-10-28 12:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1540289032-29628-9-git-send-email-viacheslavo@mellanox.com>
2018-10-27 10:54 ` Slava Ovsiienko
2018-10-28 12:53   ` Shahaf Shuler [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=DB7PR05MB4426E9D211CC6D2D26572097C3F20@DB7PR05MB4426.eurprd05.prod.outlook.com \
    --to=shahafs@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@mellanox.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).