Cloudflare

Virtual networking 101: bridging the gap to understanding TAP

Oct 6, 2023Marek Majkowski
Virtual networking 101: bridging the gap to understanding TAP
SummaryAI, from the source post

This post details the technical intricacies of Linux TAP devices, explaining their functionality, setup, and performance tuning. It covers the `tun/tap` interface, device creation via `ioctl` and `/dev/net/tun`, flag options like `IFF_TAP`, `IFF_NO_PI`, and `IFF_VNET_HDR`, and the role of `IFF_NAPI`. It also delves into buffer size management (`txqueuelen`), `virtio_net_hdr` structure, and offloads like `TUN_F_CSUM`, `TUN_F_TSO4`, and `TUN_F_TSO6`, providing practical code examples and insights into potential performance bottlenecks and kernel behaviors.

More from the Edge Computing with Cloudflare Workers trail