From: Raslan Darawsheh <rasland@mellanox.com>
To: Dekel Peled <dekelp@mellanox.com>,
Matan Azrad <matan@mellanox.com>,
Shahaf Shuler <shahafs@mellanox.com>,
Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: Ori Kam <orika@mellanox.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix verbs flow counter query
Date: Wed, 13 Nov 2019 11:59:09 +0000 [thread overview]
Message-ID: <DB3PR0502MB3964C5773F762A61453B9AC0C2760@DB3PR0502MB3964.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <639b4cebe1b4f8efb2f2e2150eee708575f523d1.1573568296.git.dekelp@mellanox.com>
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Tuesday, November 12, 2019 4:19 PM
> To: Matan Azrad <matan@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Slava Ovsiienko <viacheslavo@mellanox.com>
> Cc: Ori Kam <orika@mellanox.com>; dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/mlx5: fix verbs flow counter query
>
> Function flow_verbs_counter_query() was recently modified.
> The new 'if' condition uses a pointer to flow counter-set.
> This pointer is valid only if flow contains a count action.
>
> This patch adds check to verify the pointer is valid.
>
> Fixes: d85c7b5ea59f ("net/mlx5: split hairpin flows")
> Cc: orika@mellanox.com
>
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> ---
> drivers/net/mlx5/mlx5_flow_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c
> b/drivers/net/mlx5/mlx5_flow_verbs.c
> index ea85fa1..c787c98 100644
> --- a/drivers/net/mlx5/mlx5_flow_verbs.c
> +++ b/drivers/net/mlx5/mlx5_flow_verbs.c
> @@ -191,7 +191,7 @@
> {
> #if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42) || \
> defined(HAVE_IBV_DEVICE_COUNTERS_SET_V45)
> - if (flow->counter->cs) {
> + if (flow->counter && flow->counter->cs) {
> struct rte_flow_query_count *qc = data;
> uint64_t counters[2] = {0, 0};
> #if defined(HAVE_IBV_DEVICE_COUNTERS_SET_V42)
> --
> 1.8.3.1
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
prev parent reply other threads:[~2019-11-13 11:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 14:19 Dekel Peled
2019-11-12 14:21 ` Slava Ovsiienko
2019-11-13 11:59 ` 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=DB3PR0502MB3964C5773F762A61453B9AC0C2760@DB3PR0502MB3964.eurprd05.prod.outlook.com \
--to=rasland@mellanox.com \
--cc=dekelp@mellanox.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.com \
--cc=orika@mellanox.com \
--cc=shahafs@mellanox.com \
--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).