hv_utils: Set the maximum packet size for VSS driver to the length of the receive buffer
Vitaly Kuznetsov authored
[ Upstream commit 9d68cd91 ]

Commit adae1e93 ("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: adae1e93

 ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer")
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Michael Kell...
1707cfa1
Name Last commit Last update
..
Kconfig x86/Hyper-V: Support for free page reporting
Makefile Drivers: hv: Move Hyper-V extended capability check to arch neutral code
channel.c scsi: storvsc: Use blk_mq_unique_tag() to generate requestIDs
channel_mgmt.c Drivers: hv: vmbus: Fix duplicate CPU assignments within a device
connection.c drivers: hv: Fix missing error code in vmbus_connect()
hv.c drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status
hv_balloon.c hv_balloon: Remove redundant assignment to region_start
hv_common.c Merge tag 'hyperv-next-signed-20210629' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
hv_debugfs.c hv_debugfs: Make hv_debug_root static
hv_fcopy.c Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer
hv_kvp.c Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer
hv_snapshot.c hv_utils: Set the maximum packet size for VSS driver to the length of the receive buffer
hv_trace.c hv: add SPDX license to trace
hv_trace.h Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE
hv_trace_balloon.h hv_balloon: trace post_status
hv_util.c hv_utils: Fix passing zero to 'PTR_ERR' warning
hv_utils_transport.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 280
hv_utils_transport.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 280
hyperv_vmbus.h Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer
ring_buffer.c scsi: storvsc: Use blk_mq_unique_tag() to generate requestIDs
vmbus_drv.c kernel.h: split out panic and oops helpers