]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r315516
authortruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 31 Mar 2017 06:33:20 +0000 (06:33 +0000)
committertruckman <truckman@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 31 Mar 2017 06:33:20 +0000 (06:33 +0000)
commitfee37a8f0bbcd60ef9790d23dc506f6b51be3c8c
tree99f393852adfeca6ff039bdec13d2e0832615d31
parent4f1a77f41d33f222af2554de065300a2c9c4db67
MFC r315516

Change several constants used by the PIE algorithm from unsigned to signed.

 - PIE_MAX_PROB is compared to variable of int64_t and the type promotion
   rules can cause the value of that variable to be treated as unsigned.
   If the value is actually negative, then the result of the comparsion
   is incorrect, causing the algorithm to perform poorly in some
   situations.  Changing the constant to be signed cause the comparision
   to work correctly.

 - PIE_SCALE is also compared to signed values.  Fortunately they are
   also compared to zero and negative values are discarded so this is
   more of a cosmetic fix.

 - PIE_DQ_THRESHOLD is only compared to unsigned values, but it is small
   enough that the automatic promotion to unsigned is harmless.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>

git-svn-id: svn://svn.freebsd.org/base/stable/10@316325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netpfil/ipfw/dn_aqm_pie.h