common/mlx5: fix MAC addresses flush
authorShiri Kuzin <shirik@mellanox.com>
Wed, 29 Jul 2020 14:29:00 +0000 (17:29 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 29 Jul 2020 22:41:24 +0000 (00:41 +0200)
commit4a01fa047b3ecd3fd5a2cd60183f73580eed346d
treee9cb32f574d23259c64f830473dba1952eeece87
parent972a1bf8120d971c04c065221c46c37c266b1f62
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