Skip to contentSkip to conversation

net: sched: pie: enable timestamp based delay calculation

PATCH Applied Gautam Ramakrishnan 2 participants 2 messages Nov 20, 2019

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

PATCH v2 1/1 net: sched: pie: enable timestamp based delay calculation

RFC 8033 suggests an alternative approach to calculate the queue delay in PIE by using a timestamp on every enqueued packet. This patch adds an implementation of that approach and sets it as the default method to calculate queue delay. The previous method (based on Little's law) to calculate queue delay is set as optional.

---
Changes from v1 to v2:
- Made timestamp feature default and made average dequeue rate estimator optional as Recommended by Dave.
- Changed the position of the timestamp qdelay calculation inside pie_process_dequeue().

 include/uapi/linux/pkt_sched.h |  22 +++---
 net/sched/sch_pie.c            | 120 +++++++++++++++++++++++++++------
 2 files changed, 113 insertions(+), 29 deletions(-)
include/uapi/linux/pkt_sched.h +14 -8
index 5011259b8f67..9f1a72876212 100644
@@ -950,19 +950,25 @@ enum {
 	TCA_PIE_BETA,
 	TCA_PIE_ECN,
 	TCA_PIE_BYTEMODE,
+	TCA_PIE_DQ_RATE_ESTIMATOR,
 	__TCA_PIE_MAX
 };
 #define TCA_PIE_MAX   (__TCA_PIE_MAX - 1)
 
 struct tc_pie_xstats {
-	__u64 prob;             /* current probability */
-	__u32 delay;            /* current delay in ms */
-	__u32 avg_dq_rate;      /* current average dq_rate in bits/pie_time */
-	__u32 packets_in;       /* total number of packets enqueued */
-	__u32 dropped;          /* packets dropped due to pie_action */
-	__u32 overlimit;        /* dropped due to lack of space in queue */
-	__u32 maxq;             /* maximum queue size */
-	__u32 ecn_mark;         /* packets marked with ecn*/
+	__u64 prob;			/* current probability */
+	__u32 delay;			/* current delay in ms */
+	__u32 avg_dq_rate;		/* current average dq_rate in
+					 * bits/pie_time
+					 */
+	__u32 dq_rate_estimating;	/* is avg_dq_rate being calculated? */
+	__u32 packets_in;		/* total number of packets enqueued */
+	__u32 dropped;			/* packets dropped due to pie_action */
+	__u32 overlimit;		/* dropped due to lack of space
+					 * in queue
+					 */
+	__u32 maxq;			/* maximum queue size */
+	__u32 ecn_mark;			/* packets marked with ecn*/
 };
 
 /* CBS */
net/sched/sch_pie.c +99 -21

225 lines not on this page · raw message

Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

From: Gautam Ramakrishnan <[email protected]>
Date: Wed, 20 Nov 2019 19:43:54 +0530

Quoted 10 lines

RFC 8033 suggests an alternative approach to calculate the queue delay in PIE by using a timestamp on every enqueued packet. This patch adds an implementation of that approach and sets it as the default method to calculate queue delay. The previous method (based on Little's law) to calculate queue delay is set as optional.

Quoted 6 lines

---
Changes from v1 to v2:
- Made timestamp feature default and made average dequeue rate estimator optional as Recommended by Dave.
- Changed the position of the timestamp qdelay calculation inside pie_process_dequeue().

Applied.