The first network PHY driver written in Rust was set to run on Linux 6.8

The first network PHY driver written in Rust was set to run on Linux 6.8

Since Linux 6.1 when the initial Rust infrastructure was added to the Linux kernel, a lot of other plumbing and housekeeping has since been integrated to enable kernel drivers to be written in the Rust programming language. With the upcoming Linux 6.8 kernel cycle, the first Rust network driver will be introduced.

This week it was merged into net-next.git ahead of the release of Linux 6.8 Landing of the “net-phy-rust” branch.. This features the necessary Rust abstractions for network PHY drivers. There are Rust bindings for the phylib code and other bits needed to enable PHY drivers written in Rust.

This work culminates in adding a Rust version of the Asix PHY driver. The existing ax88796b C driver code has been rewritten in the Rust programming language. The Rust version is equivalent to the C version, which will remain the default unless the user builds the kernel using the Rust version.

the RUST ASIX PHY DRIVER It comes in about 135 lines of Rust code plus various build system parts. The Rust ASIX PHY driver can be enabled using the Kconfig key “AX88796B_RUST_PHY” which will create the driver as ax88796b_rust.

See also  Dell G15 Gaming Laptop: Hands-on from CES 2023

The first network PHY driver written in Rust was set to run on Linux 6.8

The AX88796B driver is used to support the Asix Electronics PHY included in the X-Surf 100 AX88796B package. AX88796B is a 100M Fast Ethernet controller used for embedded and industrial applications from HVAC controls to security systems and other industrial control systems. So this isn’t the most exciting network device (and the device is already supported by a C driver), but this Rust PHY driver is a start and gets the ball rolling on the interfaces/links in place for other secure memory network drivers to be designed going forward. There were other Rust events in the networking subsystem. Look for this new driver in Linux 6.8.

Leave a Reply

Your email address will not be published. Required fields are marked *