Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Fix txqueue assignment. Pointed out by yamaguchi...



details:   https://anonhg.NetBSD.org/src/rev/37706d4f6042
branches:  trunk
changeset: 446755:37706d4f6042
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Dec 17 04:14:40 2018 +0000

description:
Fix txqueue assignment. Pointed out by yamaguchi@n.o, thanks.

E.g. When ncpu is six and nqueue is four, the sequence error occurs.

XXX pullup-8

diffstat:

 sys/dev/pci/if_wm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e67eda6f13e7 -r 37706d4f6042 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon Dec 17 04:11:34 2018 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Dec 17 04:14:40 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.605 2018/12/15 05:40:10 msaitoh Exp $      */
+/*     $NetBSD: if_wm.c,v 1.606 2018/12/17 04:14:40 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.605 2018/12/15 05:40:10 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.606 2018/12/17 04:14:40 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -7298,7 +7298,7 @@
         * TODO:
         * distribute by flowid(RSS has value).
         */
-       return (cpuid + ncpu - sc->sc_affinity_offset) % sc->sc_nqueues;
+       return ((cpuid + ncpu - sc->sc_affinity_offset) % ncpu) % sc->sc_nqueues;
 }
 
 /*



Home | Main Index | Thread Index | Old Index