Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Fix net.*.rps_hash=toeplitz-othercpus on one CPU sys...
details: https://anonhg.NetBSD.org/src/rev/5d3070b888a0
branches: trunk
changeset: 1029076:5d3070b888a0
user: knakahara <knakahara%NetBSD.org@localhost>
date: Tue Dec 21 04:09:32 2021 +0000
description:
Fix net.*.rps_hash=toeplitz-othercpus on one CPU systems.
diffstat:
sys/net/pktqueue.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 572a31a35b24 -r 5d3070b888a0 sys/net/pktqueue.c
--- a/sys/net/pktqueue.c Mon Dec 20 23:05:55 2021 +0000
+++ b/sys/net/pktqueue.c Tue Dec 21 04:09:32 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pktqueue.c,v 1.15 2021/12/15 07:47:22 knakahara Exp $ */
+/* $NetBSD: pktqueue.c,v 1.16 2021/12/21 04:09:32 knakahara Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.15 2021/12/15 07:47:22 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v 1.16 2021/12/21 04:09:32 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -284,6 +284,9 @@
{
uint32_t hash;
+ if (ncpu == 1)
+ return 0;
+
hash = pktq_rps_hash_toeplitz(m);
hash %= ncpu - 1;
if (hash >= cpu_index(curcpu()))
Home |
Main Index |
Thread Index |
Old Index