The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: kys@linuxonhyperv.com
Cc: olaf@aepfle.de, Stephen Hemminger <sthemmin@microsoft.com>,
	gregkh@linuxfoundation.org, jasowang@redhat.com,
	linux-kernel@vger.kernel.org,
	Michael Kelley <mikelley@microsoft.com>,
	apw@canonical.com, devel@linuxdriverproject.org,
	vkuznets@redhat.com
Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0
Date: Sun, 13 May 2018 10:24:09 -0700	[thread overview]
Message-ID: <20180513102409.4adc5200@xeon-e3> (raw)
In-Reply-To: <20180512093033.12325-1-kys@linuxonhyperv.com>

On Sat, 12 May 2018 02:30:33 -0700
kys@linuxonhyperv.com wrote:

>  int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep)
>  {
> +	struct vmbus_channel_message_header *hdr;
>  	union hv_connection_id conn_id;
>  	int ret = 0;
>  	int retries = 0;
>  	u32 usec = 1;
>  
>  	conn_id.asu32 = 0;
> -	conn_id.u.id = VMBUS_MESSAGE_CONNECTION_ID;
> +	conn_id.u.id = vmbus_connection.msg_conn_id;
>  
>  	/*
>  	 * hv_post_message() can have transient failures because of
> @@ -372,6 +400,18 @@ int vmbus_post_msg(void *buffer, size_t buflen, bool can_sleep)
>  
>  		switch (ret) {
>  		case HV_STATUS_INVALID_CONNECTION_ID:
> +			/*
> +			 * See vmbus_negotiate_version(): VMBus protocol 5.0
> +			 * requires that we must use
> +			 * VMBUS_MESSAGE_CONNECTION_ID_4 for the Initiate
> +			 * Contact message, but on old hosts that only
> +			 * support VMBus protocol 4.0 or lower, here we get
> +			 * HV_STATUS_INVALID_CONNECTION_ID and we should
> +			 * return an error immediately without retrying.
> +			 */
> +			hdr = (struct vmbus_channel_message_header *)buffer;

Hate to pick o the details, but buffer is void * so cast is not necessary here.
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2018-05-13 17:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-12  9:30 [PATCH 1/1] Drivers: hv: vmbus: enable VMBus protocol version 5.0 kys
2018-05-13 17:24 ` Stephen Hemminger [this message]
2018-05-14 18:14   ` Dexuan Cui
2018-05-14 18:17     ` Stephen Hemminger
2018-05-14 18:55       ` Dexuan Cui
2018-05-15 12:21       ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180513102409.4adc5200@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jasowang@redhat.com \
    --cc=kys@linuxonhyperv.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=olaf@aepfle.de \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox