patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Slava Ovsiienko <viacheslavo@mellanox.com>
To: Suanming Mou <suanmingm@mellanox.com>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"xiangxia.m.yue@gmail.com" <xiangxia.m.yue@gmail.com>,
	Raslan Darawsheh <rasland@mellanox.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH v2] net/mlx5: fix incorrect pointer operation in meter
Date: Mon, 20 Jan 2020 13:08:24 +0000	[thread overview]
Message-ID: <AM4PR05MB32650D716ABDB64145CF5D57D2320@AM4PR05MB3265.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1578480070-160606-1-git-send-email-suanmingm@mellanox.com>

> -----Original Message-----
> From: Suanming Mou <suanmingm@mellanox.com>
> Sent: Wednesday, January 8, 2020 12:41
> To: Matan Azrad <matan@mellanox.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Slava Ovsiienko <viacheslavo@mellanox.com>
> Cc: dev@dpdk.org; xiangxia.m.yue@gmail.com; Raslan Darawsheh
> <rasland@mellanox.com>; stable@dpdk.org
> Subject: [PATCH v2] net/mlx5: fix incorrect pointer operation in meter
> 
> The meter suffix flow item pointer restore is not correct to decrease a fixed
> value. The incorrect operation will cause incorrect match to the meter suffix
> flow, the flow create will fail once the magic number in the wrong offset
> memory start with RTE_FLOW_ITEM_TYPE_END.
> The pointer should decrease the real offset it increases.
> 
> Set the decrease value to the real offset the pointer increases to fix the issue.
> 
> Fixes: 9ea9b049a960 ("net/mlx5: split meter flow")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
> Reported-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>

> ---
> 
> v2: commit message adjust.
> 
> ---
>  drivers/net/mlx5/mlx5_flow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index cb9d265..52ffcb2 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -4037,7 +4037,7 @@ uint32_t mlx5_flow_adjust_priority(struct
> rte_eth_dev *dev, int32_t priority,
>  			sfx_items++;
>  		}
>  		sfx_items->type = RTE_FLOW_ITEM_TYPE_END;
> -		sfx_items -= METER_SUFFIX_ITEM;
> +		sfx_items -= sfx_port_id_item ? 2 : 1;
>  		/* Setting the sfx group atrr. */
>  		sfx_attr.group = sfx_attr.transfer ?
>  				(MLX5_FLOW_TABLE_LEVEL_SUFFIX - 1) :
> --
> 1.8.3.1


  reply	other threads:[~2020-01-20 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07  8:56 [dpdk-stable] [PATCH] net/mlx5: fix incorrect pointer operation Suanming Mou
2020-01-07 14:29 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2020-01-08 10:41 ` [dpdk-stable] [PATCH v2] net/mlx5: fix incorrect pointer operation in meter Suanming Mou
2020-01-20 13:08   ` Slava Ovsiienko [this message]
2020-01-20 14:03   ` Raslan Darawsheh

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=AM4PR05MB32650D716ABDB64145CF5D57D2320@AM4PR05MB3265.eurprd05.prod.outlook.com \
    --to=viacheslavo@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=rasland@mellanox.com \
    --cc=shahafs@mellanox.com \
    --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).