Date: Thu, 16 Nov 2017 18:52:59 +0000 (UTC) From: Stephen Hurd <shurd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325901 - head/sys/net Message-ID: <201711161852.vAGIqxQ7054838@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: shurd Date: Thu Nov 16 18:52:58 2017 New Revision: 325901 URL: https://svnweb.freebsd.org/changeset/base/325901 Log: Fix default numbers of iflib queue sets The intent appears to be having one RX/TX queue set per core, but since scctx->isc_n[tr]xqsets is set to max before calling iflib_msix_init(), both end up being set to total number of cores. Use ctx->ifc_sysctl_n[rt]xqs as the selected value and scctx->isc_n[rt]xqsets as the max. This should result in what appears to be the intended behaviour Reviewed by: sbruno Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D13096 Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Nov 16 18:22:03 2017 (r325900) +++ head/sys/net/iflib.c Thu Nov 16 18:52:58 2017 (r325901) @@ -5312,11 +5312,11 @@ iflib_msix_init(if_ctx_t ctx) int iflib_num_tx_queues, iflib_num_rx_queues; int err, admincnt, bar; - iflib_num_tx_queues = scctx->isc_ntxqsets; - iflib_num_rx_queues = scctx->isc_nrxqsets; + iflib_num_tx_queues = ctx->ifc_sysctl_ntxqs; + iflib_num_rx_queues = ctx->ifc_sysctl_nrxqs; - device_printf(dev, "msix_init qsets capped at %d\n", iflib_num_tx_queues); - + device_printf(dev, "msix_init qsets capped at %d\n", imax(scctx->isc_ntxqsets, scctx->isc_nrxqsets)); + bar = ctx->ifc_softc_ctx.isc_msix_bar; admincnt = sctx->isc_admin_intrcnt; /* Override by global tuneable */ @@ -5414,6 +5414,10 @@ iflib_msix_init(if_ctx_t ctx) rx_queues = iflib_num_rx_queues; else rx_queues = queues; + + if (rx_queues > scctx->isc_nrxqsets) + rx_queues = scctx->isc_nrxqsets; + /* * We want this to be all logical CPUs by default */ @@ -5421,6 +5425,9 @@ iflib_msix_init(if_ctx_t ctx) tx_queues = iflib_num_tx_queues; else tx_queues = mp_ncpus; + + if (tx_queues > scctx->isc_ntxqsets) + tx_queues = scctx->isc_ntxqsets; if (ctx->ifc_sysctl_qs_eq_override == 0) { #ifdef INVARIANTS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711161852.vAGIqxQ7054838>