From owner-svn-src-head@freebsd.org Thu Jun 15 17:46:21 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E1ECD8EDB3; Thu, 15 Jun 2017 17:46:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 580E47D5BC; Thu, 15 Jun 2017 17:46:21 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5FHkK6I088066; Thu, 15 Jun 2017 17:46:20 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5FHkKbL088065; Thu, 15 Jun 2017 17:46:20 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201706151746.v5FHkKbL088065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 15 Jun 2017 17:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319984 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2017 17:46:21 -0000 Author: sbruno Date: Thu Jun 15 17:46:20 2017 New Revision: 319984 URL: https://svnweb.freebsd.org/changeset/base/319984 Log: Revert r319921 which seems to cause NFS booting assertion panics in various configurations. Reported by: pho@ Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Jun 15 17:44:16 2017 (r319983) +++ head/sys/net/iflib.c Thu Jun 15 17:46:20 2017 (r319984) @@ -520,17 +520,6 @@ rxd_info_zero(if_rxd_info_t ri) #define MAX_SINGLE_PACKET_FRACTION 12 #define IF_BAD_DMA (bus_addr_t)-1 -static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD, 0, - "iflib driver parameters"); - -static int iflib_timer_int; -SYSCTL_INT(_net_iflib, OID_AUTO, timer_int, CTLFLAG_RW, &iflib_timer_int, - 0, "interval at which to run per-queue timers (in ticks)"); - -static int force_busdma = 1; -SYSCTL_INT(_net_iflib, OID_AUTO, force_busdma, CTLFLAG_RDTUN, &force_busdma, - 1, "force busdma"); - #define CTX_ACTIVE(ctx) ((if_getdrvflags((ctx)->ifc_ifp) & IFF_DRV_RUNNING)) #define CTX_LOCK_INIT(_sc, _name) mtx_init(&(_sc)->ifc_mtx, _name, "iflib ctx lock", MTX_DEF) @@ -570,6 +559,9 @@ TASKQGROUP_DEFINE(if_config_tqg, 1, 1); #endif /* !INVARIANTS */ #endif +static SYSCTL_NODE(_net, OID_AUTO, iflib, CTLFLAG_RD, 0, + "iflib driver parameters"); + /* * XXX need to ensure that this can't accidentally cause the head to be moved backwards */ @@ -1875,6 +1867,7 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun cb_arg.error = 0; q = fl->ifl_rxq; MPASS(sd_map != NULL); + MPASS(sd_map[idx] != NULL); err = bus_dmamap_load(fl->ifl_desc_tag, sd_map[idx], cl, fl->ifl_buf_size, _rxq_refill_cb, &cb_arg, 0); bus_dmamap_sync(fl->ifl_desc_tag, sd_map[idx], BUS_DMASYNC_PREREAD); @@ -2117,8 +2110,7 @@ iflib_timer(void *arg) sctx->isc_pause_frames = 0; if (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING) - callout_reset_on(&txq->ift_timer, iflib_timer_int, iflib_timer, - txq, txq->ift_timer.c_cpu); + callout_reset_on(&txq->ift_timer, hz/2, iflib_timer, txq, txq->ift_timer.c_cpu); return; hung: CTX_LOCK(ctx); @@ -2193,8 +2185,8 @@ iflib_init_locked(if_ctx_t ctx) IFDI_INTR_ENABLE(ctx); txq = ctx->ifc_txqs; for (i = 0; i < sctx->isc_ntxqsets; i++, txq++) - callout_reset_on(&txq->ift_timer, iflib_timer_int, iflib_timer, - txq, txq->ift_timer.c_cpu); + callout_reset_on(&txq->ift_timer, hz/2, iflib_timer, txq, + txq->ift_timer.c_cpu); } static int @@ -2905,7 +2897,7 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag ifsd_m = txq->ift_sds.ifsd_m; ntxd = txq->ift_size; pidx = txq->ift_pidx; - if (force_busdma || map != NULL) { + if (map != NULL) { uint8_t *ifsd_flags = txq->ift_sds.ifsd_flags; err = bus_dmamap_load_mbuf_sg(tag, map, @@ -3045,8 +3037,7 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) next = (cidx + CACHE_LINE_SIZE) & (ntxd-1); prefetch(&txq->ift_sds.ifsd_flags[next]); } - } - if (txq->ift_sds.ifsd_map != NULL) + } else if (txq->ift_sds.ifsd_map != NULL) map = txq->ift_sds.ifsd_map[pidx]; if (m_head->m_pkthdr.csum_flags & CSUM_TSO) { @@ -3542,8 +3533,7 @@ _task_fn_admin(void *context) } IFDI_UPDATE_ADMIN_STATUS(ctx); for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++) - callout_reset_on(&txq->ift_timer, iflib_timer_int, iflib_timer, - txq, txq->ift_timer.c_cpu); + callout_reset_on(&txq->ift_timer, hz/2, iflib_timer, txq, txq->ift_timer.c_cpu); IFDI_LINK_INTR_ENABLE(ctx); if (ctx->ifc_flags & IFC_DO_RESET) { ctx->ifc_flags &= ~IFC_DO_RESET; @@ -4097,8 +4087,6 @@ iflib_device_register(device_t dev, void *sc, if_share /* set unconditionally for !x86 */ ctx->ifc_flags |= IFC_DMAR; #endif - if (force_busdma) - ctx->ifc_flags |= IFC_DMAR; msix_bar = scctx->isc_msix_bar; main_txq = (sctx->isc_flags & IFLIB_HAS_TXCQ) ? 1 : 0; @@ -4421,9 +4409,6 @@ iflib_device_iov_add_vf(device_t dev, uint16_t vfnum, static int iflib_module_init(void) { - - iflib_timer_int = hz / 2; - TUNABLE_INT_FETCH("net.iflib.timer_int", &iflib_timer_int); return (0); }