Skip to content

mlx5 driver device configuration#143

Closed
Avtesh29 wants to merge 1 commit intoamazonlinux:mainfrom
Avtesh29:feature/mlx5-support
Closed

mlx5 driver device configuration#143
Avtesh29 wants to merge 1 commit intoamazonlinux:mainfrom
Avtesh29:feature/mlx5-support

Conversation

@Avtesh29
Copy link

Issue #142

Creates a separate network file for mlx5 devices. Adds the mlx5_core driver type to the match for policy routes.

Testing:

  • Built and installed rpm/deb packages for AL2023/Ubuntu respectively
  • Launched AL2023/Ubuntu with package installed into ami
  • For fresh instance, install on existing instance, and reboot --> validated that we see multiple IPs and the correct MTU of 8500 for each secondary interface

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -54,7 +55,7 @@ setup_interfaces() {
unset ID_NET_DRIVER
eval $(udevadm info --export --query=property /sys/class/net/$iface)
case $ID_NET_DRIVER in
ena|ixgbevf|vif)
ena|ixgbevf|vif|mlx5_core)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fyi this may not be necessary and optional because it applies tuning parameters to the kernel.
This has not been tested widely in all instances and not guaranteed to work on your drivers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, it seemed like it wouldn't change much so I included. Although I believe lines 68 and 69 restarting and refreshing the policy routes are necessary for our case.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new 80-ec2-secondary.network only has DHCP=ipv4, UseGateway, and UseMTU, while the existing 80-ec2.network includes a bunch of other settings. Is the reduced config intentional for mlx5 devices? If so, could you document the reasoning?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was intentional as it seemed like those settings were specifically for ena optimizations.

However, reading more it seems like they can be helpful for mlx5 as well (excluding DHCPv6 settings as we currently only support v4). I've included and retested them now

@Avtesh29 Avtesh29 force-pushed the feature/mlx5-support branch from fbf69d1 to e79baef Compare March 23, 2026 05:55
We need to recognize a new device type on our instances. This
device type should be automatically brought up and able to query IMDS
for multiple IPs as is the case for ena. To do this we:

Create a separate network file for mlx5 devices and add the mlx5_core
driver type to the match for policy routes.

Testing:
- Built and installed rpm/deb packages for AL2023/Ubuntu respectively
- Launched AL2023/Ubuntu with package installed into ami
- For fresh instance, install on existing instance, and reboot -->
  validated that we see multiple IPs and the correct MTU of 8500 for
  each secondary interface
@Avtesh29 Avtesh29 force-pushed the feature/mlx5-support branch from e79baef to e39967d Compare March 23, 2026 17:10
@Avtesh29 Avtesh29 closed this Mar 23, 2026
@Avtesh29 Avtesh29 deleted the feature/mlx5-support branch March 23, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants