Change the type of wqinput's drop counter to uint64_t. OK'd by ozaki-r@.

This commit is contained in:
msaitoh 2018-08-10 07:20:59 +00:00
parent 3b4bbaf4c5
commit da99216a7e
1 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wqinput.c,v 1.4 2018/02/24 07:37:09 ozaki-r Exp $ */
/* $NetBSD: wqinput.c,v 1.5 2018/08/10 07:20:59 msaitoh Exp $ */
/*-
* Copyright (c) 2017 Internet Initiative Japan Inc.
@ -62,7 +62,7 @@ struct wqinput_worklist {
struct wqinput_work *wwl_head;
struct wqinput_work *wwl_tail;
unsigned int wwl_len;
unsigned long wwl_dropped;
uint64_t wwl_dropped;
struct work wwl_work;
bool wwl_wq_is_active;
};
@ -81,7 +81,7 @@ static void
wqinput_drops(void *p, void *arg, struct cpu_info *ci __unused)
{
struct wqinput_worklist *const wwl = p;
int *sum = arg;
uint64_t *sum = arg;
*sum += wwl->wwl_dropped;
}
@ -91,7 +91,7 @@ wqinput_sysctl_drops_handler(SYSCTLFN_ARGS)
{
struct sysctlnode node;
struct wqinput *wqi;
int sum = 0;
uint64_t sum = 0;
int error;
node = *rnode;
@ -135,7 +135,7 @@ wqinput_sysctl_setup(const char *name, struct wqinput *wqi)
goto bad;
error = sysctl_createv(NULL, 0, &rnode, &cnode,
CTLFLAG_PERMANENT, CTLTYPE_INT, "drops",
CTLFLAG_PERMANENT, CTLTYPE_QUAD, "drops",
SYSCTL_DESCR("Total packets dropped due to full input queue"),
wqinput_sysctl_drops_handler, 0, (void *)wqi, 0, CTL_CREATE, CTL_EOL);
if (error != 0)