mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-01 22:50:54 +00:00
Without an admin MAC, the guest's mlx5_core inherits the VF's firmware-default MAC. This MAC differs from the IB port's HCA MAC, so mlx5_ib's GID cache refuses to populate /sys/class/infiniband/mlx5_*/ports/N/gids/*. RoCE then appears active (port = ACTIVE, link_layer = Ethernet) but every verb that needs a GID — RoCEv2 packets, address handles, librdmacm bind — fails silently. Push the CNI-assigned MAC down to the VF as an "admin MAC" via the PF using RTM_SETLINK before the bind-to-vfio-pci step. The firmware applies the admin MAC during the VF reset that accompanies the unbind/rebind cycle, so the guest sees a single consistent MAC across netdev, IB port, and HCA. Best-effort: failures are logged at warn and the existing agent-side MAC reconciliation (rpc.rs::update_interface) remains as a fallback for L2/L3 connectivity. Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com> Assisted-by: Cursor <cursoragent@cursor.com>