From cf0c4127c07c2cb722f807258f8122bbf864c484 Mon Sep 17 00:00:00 2001 From: sephe Date: Thu, 16 Jun 2016 06:34:12 +0000 Subject: [PATCH] MFC 298039,298042 298039 hyperv/vmbus: Put multi-channel offer logging under bootverbose Suggested by: Dexuan Cui MFC after: 1 week Sponsored by: Microsoft OSTC 298042 hyperv/hn: Hide ring to channel linkage message under bootverbose Suggested by: Dexuan Cui MFC after: 1 week Sponsored by: Microsoft OSTC git-svn-id: svn://svn.freebsd.org/base/stable/10@301954 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c | 12 ++++++++---- sys/dev/hyperv/vmbus/hv_channel_mgmt.c | 10 +++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c index b1542bd99..2207ec922 100644 --- a/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c +++ b/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c @@ -2872,8 +2872,10 @@ hn_channel_attach(struct hn_softc *sc, struct hv_vmbus_channel *chan) rxr->hn_rx_flags |= HN_RX_FLAG_ATTACHED; chan->hv_chan_rxr = rxr; - if_printf(sc->hn_ifp, "link RX ring %d to channel%u\n", - idx, chan->offer_msg.child_rel_id); + if (bootverbose) { + if_printf(sc->hn_ifp, "link RX ring %d to channel%u\n", + idx, chan->offer_msg.child_rel_id); + } if (idx < sc->hn_tx_ring_inuse) { struct hn_tx_ring *txr = &sc->hn_tx_ring[idx]; @@ -2884,8 +2886,10 @@ hn_channel_attach(struct hn_softc *sc, struct hv_vmbus_channel *chan) chan->hv_chan_txr = txr; txr->hn_chan = chan; - if_printf(sc->hn_ifp, "link TX ring %d to channel%u\n", - idx, chan->offer_msg.child_rel_id); + if (bootverbose) { + if_printf(sc->hn_ifp, "link TX ring %d to channel%u\n", + idx, chan->offer_msg.child_rel_id); + } } /* Bind channel to a proper CPU */ diff --git a/sys/dev/hyperv/vmbus/hv_channel_mgmt.c b/sys/dev/hyperv/vmbus/hv_channel_mgmt.c index 7caa14849..1c1ac6f33 100644 --- a/sys/dev/hyperv/vmbus/hv_channel_mgmt.c +++ b/sys/dev/hyperv/vmbus/hv_channel_mgmt.c @@ -222,10 +222,14 @@ vmbus_channel_process_offer(hv_vmbus_channel *new_channel) sc_list_entry); mtx_unlock(&channel->sc_lock); + if (bootverbose) { + printf("VMBUS get multi-channel offer, " + "rel=%u, sub=%u\n", + new_channel->offer_msg.child_rel_id, + new_channel->offer_msg.offer.sub_channel_index); + } + /* Insert new channel into channel_anchor. */ - printf("VMBUS get multi-channel offer, rel=%u,sub=%u\n", - new_channel->offer_msg.child_rel_id, - new_channel->offer_msg.offer.sub_channel_index); mtx_lock(&hv_vmbus_g_connection.channel_lock); TAILQ_INSERT_TAIL(&hv_vmbus_g_connection.channel_anchor, new_channel, list_entry); -- 2.45.0