You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
net: sched: add Flow Queue 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 ]
[ ecnprob 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
Signed-off-by: Mohit P. Tahiliani <tahiliani@nitk.edu.in>
Signed-off-by: Sachin D. Patil <sdp.sachin@gmail.com>
Signed-off-by: V. Saicharan <vsaicharan1998@gmail.com>
Signed-off-by: Mohit Bhasi <mohitbhasi1998@gmail.com>
Signed-off-by: Leslie Monis <lesliemonis@gmail.com>
Signed-off-by: Gautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
5205ea00cd
commit
ec97ecf1eb
@@ -81,9 +81,11 @@ struct pie_stats {
|
||||
/**
|
||||
* struct pie_skb_cb - contains private skb vars
|
||||
* @enqueue_time: timestamp when the packet is enqueued
|
||||
* @mem_usage: size of the skb during enqueue
|
||||
*/
|
||||
struct pie_skb_cb {
|
||||
psched_time_t enqueue_time;
|
||||
u32 mem_usage;
|
||||
};
|
||||
|
||||
static inline void pie_params_init(struct pie_params *params)
|
||||
|
||||
@@ -971,6 +971,37 @@ struct tc_pie_xstats {
|
||||
__u32 ecn_mark; /* packets marked with ecn*/
|
||||
};
|
||||
|
||||
/* FQ PIE */
|
||||
enum {
|
||||
TCA_FQ_PIE_UNSPEC,
|
||||
TCA_FQ_PIE_LIMIT,
|
||||
TCA_FQ_PIE_FLOWS,
|
||||
TCA_FQ_PIE_TARGET,
|
||||
TCA_FQ_PIE_TUPDATE,
|
||||
TCA_FQ_PIE_ALPHA,
|
||||
TCA_FQ_PIE_BETA,
|
||||
TCA_FQ_PIE_QUANTUM,
|
||||
TCA_FQ_PIE_MEMORY_LIMIT,
|
||||
TCA_FQ_PIE_ECN_PROB,
|
||||
TCA_FQ_PIE_ECN,
|
||||
TCA_FQ_PIE_BYTEMODE,
|
||||
TCA_FQ_PIE_DQ_RATE_ESTIMATOR,
|
||||
__TCA_FQ_PIE_MAX
|
||||
};
|
||||
#define TCA_FQ_PIE_MAX (__TCA_FQ_PIE_MAX - 1)
|
||||
|
||||
struct tc_fq_pie_xstats {
|
||||
__u32 packets_in; /* total number of packets enqueued */
|
||||
__u32 dropped; /* packets dropped due to fq_pie_action */
|
||||
__u32 overlimit; /* dropped due to lack of space in queue */
|
||||
__u32 overmemory; /* dropped due to lack of memory in queue */
|
||||
__u32 ecn_mark; /* packets marked with ecn */
|
||||
__u32 new_flow_count; /* count of new flows created by packets */
|
||||
__u32 new_flows_len; /* count of flows in new list */
|
||||
__u32 old_flows_len; /* count of flows in old list */
|
||||
__u32 memory_usage; /* total memory across all queues */
|
||||
};
|
||||
|
||||
/* CBS */
|
||||
struct tc_cbs_qopt {
|
||||
__u8 offload;
|
||||
|
||||
@@ -366,6 +366,19 @@ config NET_SCH_PIE
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config NET_SCH_FQ_PIE
|
||||
depends on NET_SCH_PIE
|
||||
tristate "Flow Queue Proportional Integral controller Enhanced (FQ-PIE)"
|
||||
help
|
||||
Say Y here if you want to use the Flow Queue Proportional Integral
|
||||
controller Enhanced (FQ-PIE) packet scheduling algorithm.
|
||||
For more information, please see https://tools.ietf.org/html/rfc8033
|
||||
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called sch_fq_pie.
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
config NET_SCH_INGRESS
|
||||
tristate "Ingress/classifier-action Qdisc"
|
||||
depends on NET_CLS_ACT
|
||||
|
||||
@@ -59,6 +59,7 @@ obj-$(CONFIG_NET_SCH_CAKE) += sch_cake.o
|
||||
obj-$(CONFIG_NET_SCH_FQ) += sch_fq.o
|
||||
obj-$(CONFIG_NET_SCH_HHF) += sch_hhf.o
|
||||
obj-$(CONFIG_NET_SCH_PIE) += sch_pie.o
|
||||
obj-$(CONFIG_NET_SCH_FQ_PIE) += sch_fq_pie.o
|
||||
obj-$(CONFIG_NET_SCH_CBS) += sch_cbs.o
|
||||
obj-$(CONFIG_NET_SCH_ETF) += sch_etf.o
|
||||
obj-$(CONFIG_NET_SCH_TAPRIO) += sch_taprio.o
|
||||
|
||||
562
net/sched/sch_fq_pie.c
Normal file
562
net/sched/sch_fq_pie.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user