From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net-next 4/7] net: sched: gred: store bytesin as a 64 bit value Date: Wed, 14 Nov 2018 22:23:48 -0800 Message-ID: <20181115062351.22763-5-jakub.kicinski@netronome.com> References: <20181115062351.22763-1-jakub.kicinski@netronome.com> Cc: netdev@vger.kernel.org, jiri@resnulli.us, xiyou.wangcong@gmail.com, jhs@mojatatu.com, oss-drivers@netronome.com, Jakub Kicinski To: davem@davemloft.net Return-path: Received: from mail-qk1-f194.google.com ([209.85.222.194]:43785 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728670AbeKOQam (ORCPT ); Thu, 15 Nov 2018 11:30:42 -0500 Received: by mail-qk1-f194.google.com with SMTP id r71so30167825qkr.10 for ; Wed, 14 Nov 2018 22:24:12 -0800 (PST) In-Reply-To: <20181115062351.22763-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: 32 bit counters for bytes are not really going to last long in modern world. Make sch_gred count bytes on a 64 bit counter. It will still get truncated during dump but follow up patch will add set of new stat dump attributes. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley --- net/sched/sch_gred.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c index 3d7bd374b303..6f209c83ee7a 100644 --- a/net/sched/sch_gred.c +++ b/net/sched/sch_gred.c @@ -35,7 +35,7 @@ struct gred_sched; struct gred_sched_data { u32 limit; /* HARD maximal queue length */ u32 DP; /* the drop parameters */ - u32 bytesin; /* bytes seen on virtualQ so far*/ + u64 bytesin; /* bytes seen on virtualQ so far*/ u32 packetsin; /* packets seen on virtualQ so far*/ u32 backlog; /* bytes on the virtualQ */ u8 prio; /* the prio of this vq */ -- 2.17.1