Skip to content

Commit 9d68cd9

Browse files
vittyvkliuw
authored andcommitted
hv_utils: Set the maximum packet size for VSS driver to the length of the receive buffer
Commit adae1e9 ("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: adae1e9 ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer") Signed-off-by: Vitaly Kuznetsov <[email protected]> Reviewed-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
1 parent 7aff79e commit 9d68cd9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hv/hv_snapshot.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ hv_vss_init(struct hv_util_service *srv)
375375
}
376376
recv_buffer = srv->recv_buffer;
377377
vss_transaction.recv_channel = srv->channel;
378+
vss_transaction.recv_channel->max_pkt_size = HV_HYP_PAGE_SIZE * 2;
378379

379380
/*
380381
* When this driver loads, the user level daemon that

0 commit comments

Comments
 (0)