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 Tx queue assignment when the number of H/W q...



details:   https://anonhg.NetBSD.org/src/rev/fd0bae3432b2
branches:  trunk
changeset: 822051:fd0bae3432b2
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Feb 27 09:27:27 2017 +0000

description:
fix Tx queue assignment when the number of H/W queues is less than ncpu.

diffstat:

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

diffs (27 lines):

diff -r e3f8b5b481ec -r fd0bae3432b2 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon Feb 27 08:26:53 2017 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Feb 27 09:27:27 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.487 2017/02/24 10:09:21 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.488 2017/02/27 09:27:27 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.487 2017/02/24 10:09:21 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.488 2017/02/27 09:27:27 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -6470,7 +6470,7 @@
         * TODO:
         * distribute by flowid(RSS has value).
         */
-       return (cpuid + sc->sc_affinity_offset) % sc->sc_nqueues;
+        return (cpuid + ncpu - sc->sc_affinity_offset) % sc->sc_nqueues;                                                          
 }
 
 /*



Home | Main Index | Thread Index | Old Index