Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Add defines for the max number of queue



details:   https://anonhg.NetBSD.org/src/rev/e618855c3508
branches:  trunk
changeset: 745206:e618855c3508
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Tue Feb 25 07:22:18 2020 +0000

description:
Add defines for the max number of queue

pointed out and reviewed by knakahara@n.o., thanks

diffstat:

 sys/dev/pci/if_ixl.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 333c578397b4 -r e618855c3508 sys/dev/pci/if_ixl.c
--- a/sys/dev/pci/if_ixl.c      Tue Feb 25 07:17:19 2020 +0000
+++ b/sys/dev/pci/if_ixl.c      Tue Feb 25 07:22:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ixl.c,v 1.46 2020/02/25 07:17:19 yamaguchi Exp $    */
+/*     $NetBSD: if_ixl.c,v 1.47 2020/02/25 07:22:18 yamaguchi Exp $    */
 
 /*
  * Copyright (c) 2013-2015, Intel Corporation
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.46 2020/02/25 07:17:19 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.47 2020/02/25 07:22:18 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -175,6 +175,9 @@
        I40E_PFINT_ICR0_ECC_ERR_MASK |          \
        I40E_PFINT_ICR0_PE_CRITERR_MASK)
 
+#define IXL_QUEUE_MAX_XL710            64
+#define IXL_QUEUE_MAX_X722             128
+
 #define IXL_TX_PKT_DESCS               8
 #define IXL_TX_PKT_MAXSIZE             (MCLBYTES * IXL_TX_PKT_DESCS)
 #define IXL_TX_QUEUE_ALIGN             128
@@ -1215,9 +1218,9 @@
        ixl_get_nvm_version(sc);
 
        if (sc->sc_mac_type == I40E_MAC_X722)
-               sc->sc_nqueue_pairs_device = 128;
+               sc->sc_nqueue_pairs_device = IXL_QUEUE_MAX_X722;
        else
-               sc->sc_nqueue_pairs_device = 64;
+               sc->sc_nqueue_pairs_device = IXL_QUEUE_MAX_XL710;
 
        rv = ixl_get_hw_capabilities(sc);
        if (rv != 0) {



Home | Main Index | Thread Index | Old Index