linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Kelley <mikelley@microsoft.com>
To: vkuznets <vkuznets@redhat.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>
Cc: Andres Beltran <lkmlabelt@gmail.com>,
	"Andrea Parri (Microsoft)" <parri.andrea@gmail.com>,
	Dexuan Cui <decui@microsoft.com>, Wei Liu <wei.liu@kernel.org>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] hv_utils: Set the maximum packet size for VSS driver to the length of the receive buffer
Date: Wed, 25 Aug 2021 18:33:10 +0000	[thread overview]
Message-ID: <MWHPR21MB15931C94B84D62C451163BAFD7C69@MWHPR21MB1593.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20210825133857.847866-1-vkuznets@redhat.com>

From: Vitaly Kuznetsov <vkuznets@redhat.com> Sent: Wednesday, August 25, 2021 6:39 AM
> 
> Commit adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out
> of the ring buffer") introduced a notion of maximum packet size and for
> KVM and FCOPY drivers set it to the length of the receive buffer. VSS
> driver wasn't updated, this means that the maximum packet size is now
> VMBUS_DEFAULT_MAX_PKT_SIZE (4k). Apparently, this is not enough. I'm
> observing a packet of 6304 bytes which is being truncated to 4096. When
> VSS driver tries to read next packet from ring buffer it starts from the
> wrong offset and receives garbage.
> 
> Set the maximum packet size to 'HV_HYP_PAGE_SIZE * 2' in VSS driver. This
> matches the length of the receive buffer and is in line with other utils
> drivers.
> 
> Fixes: adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  drivers/hv/hv_snapshot.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c
> index 2267bd4c3472..6018b9d1b1fb 100644
> --- a/drivers/hv/hv_snapshot.c
> +++ b/drivers/hv/hv_snapshot.c
> @@ -375,6 +375,7 @@ hv_vss_init(struct hv_util_service *srv)
>  	}
>  	recv_buffer = srv->recv_buffer;
>  	vss_transaction.recv_channel = srv->channel;
> +	vss_transaction.recv_channel->max_pkt_size = HV_HYP_PAGE_SIZE * 2;
> 
>  	/*
>  	 * When this driver loads, the user level daemon that
> --
> 2.31.1

Reviewed-by: Michael Kelley <mikelley@microsoft.com>

  reply	other threads:[~2021-08-25 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 13:38 [PATCH] hv_utils: Set the maximum packet size for VSS driver to the length of the receive buffer Vitaly Kuznetsov
2021-08-25 18:33 ` Michael Kelley [this message]
2021-08-25 19:02   ` Wei Liu

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=MWHPR21MB15931C94B84D62C451163BAFD7C69@MWHPR21MB1593.namprd21.prod.outlook.com \
    --to=mikelley@microsoft.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkmlabelt@gmail.com \
    --cc=parri.andrea@gmail.com \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    --cc=wei.liu@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).