Linux Kernel Network Structures - gautamramk/FQ-PIE-for-Linux-Kernel GitHub Wiki

Linux Kernel Network Structures

Qdisc

Qdisc (Queueing Discipline) is a structure to represent a scheduler in the linux kernel. It represents the logic which is sandwiched between the Network Layer and FIFO driver queue.

In the linux kernel /net/pkt_sched.h contains the implementation of the required packed scheduling structures. Every queueing discipline has to implement a Qdisc_ops, which contain the functions to handle enqueueing, dequeueing, requeueing and dropping of packets. When a packet has to be enqueued onto the driver queue, the Qdisc's enqueue function is called, and when the Kernel requests a packet from the queue, it calls the dequeue function associated with the Qdisc.

sk_buff

sk_buff (Socket Buffers) are a structure used in the linux kernel to manage network packets. This data structure stores individual packets in kernel space. It also uses a linked list mechanism, i.e stores the address to the next and previous sk_buff structs.