freenode
Kernel & Low-Level

Claude builds mlx5 VFIO selftest driver in four days

Jason Gunthorpe submitted a ConnectX selftest series largely generated by Anthropic's model, cutting a job that usually takes months down to about a week.

Jason Gunthorpe of NVIDIA has posted a ten-patch series adding Mellanox ConnectX (mlx5) support to the kernel's VFIO selftests, and he reports that Anthropic's Claude wrote essentially the whole thing in roughly four days.

VFIO selftests need a real PCI device driver that can exercise DMA and MSI under the VFIO userspace framework. The new mlx5 driver does that by programming ConnectX VFs and PFs through the command interface, booting the HCA, and driving an RDMA Write self-loopback queue pair so hardware DMA performs the memory copies the tests require. Completion events can also be armed to deliver MSI-X, covering interrupt paths. Because mlx5 keeps a stable programming ABI, the approach is intended to work from ConnectX-5 through current silicon when firmware allows QP loopback.

Gunthorpe described the series on the netdev list as largely a remix of the existing VFIO mlx5 path in rdma-core, with most of the bulk spent on the notoriously complex device bring-up rather than the data path. He said Claude Code produced the work across about thirty sessions, some 4.5 million output tokens, and thousands of lines of planning notes. He still spent substantial time cleaning and auditing the output, but called the result remarkable: earlier VFIO selftest drivers had typically taken one to two months to write.

The patches also lift mlx5 interface macros and layout definitions into headers the selftest can include without pulling in the full RDMA stack, and they add small tooling helpers for DMA barriers and big-endian MMIO. Several patches carry Reviewed-by or Acked-by tags from David Matlack. Every major change is marked Assisted-by Claude (claude-opus-4.6).

If merged, the work gives VFIO continuous testing a first-class path on widely deployed NVIDIA/Mellanox NICs, and it is an unusually concrete public data point on how far large models can push complex kernel driver bring-up when an experienced maintainer stays in the loop for planning, cleanup, and review.