From cca1f7a12fab1942b3bbff3dccddb02de14ceac4 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 31 Aug 2020 16:30:52 +0000 Subject: [PATCH] mlx5 sriov: add error message for failed MAC programming on VF. Sponsored by: Mellanox Technologies - Nvidia MFC after: 1 week --- sys/dev/mlx5/mlx5_core/mlx5_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index d864a44198d..54423c35a2a 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -1839,6 +1839,11 @@ mlx5_iov_add_vf(device_t dev, uint16_t vfnum, const nvlist_t *vf_config) &mac_size); error = -mlx5_eswitch_set_vport_mac(priv->eswitch, vfnum + 1, __DECONST(u8 *, mac)); + if (error != 0) { + mlx5_core_err(core_dev, + "setting MAC for VF %d failed, error %d\n", + vfnum + 1, error); + } } error = -mlx5_eswitch_set_vport_state(priv->eswitch, vfnum + 1,