• ↑↓ to navigate
  • ↵ to open
  • ⟶ to select
  • ⌘ ⌥ ↵ to open in a panel
  • ←→ to navigate
  • esc to dismiss
⌘ '
keyboard shortcuts

The Problem

Network devices transfer data in packets (variable-sized frames) and must handle addressing (MAC), protocol headers, and often checksum offloading. Standard block/character drivers don’t fit.

Core Idea

A network driver manages network interface cards (NICs), handling packet send/receive, DMA for packet buffers, and often hardware acceleration (checksum, TSO).

How It Works

  1. OS passes packet (with headers) to driver for transmission
  2. Driver sets up DMA descriptor for packet buffer
  3. NIC DMAs packet from memory, adds PHY header, transmits
  4. On receive, NIC DMAs packet to memory, raises interrupt
  5. Driver passes packet up to network stack
net_driver Stack Network Stack (TCP/IP) NDriver Network Driver DMA descriptors checksum offload Stack->NDriver packet to send NDriver->Stack received packet NIC NIC packet buffers NDriver->NIC DMA setup NIC->NDriver interrupt Wire Network Cable (Wire) NIC->Wire transmit Wire->NIC receive

Key Properties

  • Packet-based (variable size, unlike fixed blocks)
  • Often uses DMA rings (multiple packet buffers queued)
  • Hardware acceleration: checksum offload, TSO, RSS
  • Examples: Ethernet driver, Wi-Fi driver, InfiniBand driver

Semantic Network

semantic_Network_Driver THIS Network Driver REL1 Related Concept THIS--REL1 related REL2 Builds Into THIS--REL2 builds into

Connections

Edge Cases & Gotchas

  • Packet drop under high load (driver must handle ring exhaustion)
  • DMA mapping must handle scattered packet buffers (SG DMA)
  • Some NICs have buggy offload features — may need disabling