Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2016 08:21:28 +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: r302632 - head/sys/dev/hyperv/vmbus
Message-ID:  <201607120821.u6C8LSq2022690@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sephe
Date: Tue Jul 12 08:21:28 2016
New Revision: 302632
URL: https://svnweb.freebsd.org/changeset/base/302632

Log:
  hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}
  
  Reviewed by:	Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>
  MFC after:	1 week
  Sponsored by:	Microsoft OSTC
  Differential Revision:	https://reviews.freebsd.org/D6976

Modified:
  head/sys/dev/hyperv/vmbus/hv_channel.c
  head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c

Modified: head/sys/dev/hyperv/vmbus/hv_channel.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel.c	Tue Jul 12 08:11:16 2016	(r302631)
+++ head/sys/dev/hyperv/vmbus/hv_channel.c	Tue Jul 12 08:21:28 2016	(r302632)
@@ -423,6 +423,11 @@ hv_vmbus_channel_establish_gpadl(struct 
 		device_printf(sc->vmbus_dev, "gpadl->chan%u failed: "
 		    "status %u\n", channel->offer_msg.child_rel_id, status);
 		return EIO;
+	} else {
+		if (bootverbose) {
+			device_printf(sc->vmbus_dev, "gpadl->chan%u "
+			    "succeeded\n", channel->offer_msg.child_rel_id);
+		}
 	}
 	return 0;
 }

Modified: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c	Tue Jul 12 08:11:16 2016	(r302631)
+++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c	Tue Jul 12 08:21:28 2016	(r302632)
@@ -142,6 +142,19 @@ vmbus_channel_process_offer(hv_vmbus_cha
 	}
 	mtx_unlock(&sc->vmbus_chlist_lock);
 
+	if (bootverbose) {
+		char logstr[64];
+
+		logstr[0] = '\0';
+		if (channel != NULL) {
+			snprintf(logstr, sizeof(logstr), ", primary chan%u",
+			    channel->offer_msg.child_rel_id);
+		}
+		device_printf(sc->vmbus_dev, "chan%u subchanid%u offer%s\n",
+		    new_channel->offer_msg.child_rel_id,
+		    new_channel->offer_msg.offer.sub_channel_index, logstr);
+	}
+
 	if (channel != NULL) {
 		/*
 		 * Check if this is a sub channel.
@@ -157,13 +170,6 @@ vmbus_channel_process_offer(hv_vmbus_cha
 			    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 the new channel to the end of the global
 			 * channel list.
@@ -178,11 +184,6 @@ vmbus_channel_process_offer(hv_vmbus_cha
 			    ch_link);
 			mtx_unlock(&sc->vmbus_chlist_lock);
 
-			if(bootverbose)
-				printf("VMBUS: new multi-channel offer <%p>, "
-				    "its primary channel is <%p>.\n",
-				    new_channel, new_channel->primary_channel);
-
 			new_channel->state = HV_CHANNEL_OPEN_STATE;
 
 			/*
@@ -345,6 +346,10 @@ vmbus_channel_on_offer_rescind(struct vm
 	hv_vmbus_channel*		channel;
 
 	rescind = (const hv_vmbus_channel_rescind_offer *)msg->msg_data;
+	if (bootverbose) {
+		device_printf(sc->vmbus_dev, "chan%u rescind\n",
+		    rescind->child_rel_id);
+	}
 
 	channel = hv_vmbus_g_connection.channels[rescind->child_rel_id];
 	if (channel == NULL)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607120821.u6C8LSq2022690>