* [PATCH iproute2-next] tc: red: allow setting th_min and th_max to the same value
@ 2018-01-16 23:08 Jakub Kicinski
2018-01-19 20:37 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Kicinski @ 2018-01-16 23:08 UTC (permalink / raw)
To: dsahern, stephen; +Cc: netdev, oss-drivers, Jakub Kicinski
Setting th_min and th_max to the same value may be useful for DCTCP
deployments. The original DCTCP paper describes it as a simplest way
of achieving simple ECN threshold marking. Indeed, there doesn't seem
to be any simpler qdisc in Linux which would allow such a setup today.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
---
Or should I go ahead and add a DCTCP qdisc? :)
tc/tc_red.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tc/tc_red.c b/tc/tc_red.c
index 1f82ef1aec65..178fe088f732 100644
--- a/tc/tc_red.c
+++ b/tc/tc_red.c
@@ -30,7 +30,9 @@ int tc_red_eval_P(unsigned int qmin, unsigned int qmax, double prob)
{
int i = qmax - qmin;
- if (i <= 0)
+ if (!i)
+ return 0;
+ if (i < 0)
return -1;
prob /= i;
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2-next] tc: red: allow setting th_min and th_max to the same value
2018-01-16 23:08 [PATCH iproute2-next] tc: red: allow setting th_min and th_max to the same value Jakub Kicinski
@ 2018-01-19 20:37 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2018-01-19 20:37 UTC (permalink / raw)
To: Jakub Kicinski, stephen; +Cc: netdev, oss-drivers
On 1/16/18 3:08 PM, Jakub Kicinski wrote:
> Setting th_min and th_max to the same value may be useful for DCTCP
> deployments. The original DCTCP paper describes it as a simplest way
> of achieving simple ECN threshold marking. Indeed, there doesn't seem
> to be any simpler qdisc in Linux which would allow such a setup today.
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
> Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
> ---
> Or should I go ahead and add a DCTCP qdisc? :)
>
> tc/tc_red.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
applied to iproute2-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-19 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-16 23:08 [PATCH iproute2-next] tc: red: allow setting th_min and th_max to the same value Jakub Kicinski
2018-01-19 20:37 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).