Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/net Pull up following revision(s) (requested by knaka...



details:   https://anonhg.NetBSD.org/src/rev/80ca73f4c6ed
branches:  netbsd-8
changeset: 850760:80ca73f4c6ed
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Jun 30 06:17:51 2017 +0000

description:
Pull up following revision(s) (requested by knakahara in ticket #58):
        sys/net/if_gif.c: revision 1.127
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 1f8d2330603d -r 80ca73f4c6ed sys/net/if_gif.c
--- a/sys/net/if_gif.c  Sun Jun 25 06:34:38 2017 +0000
+++ b/sys/net/if_gif.c  Fri Jun 30 06:17:51 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.126.2.1 2017/06/30 06:17:51 snj 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.126.2.1 2017/06/30 06:17:51 snj 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