[PATCH v9 5/5] net/mlx5: accept more unicast MAC addresses
Raslan Darawsheh
rasland at nvidia.com
Tue Sep 29 14:50:53 CEST 2026
Acked-by: Raslan Darawsheh <rasland at nvidia.com>
I'll squash the following fixup into this patch during merge, to handle
non-DevX devices (where mlx5_os_capabilities_prepare() would otherwise
return before max_uc_mac_addrs/max_mc_mac_addrs/max_mac_addrs get set,
leaving them at 0):
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 9180e9aa20..7c2c35c945 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -325,6 +325,16 @@ mlx5_os_capabilities_prepare(struct mlx5_dev_ctx_shared *sh)
DRV_LOG(WARNING,
"Tunnel offloading disabled due to old OFED/rdma-core version");
#endif
+ if (hca_attr->log_max_current_uc_list > 0)
+ sh->dev_cap.max_uc_mac_addrs = RTE_BIT32(hca_attr->log_max_current_uc_list);
+ else
+ sh->dev_cap.max_uc_mac_addrs = MLX5_MAX_UC_MAC_ADDRESSES;
+ if (hca_attr->log_max_current_mc_list > 0)
+ sh->dev_cap.max_mc_mac_addrs = RTE_BIT32(hca_attr->log_max_current_mc_list);
+ else
+ sh->dev_cap.max_mc_mac_addrs = MLX5_MAX_MC_MAC_ADDRESSES;
+ sh->dev_cap.max_mac_addrs =
+ sh->dev_cap.max_uc_mac_addrs + sh->dev_cap.max_mc_mac_addrs;
if (!sh->cdev->config.devx)
return 0;
/* Check capabilities for Packet Pacing. */
@@ -389,16 +399,6 @@ mlx5_os_capabilities_prepare(struct mlx5_dev_ctx_shared *sh)
sh->dev_cap.esw_info.regc_mask = 0;
#endif
sh->dev_cap.esw_info.is_set = 1;
- if (hca_attr->log_max_current_uc_list > 0)
- sh->dev_cap.max_uc_mac_addrs = RTE_BIT32(hca_attr->log_max_current_uc_list);
- else
- sh->dev_cap.max_uc_mac_addrs = MLX5_MAX_UC_MAC_ADDRESSES;
- if (hca_attr->log_max_current_mc_list > 0)
- sh->dev_cap.max_mc_mac_addrs = RTE_BIT32(hca_attr->log_max_current_mc_list);
- else
- sh->dev_cap.max_mc_mac_addrs = MLX5_MAX_MC_MAC_ADDRESSES;
- sh->dev_cap.max_mac_addrs =
- sh->dev_cap.max_uc_mac_addrs + sh->dev_cap.max_mc_mac_addrs;
return 0;
}
Thanks,
Raslan
More information about the dev
mailing list