VMX(4)

๐Ÿ’– VMX(4) ๐Ÿ’–

ok bestie, quick vibe check: this is the vmx man page from the Kernel Interfaces Manual, and it's all about the VMware VMXNET3 Virtual Interface Controller device. yeah. we're doing networking today. hydrate. ๐Ÿฅค


โœจ NAME โœจ

vmx โ€” the VMware VMXNET3 Virtual Interface Controller device. that's the whole name. it's giving "i'm a NIC but make it virtual." ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

so you wanna get this driver in your kernel? periodt. drop these lines into your kernel configuration file:

device iflib
device vmx

orrr, if you're more of a "load it at boot like a little gremlin" girlie, put this one line in loader.conf(5):

if_vmx_load="YES"

both paths slay. pick your fighter. ๐Ÿซถ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so the vmx driver is the support system for the VMXNET3 virtual NIC that shows up inside VMware virtual machines. it looks like a cute lil simple Ethernet device but ngl it's actually a virtual network interface talking to the underlying host operating system. main character behavior, honestly. โœจ

this driver runs the VMXNET3 driver protocol, and it's the alternative to the emulated pcn(4) and em(4) interfaces that also exist in the VMware environment. the vmx driver is optimized for the virtual machine โ€” like, it was born for this โ€” and it can deliver advanced capabilities depending on the underlying host operating system and the host's physical network interface controller. it supports features like:

  • multiqueue support
  • IPv6 checksum offloading
  • MSI/MSI-X support
  • hardware VLAN tagging in VMware's VLAN Guest Tagging (VGT) mode

obsessed with the range tbh. ๐Ÿ’œ

the vmx driver supports VMXNET3 VMware virtual NICs provided by virtual machine hardware version 7 or newer, as provided by these 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

and for more info on configuring this device, go see ifconfig(8). iykyk. ๐Ÿ‘‘


๐Ÿ”ฅ MULTIPLE QUEUES ๐Ÿ”ฅ

the vmx driver supports multiple transmit and receive queues. but listen โ€” 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
  • the tunables listed below ๐Ÿ‘‡

here's the tea tho: FreeBSD does not enable MSI-X support on VMware by default. so if you want that MSI-X life, the hw.pci.honor_msi_blacklist tunable must be disabled to enable MSI-X support. no cap. ๐Ÿšจ


๐ŸŽ€ LOADER TUNABLES ๐ŸŽ€

you can set these tunables at the loader(8) prompt before booting the kernel, or store them in loader.conf(5). your call, bestie.

  • hw.vmx.txnqueue
  • 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.

  • hw.vmx.rxnqueue
  • 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.

  • hw.vmx.txndesc
  • 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.

  • hw.vmx.rxndesc
  • 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. and heads up โ€” there are two rings, so the actual usage is doubled. math girlie moment. ๐Ÿงฎโœจ

โš ๏ธ reminder that the descriptor values must be multiples of 32 โ€” don't be out here picking random numbers, it's not that kind of party.

๐ŸŒˆ EXAMPLES ๐ŸŒˆ

to actually provide the vmx device, you must add this entry to the VMware configuration file:

ethernet0.virtualDev = "vmxnet3"

that's it. that's the whole thing. slay. ๐Ÿ’…


โญ SEE ALSO โญ

go read these too, they're all part of the extended universe:


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

the vmx driver was ported from OpenBSD and significantly rewritten by Bryan Venteicher <bryanv@freebsd.org>. and the OpenBSD driver was written by Tsubai Masanari. legends only, fr fr. ๐Ÿซถ


and that's the whole page, bestie ๐Ÿ’œ this lil cutie came out of Debian and it's dated January 30, 2019 โ€” so yeah, it's been serving c*nt since 2019. go forth and vmxnet3 responsibly. byeee~ ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from