patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] common/mlx5: fix MAC addresses flush
@ 2020-07-29 14:29 Shiri Kuzin
  2020-07-29 15:12 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Shiri Kuzin @ 2020-07-29 14:29 UTC (permalink / raw)
  To: dev; +Cc: matan, rasland, orika, viacheslavo, stable

mlx5_nl_mac_addr_flush should flush all allocated MAC
addresses.

The MAC addresses array size should be of size
MLX5_MAX_MAC_ADDRESSES, but currently we return without
flushing the addresses if size is MLX5_MAX_MAC_ADDRESSES.

This was fixed by not allowing an array larger than
MLX5_MAX_MAC_ADDRESSES.

Fixes: e9a8ac59b6e2 ("common/mlx5: fix MAC addresses assert")
Cc: stable@dpdk.org

Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/common/mlx5/linux/mlx5_nl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index 8ab7f6b..0ecd9c7 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -790,7 +790,7 @@ struct mlx5_nl_ifindex_data {
 {
 	int i;
 
-	if (n <= 0 || n >= MLX5_MAX_MAC_ADDRESSES)
+	if (n <= 0 || n > MLX5_MAX_MAC_ADDRESSES)
 		return;
 
 	for (i = n - 1; i >= 0; --i) {
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-stable] [PATCH] common/mlx5: fix MAC addresses flush
  2020-07-29 14:29 [dpdk-stable] [PATCH] common/mlx5: fix MAC addresses flush Shiri Kuzin
@ 2020-07-29 15:12 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-07-29 15:12 UTC (permalink / raw)
  To: Shiri Kuzin, dev; +Cc: Matan Azrad, Ori Kam, Slava Ovsiienko, stable

Hi,

> -----Original Message-----
> From: Shiri Kuzin <shirik@mellanox.com>
> Sent: Wednesday, July 29, 2020 5:29 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@mellanox.com>; Raslan Darawsheh
> <rasland@mellanox.com>; Ori Kam <orika@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>; stable@dpdk.org
> Subject: [PATCH] common/mlx5: fix MAC addresses flush
> 
> mlx5_nl_mac_addr_flush should flush all allocated MAC
> addresses.
> 
> The MAC addresses array size should be of size
> MLX5_MAX_MAC_ADDRESSES, but currently we return without
> flushing the addresses if size is MLX5_MAX_MAC_ADDRESSES.
> 
> This was fixed by not allowing an array larger than
> MLX5_MAX_MAC_ADDRESSES.
> 
> Fixes: e9a8ac59b6e2 ("common/mlx5: fix MAC addresses assert")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Shiri Kuzin <shirik@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/common/mlx5/linux/mlx5_nl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/common/mlx5/linux/mlx5_nl.c
> b/drivers/common/mlx5/linux/mlx5_nl.c
> index 8ab7f6b..0ecd9c7 100644
> --- a/drivers/common/mlx5/linux/mlx5_nl.c
> +++ b/drivers/common/mlx5/linux/mlx5_nl.c
> @@ -790,7 +790,7 @@ struct mlx5_nl_ifindex_data {
>  {
>  	int i;
> 
> -	if (n <= 0 || n >= MLX5_MAX_MAC_ADDRESSES)
> +	if (n <= 0 || n > MLX5_MAX_MAC_ADDRESSES)
>  		return;
> 
>  	for (i = n - 1; i >= 0; --i) {
> --
> 1.8.3.1


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 14:29 [dpdk-stable] [PATCH] common/mlx5: fix MAC addresses flush Shiri Kuzin
2020-07-29 15:12 ` Raslan Darawsheh

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://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/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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