Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net I have forgotten to commit this gif(4) MP-ify patch ...
details: https://anonhg.NetBSD.org/src/rev/69a1d377ec0e
branches: trunk
changeset: 354578:69a1d377ec0e
user: knakahara <knakahara%NetBSD.org@localhost>
date: Thu Jun 22 09:26:43 2017 +0000
description:
I have forgotten to commit this gif(4) MP-ify patch for a long time, sorry.
diffstat:
sys/net/if_gif.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 605b5f4d7d0f -r 69a1d377ec0e sys/net/if_gif.c
--- a/sys/net/if_gif.c Thu Jun 22 09:24:02 2017 +0000
+++ b/sys/net/if_gif.c Thu Jun 22 09:26:43 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gif.c,v 1.126 2017/06/01 02:45:14 chs Exp $ */
+/* $NetBSD: if_gif.c,v 1.127 2017/06/22 09:26:43 knakahara Exp $ */
/* $KAME: if_gif.c,v 1.76 2001/08/20 02:01:02 kjc Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.126 2017/06/01 02:45:14 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gif.c,v 1.127 2017/06/22 09:26:43 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -608,7 +608,12 @@
return;
}
- if (__predict_true(pktq_enqueue(pktq, m, 0))) {
+#ifdef GIF_MPSAFE
+ const u_int h = curcpu()->ci_index;
+#else
+ const uint32_t h = pktq_rps_hash(m);
+#endif
+ if (__predict_true(pktq_enqueue(pktq, m, h))) {
ifp->if_ibytes += pktlen;
ifp->if_ipackets++;
} else {
Home |
Main Index |
Thread Index |
Old Index