diff options
author | Alexander Motin <mav@FreeBSD.org> | 2021-05-19 15:00:21 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2021-06-02 03:40:50 +0000 |
commit | 52e8b06277847d9332d3678c01f185a3cce3ec28 (patch) | |
tree | 0e36111f02b060227426dcca0984a88e584d998c | |
parent | db3515d03dda585d6147fbd1cb502c0b040a2a9d (diff) | |
download | src-52e8b06277847d9332d3678c01f185a3cce3ec28.tar.gz src-52e8b06277847d9332d3678c01f185a3cce3ec28.zip |
Fix packet cbs/ebs conversion.
Each packet is counted as 128 bytes by the code, not 125. Not sure
what I was thinking about here 14 years ago. May be just a typo.
Reported by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks
(cherry picked from commit 4a6830761c6552bfe2c118a73a5a461694cb84c7)
-rw-r--r-- | sys/netgraph/ng_car.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netgraph/ng_car.c b/sys/netgraph/ng_car.c index d3ac2b7042a4..6c814870e65d 100644 --- a/sys/netgraph/ng_car.c +++ b/sys/netgraph/ng_car.c @@ -492,14 +492,14 @@ ng_car_rcvmsg(node_p node, item_p item, hook_p lasthook) if (bconf->downstream.opt & NG_CAR_COUNT_PACKETS) { bconf->downstream.cir *= 1024; bconf->downstream.pir *= 1024; - bconf->downstream.cbs *= 125; - bconf->downstream.ebs *= 125; + bconf->downstream.cbs *= 128; + bconf->downstream.ebs *= 128; } if (bconf->upstream.opt & NG_CAR_COUNT_PACKETS) { bconf->upstream.cir *= 1024; bconf->upstream.pir *= 1024; - bconf->upstream.cbs *= 125; - bconf->upstream.ebs *= 125; + bconf->upstream.cbs *= 128; + bconf->upstream.ebs *= 128; } if ((bconf->downstream.cir > 1000000000) || (bconf->downstream.pir > 1000000000) || |