Debian Codegraph @

upstream/debian-unstable/man8/tc-skbprio.8

raw
1 .TH SKBPRIO 8 "13 August 2018" "iproute2" "Linux"
2 .SH NAME
3 skbprio \- SKB Priority Queue
4
5 .SH SYNOPSIS
6 .B tc qdisc ... add skbprio
7 .B [ limit
8 packets
9 .B ]
10
11 .SH DESCRIPTION
12 SKB Priority Queue is a queueing discipline intended to prioritize
13 the most important packets during a denial-of-service (
14 .B DoS
15 ) attack. The priority of a packet is given by
16 .B skb->priority
17 , where a higher value places the packet closer to the exit of the queue. When
18 the queue is full, the lowest priority packet in the queue is dropped to make
19 room for the packet to be added if it has higher priority. If the packet to be
20 added has lower priority than all packets in the queue, it is dropped.
21
22 Without SKB priority queue, queue length limits must be imposed
23 on individual sub-queues, and there is no straightforward way to enforce
24 a global queue length limit across all priorities. SKBprio queue enforces
25 a global queue length limit while not restricting the lengths of
26 individual sub-queues.
27
28 While SKB Priority Queue is agnostic to how
29 .B skb->priority
30 is assigned. A typical use case is to copy
31 the 6-bit DS field of IPv4 and IPv6 packets using
32 .BR tc-skbedit (8).
33 If
34 .B skb->priority
35 is greater or equal to 64, the priority is assumed to be 63.
36 Priorities less than 64 are taken at face value.
37
38 SKB Priority Queue enables routers to locally decide which
39 packets to drop under a DoS attack.
40 Priorities should be assigned to packets such that the higher the priority,
41 the more expected behavior a source shows.
42 So sources have an incentive to play by the rules.
43
44 .SH ALGORITHM
45
46 Skbprio maintains 64 lists (priorities go from 0 to 63).
47 When a packet is enqueued, it gets inserted at the
48 .B tail
49 of its priority list. When a packet needs to be sent out to the network, it is
50 taken from the head of the highest priority list. When the queue is full,
51 the packet at the tail of the lowest priority list is dropped to serve the
52 ingress packet - if it is of higher priority, otherwise the ingress packet is
53 dropped. This algorithm allocates as much bandwidth as possible to high
54 priority packets, while only servicing low priority packets when
55 there is enough bandwidth.
56
57 .SH PARAMETERS
58 .TP
59 limit
60 Maximum queue size specified in packets. It defaults to 64.
61 The range for this parameter is [0, UINT32_MAX].
62
63 .SH SEE ALSO
64 .BR tc-prio (8),
65 .BR tc-skbedit (8)
66
67 .SH AUTHORS
68 Nishanth Devarajan <[email protected]>, Michel Machado <[email protected]>
69
70 This manpage maintained by Bert Hubert <[email protected]>