DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: Wisam Monther <wisamm@mellanox.com>,
	"dev@dpdk.org" <dev@dpdk.org>, Dekel Peled <dekelp@mellanox.com>,
	Slava Ovsiienko <viacheslavo@mellanox.com>
Cc: Moti Haimovsky <motih@mellanox.com>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix set VLAN vid size check
Date: Mon, 4 May 2020 07:51:03 +0000	[thread overview]
Message-ID: <AM0PR05MB67071CE06D58DE492E670BA9C2A60@AM0PR05MB6707.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20200430083103.10320-1-wisamm@mellanox.com>

Hi,

> -----Original Message-----
> From: Wisam Monther <wisamm@mellanox.com>
> Sent: Thursday, April 30, 2020 11:31 AM
> To: dev@dpdk.org; Dekel Peled <dekelp@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; Raslan Darawsheh <rasland@mellanox.com>
> Cc: Moti Haimovsky <motih@mellanox.com>; stable@dpdk.org
> Subject: [PATCH] net/mlx5: fix set VLAN vid size check
> 
> All comparison should be done in CPU endianness, otherwise
> it will not give right results.
> 
> for example:
> 255 after converting into RTE_BE16 will be biger than 4096 after
> converting into RTE_BE16.
> 
> Fixes: a5f2da0b816b ("net/mlx5: support modify VLAN ID on new VLAN
> header")
> Cc: motih@mellanox.com
> Cc: stable@dpdk.org backport
> 
> Signed-off-by: Wisam Jaddo <wisamm@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow_dv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c
> b/drivers/net/mlx5/mlx5_flow_dv.c
> index 6263ecc731..2b88e85248 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -1965,7 +1965,7 @@ flow_dv_validate_action_set_vlan_vid(uint64_t
> item_flags,
>  	const struct rte_flow_action *action = actions;
>  	const struct rte_flow_action_of_set_vlan_vid *conf = action->conf;
> 
> -	if (conf->vlan_vid > RTE_BE16(0xFFE))
> +	if (rte_be_to_cpu_16(conf->vlan_vid) > 0xFFE)
>  		return rte_flow_error_set(error, EINVAL,
>  					  RTE_FLOW_ERROR_TYPE_ACTION,
> action,
>  					  "VLAN VID value is too big");
> --
> 2.17.1


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      parent reply	other threads:[~2020-05-04  7:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-30  8:31 Wisam Jaddo
2020-04-30  8:55 ` Slava Ovsiienko
2020-05-04  7:51 ` 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=AM0PR05MB67071CE06D58DE492E670BA9C2A60@AM0PR05MB6707.eurprd05.prod.outlook.com \
    --to=rasland@mellanox.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=motih@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=viacheslavo@mellanox.com \
    --cc=wisamm@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).