SVNews r318511

NOTE: This service is experimental and subject to change! Use at your own risk!

2017-05-19 01:23:06 - r318511 by truckman (Don Lewis)

Complete list of files affected by revision r318511:

(Note: At the moment, these links point to ViewVC on svn.freebsd.org. They are probably slow. Do not overuse.)

  History   Contents   Diff   MODIFY   /head/sys/netpfil/ipfw/dn_aqm_pie.c  
  History   Contents   Diff   MODIFY   /head/sys/netpfil/ipfw/dn_sched_fq_pie.c  

Commit message:

The result of right shifting a negative signed value is implementation
defined. On machines without arithmetic shift instructions, zero bits
may be shifted in from the left, giving a large positive result instead
of the desired divide-by power-of-2. Fix this by operating on the
absolute value and compensating for the possible negation later.

Reverse the order of the underflow/overflow tests and the exponential
decay calculation to avoid the possibility of an erroneous overflow
detection if p is a sufficiently small non-negative value. Also
check for negative values of prob before doing the exponential decay
to avoid another instance of of right shifting a negative value.

Tested by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
MFC after: 1 week

 


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 18 ms, 2 files printed. Current time is 2017-12-17 06:01:41. All times are in UTC/GMT.