Module Name: src
Committed By: msaitoh
Date: Fri Aug 10 07:20:59 UTC 2018
Modified Files:
src/sys/netinet: wqinput.c
Log Message:
Change the type of wqinput's drop counter to uint64_t. OK'd by ozaki-r@.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/netinet/wqinput.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet/wqinput.c
diff -u src/sys/netinet/wqinput.c:1.4 src/sys/netinet/wqinput.c:1.5
--- src/sys/netinet/wqinput.c:1.4 Sat Feb 24 07:37:09 2018
+++ src/sys/netinet/wqinput.c Fri Aug 10 07:20:59 2018
@@ -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_AR
{
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, s
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)