svn commit: r316281 - head/sys/net
Sean Bruno
sbruno at FreeBSD.org
Thu Mar 30 16:54:03 UTC 2017
Author: sbruno
Date: Thu Mar 30 16:54:01 2017
New Revision: 316281
URL: https://svnweb.freebsd.org/changeset/base/316281
Log:
Don't call init functions directly from the timer/watchdog function.
Enqueue this in the admin task now that it can process it.
Submitted by: Matt Macy <mmacy at nextbsd.org>
Sponsored by: Limelight Networks
Modified:
head/sys/net/iflib.c
Modified: head/sys/net/iflib.c
==============================================================================
--- head/sys/net/iflib.c Thu Mar 30 16:31:35 2017 (r316280)
+++ head/sys/net/iflib.c Thu Mar 30 16:54:01 2017 (r316281)
@@ -1441,15 +1441,17 @@ _iflib_irq_alloc(if_ctx_t ctx, if_irq_t
driver_filter_t filter, driver_intr_t handler, void *arg,
char *name)
{
- int rc;
+ int rc, flags;
struct resource *res;
- void *tag;
+ void *tag = NULL;
device_t dev = ctx->ifc_dev;
+ flags = RF_ACTIVE;
+ if (ctx->ifc_flags & IFC_LEGACY)
+ flags |= RF_SHAREABLE;
MPASS(rid < 512);
irq->ii_rid = rid;
- res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irq->ii_rid,
- RF_SHAREABLE | RF_ACTIVE);
+ res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &irq->ii_rid, flags);
if (res == NULL) {
device_printf(dev,
"failed to allocate IRQ for rid %d, name %s.\n", rid, name);
@@ -2122,7 +2124,8 @@ hung:
ctx->ifc_watchdog_events++;
ctx->ifc_pause_frames = 0;
- iflib_init_locked(ctx);
+ ctx->ifc_flags |= IFC_DO_RESET;
+ iflib_admin_intr_deferred(ctx);
CTX_UNLOCK(ctx);
}
@@ -2600,7 +2603,7 @@ txq_max_rs_deferred(iflib_txq_t txq)
return (notify_count >> 1);
if (txq->ift_in_use > minthresh)
return (notify_count >> 2);
- return (notify_count >> 4);
+ return (2);
}
#define M_CSUM_FLAGS(m) ((m)->m_pkthdr.csum_flags)
More information about the svn-src-head
mailing list