Module Name: src Committed By: martin Date: Tue Dec 18 18:24:09 UTC 2018
Modified Files: src/sys/dev/pci [netbsd-8]: if_wm.c Log Message: Pull up following revision(s) (requested by knakahara in ticket #1138): sys/dev/pci/if_wm.c: revision 1.606 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 To generate a diff of this commit: cvs rdiff -u -r1.508.4.27 -r1.508.4.28 src/sys/dev/pci/if_wm.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/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.508.4.27 src/sys/dev/pci/if_wm.c:1.508.4.28 --- src/sys/dev/pci/if_wm.c:1.508.4.27 Tue Dec 4 11:21:32 2018 +++ src/sys/dev/pci/if_wm.c Tue Dec 18 18:24:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.508.4.27 2018/12/04 11:21:32 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.508.4.28 2018/12/18 18:24:09 martin 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.508.4.27 2018/12/04 11:21:32 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.28 2018/12/18 18:24:09 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -7211,7 +7211,7 @@ wm_select_txqueue(struct ifnet *ifp, str * 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; } /*