Date: Wed, 2 Jun 2021 03:40:10 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 6ee59ffb5ba1 - stable/13 - Fix packet cbs/ebs conversion. Message-ID: <202106020340.1523eAmi017488@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=6ee59ffb5ba17e737bd9c58940f2d68e0e496091 commit 6ee59ffb5ba17e737bd9c58940f2d68e0e496091 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-05-19 15:00:21 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-06-02 03:40:05 +0000 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) --- sys/netgraph/ng_car.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netgraph/ng_car.c b/sys/netgraph/ng_car.c index 9474e2467439..ec61a3565ec9 100644 --- a/sys/netgraph/ng_car.c +++ b/sys/netgraph/ng_car.c @@ -491,14 +491,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) ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106020340.1523eAmi017488>