Stock Connectx-4 does not play well with external enclosure's 4-lane PCIe.Wanted to echo the "mlx5 is terrible" sentiment. I have a ConnectX-4 in an external enclosure and in my testing it performs worse than my built-in 10 Gigabit port; the ConnectX-4 reads at 641.9 MB/s from a NVMe mirror in my main server where the built-in NIC does 820.1 MB/s. Speeds don't indicate that I'd benefit from a 25Gbe connection regardless, but still a disappointing result.
I get about 15MBit/s with a Connectx4-LX in an OWC enclosure.
Mellanox's linux driver does complain the 4-lane setup is suboptimal.
Atto's TLN3 is a different matter entirely, with the same mlx5 driver on the mac I am getting just under 20Mbit/s with iperf3.
On Win11 I get 22Gbit/s which is near the limit due to Thunderbolt overhead.
On linux is shows up as a PCIe x4 device, no complaints about suboptimal performance

Samba on NVME 2 device mirror, Intel P4500. Blackmagic disk test.
Read speed is about 16Gbps/s











