Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/altq altq, cbq: don't increment the xmit counter of the ...
details: https://anonhg.NetBSD.org/src/rev/f16cfab9d145
branches: trunk
changeset: 984600:f16cfab9d145
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Jul 13 07:59:48 2021 +0000
description:
altq, cbq: don't increment the xmit counter of the root class twice wrongly
diffstat:
sys/altq/altq_rmclass.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r b63cb6b53412 -r f16cfab9d145 sys/altq/altq_rmclass.c
--- a/sys/altq/altq_rmclass.c Tue Jul 13 06:56:09 2021 +0000
+++ b/sys/altq/altq_rmclass.c Tue Jul 13 07:59:48 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: altq_rmclass.c,v 1.22 2011/11/19 22:51:18 tls Exp $ */
+/* $NetBSD: altq_rmclass.c,v 1.23 2021/07/13 07:59:48 ozaki-r Exp $ */
/* $KAME: altq_rmclass.c,v 1.19 2005/04/13 03:44:25 suz Exp $ */
/*
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: altq_rmclass.c,v 1.22 2011/11/19 22:51:18 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_rmclass.c,v 1.23 2021/07/13 07:59:48 ozaki-r Exp $");
/* #ident "@(#)rm_class.c 1.48 97/12/05 SMI" */
@@ -1251,7 +1251,7 @@
{
int idle, avgidle, pktlen;
int pkt_time, tidle;
- rm_class_t *cl, *borrowed;
+ rm_class_t *cl, *cl0, *borrowed;
rm_class_t *borrows;
struct timeval *nowp;
@@ -1261,6 +1261,7 @@
if ((cl = ifd->class_[ifd->qo_]) == NULL)
return;
+ cl0 = cl;
pktlen = ifd->curlen_[ifd->qo_];
borrowed = ifd->borrowed_[ifd->qo_];
borrows = borrowed;
@@ -1370,7 +1371,7 @@
cl->last_pkttime_ = pkt_time;
#if 1
- if (cl->parent_ == NULL) {
+ if (cl->parent_ == NULL && cl != cl0) {
/* take stats of root class */
PKTCNTR_ADD(&cl->stats_.xmit_cnt, pktlen);
}
Home |
Main Index |
Thread Index |
Old Index