Date: Thu, 30 Mar 2017 16:03:51 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316278 - head/sys/net Message-ID: <201703301603.v2UG3pYD048541@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno Date: Thu Mar 30 16:03:51 2017 New Revision: 316278 URL: https://svnweb.freebsd.org/changeset/base/316278 Log: Assert IFF_DRV_OACTIVE in iflib_timer() when the "hung" case is detected so that iflib's admin task can still process the reset directive and restore functionality. Sponsored by: Limelight Networks Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Thu Mar 30 15:05:58 2017 (r316277) +++ head/sys/net/iflib.c Thu Mar 30 16:03:51 2017 (r316278) @@ -2114,7 +2114,7 @@ iflib_timer(void *arg) return; hung: CTX_LOCK(ctx); - if_setdrvflagbits(ctx->ifc_ifp, 0, IFF_DRV_RUNNING); + if_setdrvflagbits(ctx->ifc_ifp, IFF_DRV_OACTIVE, IFF_DRV_RUNNING); device_printf(ctx->ifc_dev, "TX(%d) desc avail = %d, pidx = %d\n", txq->ift_id, TXQ_AVAIL(txq), txq->ift_pidx); @@ -3516,8 +3516,11 @@ _task_fn_admin(void *context) iflib_txq_t txq; int i; - if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) - return; + if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING)) { + if (!(if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_OACTIVE)) { + return; + } + } CTX_LOCK(ctx); for (txq = ctx->ifc_txqs, i = 0; i < sctx->isc_ntxqsets; i++, txq++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703301603.v2UG3pYD048541>