patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: Suanming Mou <suanmingm@mellanox.com>,
	Matan Azrad <matan@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"xiangxia.m.yue@gmail.com" <xiangxia.m.yue@gmail.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 14:03:21 +0000
Message-ID: <AM0PR05MB67070DFA488E84DF53F5CA46C2320@AM0PR05MB6707.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1578480070-160606-1-git-send-email-suanmingm@mellanox.com>

Hi,

> -----Original Message-----
> From: Suanming Mou <suanmingm@mellanox.com>
> Sent: Wednesday, January 8, 2020 12:41 PM
> 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>
> ---
> 
> 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

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      parent reply	other threads:[~2020-01-20 14:03 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
2020-01-20 14:03   ` 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=AM0PR05MB67070DFA488E84DF53F5CA46C2320@AM0PR05MB6707.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@mellanox.com \
    --cc=viacheslavo@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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git