Series

Linux networking internals

Posts from my SCaLE 22x talk on how Linux handles packets, from interrupts and NAPI up to sk_buff and qdiscs, plus DPDK and SR-IOV.

Watch the talk About the talk

Part 1 — Interrupts, rings, DMA and NAPI

· 6 min read

Sending and receiving packets on Linux mostly just works, so most of us never look at how it's done. That changes once you're chasing packet drops or latency on a busy server. Almost every step between the NIC and your…

Part 2 — RSS, RPS and RFS

· 4 min read

At the end of part 1 we had one CPU doing all of the receive work on a single-queue NIC. It takes the interrupt, runs the NAPI poll and pushes every packet up the stack on its own. Servers have dozens of cores these…

Part 3 — sk_buff, qdiscs and the packet path

· 4 min read

The NIC driver has come up a few times in this series already. It's the part of the kernel that actually talks to the card, and it's where a received packet first turns into an sk_buff.

Part 4 — Small packets, VFIO, OVS-DPDK and SR-IOV

· 6 min read

Almost all the work we followed in part 3 is done once per packet, no matter how big the packet is. With small packets, and with VMs, that cost adds up quickly, and the usual answer is to take the host kernel out of the…