Date: Mon, 31 Oct 2016 05:22:01 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308120 - head/sys/dev/hyperv/netvsc Message-ID: <201610310522.u9V5M1TS016366@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sephe Date: Mon Oct 31 05:22:00 2016 New Revision: 308120 URL: https://svnweb.freebsd.org/changeset/base/308120 Log: hyperv/hn: Don't start shared TX taskq, if the hypervisor is not Hyper-V. - Move the SYSINIT to DRIVER/SECOND, i.e. after the vm_guest becomes determistic. - Minor style changes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8370 Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Oct 31 05:05:12 2016 (r308119) +++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Mon Oct 31 05:22:00 2016 (r308120) @@ -4627,6 +4627,10 @@ hn_chan_callback(struct vmbus_channel *c static void hn_tx_taskq_create(void *arg __unused) { + + if (vm_guest != VM_GUEST_HV) + return; + if (!hn_share_tx_taskq) return; @@ -4645,16 +4649,17 @@ hn_tx_taskq_create(void *arg __unused) taskqueue_start_threads(&hn_tx_taskq, 1, PI_NET, "hn tx"); } } -SYSINIT(hn_txtq_create, SI_SUB_DRIVERS, SI_ORDER_FIRST, +SYSINIT(hn_txtq_create, SI_SUB_DRIVERS, SI_ORDER_SECOND, hn_tx_taskq_create, NULL); static void hn_tx_taskq_destroy(void *arg __unused) { + if (hn_tx_taskq != NULL) taskqueue_free(hn_tx_taskq); } -SYSUNINIT(hn_txtq_destroy, SI_SUB_DRIVERS, SI_ORDER_FIRST, +SYSUNINIT(hn_txtq_destroy, SI_SUB_DRIVERS, SI_ORDER_SECOND, hn_tx_taskq_destroy, NULL); static device_method_t netvsc_methods[] = {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610310522.u9V5M1TS016366>