The current implementation scales the local alpha and beta variables in the calculate_probability function by the same amount for all values of drop probability below 1%. RFC 8033 suggests using additional cases for auto-tuning alpha and beta when the drop probability is less than 1%. In order to add more auto-tuning cases, MAX_PROB must be scaled by u64 instead of u32 to prevent underflow when scaling the local alpha and beta variables in the calculate_probability function.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -954,7 +954,7 @@ enum { · 953 unmodified lines | |||
| 954 | #define TCA_PIE_MAX (__TCA_PIE_MAX - 1) | 954 | #define TCA_PIE_MAX (__TCA_PIE_MAX - 1) |
| 955 | 955 | ||
| 956 | struct tc_pie_xstats { | 956 | struct tc_pie_xstats { |
| 957 | __u32 prob; /* current probability */ | 957 | __u64 prob; /* current probability */ |
| 958 | __u32 delay; /* current delay in ms */ | 958 | __u32 delay; /* current delay in ms */ |
| 959 | __u32 avg_dq_rate; /* current average dq_rate in bits/pie_time */ | 959 | __u32 avg_dq_rate; /* current average dq_rate in bits/pie_time */ |
| 960 | __u32 packets_in; /* total number of packets enqueued */ | 960 | __u32 packets_in; /* total number of packets enqueued */ |