Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/ixgbe Don't limit number of queue pair to 8. Tak...



details:   https://anonhg.NetBSD.org/src/rev/9ecf0be49a19
branches:  trunk
changeset: 356064:9ecf0be49a19
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Aug 30 01:25:07 2017 +0000

description:
Don't limit number of queue pair to 8. Take max TX queues and max RX queues
into account. 82598 has 32 TX queue and 64 RX queues. Others has 128 TX queues
and 128 RX queues. Number of MSI-X table entries is 64, so the max queue pairs
is 63 (64 minus the Others (e.g. link status change)).

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 9ad377b4948e -r 9ecf0be49a19 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Wed Aug 30 00:40:09 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Wed Aug 30 01:25:07 2017 +0000
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: head/sys/dev/ixgbe/if_ix.c 302384 2016-07-07 03:39:18Z sbruno $*/
-/*$NetBSD: ixgbe.c,v 1.96 2017/08/24 10:43:42 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.97 2017/08/30 01:25:07 msaitoh Exp $*/
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2960,6 +2960,7 @@
 ixgbe_setup_msix(struct adapter *adapter)
 {
        device_t dev = adapter->dev;
+       struct ixgbe_mac_info *mac = &adapter->hw.mac;
        int want, queues, msgs;
 
        /* Override by tuneable */
@@ -2986,8 +2987,9 @@
        if (ixgbe_num_queues != 0)
                queues = ixgbe_num_queues;
        /* Set max queues to 8 when autoconfiguring */
-       else if ((ixgbe_num_queues == 0) && (queues > 8))
-               queues = 8;
+       else
+               queues = min(queues,
+                   min(mac->max_tx_queues, mac->max_rx_queues));
 
        /* reflect correct sysctl value */
        ixgbe_num_queues = queues;



Home | Main Index | Thread Index | Old Index