Author: erj Date: Sat May 26 00:46:08 2018 New Revision: 334231 URL: https://svnweb.freebsd.org/changeset/base/334231
Log: iflib: Add new shared flag: IFLIB_ADMIN_ALWAYS_RUN ixl(4)'s nvmupdate utility expects the nvmupdate process to run while the interface is down; these nvm update commands use the admin queue, so the admin queue needs to be able to generate interrupts and be processed while the interface is down. So add a flag that ixl(4) sets that lets the entire admin task run even when the interface is marked down/IFF_DRV_RUNNING isn't set. With this change, nvmupdate should function like it did pre-iflib. Reviewed by: gallatin@, sbruno@ MFC after: 1 week Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D15575 Modified: head/sys/net/iflib.c head/sys/net/iflib.h Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sat May 26 00:41:50 2018 (r334230) +++ head/sys/net/iflib.c Sat May 26 00:46:08 2018 (r334231) @@ -3807,7 +3807,8 @@ _task_fn_admin(void *context) ctx->ifc_flags &= ~(IFC_DO_RESET|IFC_DO_WATCHDOG); STATE_UNLOCK(ctx); - if (!running & !oactive) + if ((!running & !oactive) && + !(ctx->ifc_sctx->isc_flags & IFLIB_ADMIN_ALWAYS_RUN)) return; CTX_LOCK(ctx); Modified: head/sys/net/iflib.h ============================================================================== --- head/sys/net/iflib.h Sat May 26 00:41:50 2018 (r334230) +++ head/sys/net/iflib.h Sat May 26 00:46:08 2018 (r334231) @@ -358,7 +358,10 @@ typedef enum { * autogenerate a MAC address */ #define IFLIB_GEN_MAC 0x08000 - +/* + * Interface needs admin task to ignore interface up/down status + */ +#define IFLIB_ADMIN_ALWAYS_RUN 0x10000 /* _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"