Skip to contentSkip to conversation

tc: add support for FQ-PIE packet scheduler

PATCH New [email protected] 1 participant 1 message Feb 4, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tc: add support for FQ-PIE packet scheduler

From: "Mohit P. Tahiliani" <[email protected]>

This patch adds support for the FQ-PIE packet Scheduler

Principles:
- Packets are classified on flows.
- This is a Stochastic model (as we use a hash, several flows might be hashed to the same slot)
- Each flow has a PIE managed queue.
- Flows are linked onto two (Round Robin) lists,
so that new flows have priority on old ones.
- For a given flow, packets are not reordered.
- Drops during enqueue only.
- ECN capability is off by default.
- ECN threshold (if ECN is enabled) is at 10% by default.
- Uses timestamps to calculate queue delay by default.

Usage:
tc qdisc ... fq_pie [ limit PACKETS ] [ flows NUMBER ]
[ target TIME ] [ tupdate TIME ] [ alpha NUMBER ] [ beta NUMBER ] [ quantum BYTES ] [ memory_limit BYTES ] [ ecn_prob PERCENTAGE ] [ [no]ecn ] [ [no]bytemode ] [ [no_]dq_rate_estimator ]

defaults:
limit: 10240 packets, flows: 1024
target: 15 ms, tupdate: 15 ms (in jiffies)
alpha: 1/8, beta : 5/4
quantum: device MTU, memory_limit: 32 Mb
ecnprob: 10%, ecn: off
bytemode: off, dq_rate_estimator: off

---

Changes from v1 to v2:
- Changed the lisence header to the SPDX for GPLv2

 bash-completion/tc   |  12 +-
 man/man8/tc-fq_pie.8 | 166 ++++++++++++++++++++++
 man/man8/tc.8        |   8 ++
 tc/Makefile          |   1 +
 tc/q_fq_pie.c        | 318 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 503 insertions(+), 2 deletions(-)
 create mode 100644 man/man8/tc-fq_pie.8
 create mode 100644 tc/q_fq_pie.c
bash-completion/tc +10 -2
index fe0d51ec..086cb7f6 100644
@@ -3,8 +3,8 @@
 # Copyright 2016 Quentin Monnet <[email protected]>
 
 QDISC_KIND=' choke codel bfifo pfifo pfifo_head_drop fq fq_codel gred hhf \
-            mqprio multiq netem pfifo_fast pie red rr sfb sfq tbf atm cbq drr \
-            dsmark hfsc htb prio qfq '
+            mqprio multiq netem pfifo_fast pie fq_pie red rr sfb sfq tbf atm \
+            cbq drr dsmark hfsc htb prio qfq '
 FILTER_KIND=' basic bpf cgroup flow flower fw route rsvp tcindex u32 matchall '
 ACTION_KIND=' gact mirred bpf sample '
 
@@ -326,6 +326,14 @@ _tc_qdisc_options()
             _tc_one_of_list 'dq_rate_estimator no_dq_rate_estimator'
             return 0
             ;;
+        fq_pie)
+            _tc_once_attr 'limit flows target tupdate \
+                alpha beta quantum memory_limit ecn_prob'
+            _tc_one_of_list 'ecn noecn'
+            _tc_one_of_list 'bytemode nobytemode'
+            _tc_one_of_list 'dq_rate_estimator no_dq_rate_estimator'
+            return 0
+            ;;
         red)
             _tc_once_attr 'limit min max avpkt burst adaptive probability \
                 bandwidth ecn harddrop'
man/man8/tc-fq_pie.8 new file +166 -0

166 lines not on this page · raw message

man/man8/tc.8 +8 -0
index 39976ad7..e8e0cd0f 100644
@@ -284,6 +284,13 @@ bandwidth to all the flows using the queue. Each such flow is managed by the
 CoDel queuing discipline. Reordering within a flow is avoided since Codel
 internally uses a FIFO queue.
 .TP
+fq_pie
+FQ-PIE (Flow Queuing with Proportional Integral controller Enhanced) is a
+queuing discipline that combines Flow Queuing with the PIE AQM scheme. FQ-PIE
+uses a Jenkins hash function to classify incoming packets into different flows
+and is used to provide a fair share of the bandwidth to all the flows using the
+qdisc. Each such flow is managed by the PIE algorithm.
+.TP
 gred
 Generalized Random Early Detection combines multiple RED queues in order to
 achieve multiple drop priorities. This is required to realize Assured
@@ -855,6 +862,7 @@ was written by Alexey N. Kuznetsov and added in Linux 2.2.
 .BR tc-flower (8),
 .BR tc-fq (8),
 .BR tc-fq_codel (8),
+.BR tc-fq_pie (8),
 .BR tc-fw (8),
 .BR tc-hfsc (7),
 .BR tc-hfsc (8),
tc/Makefile +1 -0
index f06ba14b..e31cbc12 100644
@@ -70,6 +70,7 @@ TCMODULES += q_codel.o
 TCMODULES += q_fq_codel.o
 TCMODULES += q_fq.o
 TCMODULES += q_pie.o
+TCMODULES += q_fq_pie.o
 TCMODULES += q_cake.o
 TCMODULES += q_hhf.o
 TCMODULES += q_clsact.o
tc/q_fq_pie.c new file +318 -0

318 lines not on this page · raw message

Signature · 1 line
2.17.1