patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Yongseok Koh <yskoh@mellanox.com>
Cc: adrien.mazarguil@6wind.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-stable] [PATCH] net/mlx5: fix parsing all-multicast from flow item
Date: Thu, 11 Jan 2018 09:20:38 +0100	[thread overview]
Message-ID: <20180111082038.fh7m4dkrqdy4rp64@laranjeiro-vm.dev.6wind.com> (raw)
In-Reply-To: <20180111075153.33537-1-yskoh@mellanox.com>

On Wed, Jan 10, 2018 at 11:51:53PM -0800, Yongseok Koh wrote:
> As the dst_mac of allmulti is already masked with the mask, it has 0x01 in
> the first octet. Checking the least significant bit only can't distinguish
> it from broadcast or IPv6 multicast.
>
> Fixes: bb47fb6e6067 ("net/mlx5: fix flow type for allmulti rules")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  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 305b2ec01..d01c8069b 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -1281,7 +1281,7 @@ mlx5_flow_create_eth(const struct rte_flow_item *item,
>  		eth.val.ether_type &= eth.mask.ether_type;
>  	}
>  	mlx5_flow_create_copy(parser, &eth, eth_size);
> -	parser->allmulti = eth.val.dst_mac[0] & 1;
> +	parser->allmulti = eth.val.dst_mac[0] == 0x01;
>  	return 0;
>  }
>  
> -- 
> 2.11.0
> 

Seems you are introducing a bug, for broadcast Mac addresses, this will
not work i.e. 0xff != 0x01 but it as the multicast bit set.  From my
understanding, Verbs flow attribute must also be modified in such
situation.

Are you sure about this change?

Thanks,

-- 
Nélio Laranjeiro
6WIND

  reply	other threads:[~2018-01-11  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11  7:51 Yongseok Koh
2018-01-11  8:20 ` Nélio Laranjeiro [this message]
2018-01-12 22:36   ` Yongseok Koh

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=20180111082038.fh7m4dkrqdy4rp64@laranjeiro-vm.dev.6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=yskoh@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).