VMX(4)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay so this is VMX(4) from the Kernel Interfaces Manual, and it's literally all about the vmx device β€” the VMware VMXNET3 Virtual Interface Controller. No cap, that's the whole vibe check. πŸ’…


✨ SYNOPSIS ✨

bestie, if you wanna compile this driver into your kernel, you gotta drop these lines into your kernel configuration file:

device iflib
device vmx

or alternatively, if you wanna load it as a module at boot time, just put this line in loader.conf(5):

if_vmx_load="YES"

πŸ’– DESCRIPTION πŸ’–

okay so the vmx driver provides support for the VMXNET3 virtual NIC that's available in virtual machines by VMware. It appears as a simple Ethernet device, but it's actually a virtual network interface to the underlying host operating system. It's giving "not what it looks like" energy, honestly. πŸ¦‹

This driver supports the VMXNET3 driver protocol, as an alternative to the emulated le(4) and em(4) interfaces also available in the VMware environment. The vmx driver is optimized for the virtual machine, and it can provide advanced capabilities depending on the underlying host operating system and the physical network interface controller of the host. Obsessed. πŸ’–

The vmx driver supports features like multiqueue support, IPv6 checksum offloading, MSI/MSI-X support, and hardware VLAN tagging in VMware's VLAN Guest Tagging (VGT) mode. So many slay features, I can't even. ✨

The vmx driver supports VMXNET3 VMware virtual NICs provided by the virtual machine hardware version 7 or newer, as provided by the following products:

  • 🌟 VMware ESX/ESXi 4.0 and newer
  • 🌟 VMware Server 2.0 and newer
  • 🌟 VMware Workstation 6.5 and newer
  • 🌟 VMware Fusion 2.0 and newer

For more information on configuring this device, see ifconfig(8). That's the icon you need for the deep dive. πŸ‘‘


🌈 MULTIPLE QUEUES 🌈

The vmx driver supports multiple transmit and receive queues. Multiple queues are only supported by certain VMware products, such as ESXi. The number of queues allocated depends on the presence of MSI-X, the number of configured CPUs, and the tunables listed below. It's a whole algorithm, iykyk. 🧚

⚠️ heads up bestie: FreeBSD does not enable MSI-X support on VMware by default. The hw.pci.honor_msi_blacklist tunable must be disabled to enable MSI-X support. That's a whole thing, so don't forget it. 😭

πŸŽ€ LOADER TUNABLES πŸŽ€

Tunables can be set at the loader(8) prompt before booting the kernel, or stored in loader.conf(5). Here's the lineup, bestie:

  • hw.vmx.txnqueue and hw.vmx.X.txnqueue β€” Maximum number of transmit queues allocated by default by the driver. The default value is 8. The maximum supported by the VMXNET3 virtual NIC is 8. That's the whole range, no cap. πŸ’…
  • hw.vmx.rxnqueue and hw.vmx.X.rxnqueue β€” Maximum number of receive queues allocated by default by the driver. The default value is 8. The maximum supported by the VMXNET3 virtual NIC is 16. So you can go bigger, periodt. ✨
  • hw.vmx.txndesc and hw.vmx.X.txndesc β€” Number of transmit descriptors allocated by the driver. The default value is 512. The value must be a multiple of 32, and the maximum is 4096. Do the math, bestie. πŸŽ€
  • hw.vmx.rxndesc and hw.vmx.X.rxndesc β€” Number of receive descriptors per ring allocated by the driver. The default value is 256. The value must be a multiple of 32, and the maximum is 2048. There are two rings, so the actual usage is doubled. That's important, fr fr. πŸ“

πŸ”₯ EXAMPLES πŸ”₯

okay so to actually get the vmx device, you gotta add this entry to your VMware configuration file:

ethernet0.virtualDev = "vmxnet3"

That's the whole example. Short and iconic. πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

You should also check out these icons, bestie:

They're all part of the vibe. πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

The vmx driver was ported from OpenBSD and significantly rewritten by Bryan Venteicher <bryanv@freebsd.org>. Shoutout to Bryan for porting and rewriting this β€” literal king behavior. πŸ‘‘ The OpenBSD driver was written by Tsubai Masanari, so respect where it's due. πŸ™Œ


shoutout to Debian for shipping this on December 26, 2020 β€” you're the real MVP for that. πŸ«ΆπŸ’…

πŸ“¦ where this page comes from