Writing [Feed] About Pub

The mac-loopback Data Path

19 Aug 2019

When a frame is sent from one VNIC to another, does it go across the wire? The answer: it depends! In illumos-based operating systems, like SmartOS, we have a special-case data path for Ethernet frames called the mac-loopback data path. This data path is a shortcut taken between two VNICs when they share an underlying mac device (NIC). It avoids sending the frame down to the NIC driver, performing a DMA bind, and interrupting the NIC device -- only to have the frame come right back up the same way it arrived. In this post I'll go over the network data path a bit and explain the mac-loopback path in more detail.

First, a whirlwind tour of the network Tx path. Just like the OSI seven-layer network cake, the illumos networking stack is built in layers of kernel modules. At the top is the sockfs module; it's a mixture of uio and mblk frosting.

This is UNIX™, so what better way to top of the cake than with some sweet filesystem frosting! This layer converts the user data requests stored in uio_t structures into kernel message blocks mblk_t. These mblks are then passed
The ip module is a thick layer of cake. It includes things like TCP, IP, ARP,
NIC driver
NIC hardware