diff options
author | Michael Kelley <mikelley@microsoft.com> | 2022-02-09 19:11:10 +0300 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2022-02-18 16:08:18 +0300 |
commit | 6de74d1069b821e96460d0fc2edfc35785db04fb (patch) | |
tree | 7670a968e8a04d89202a732790a580e2a7f41a8c /include/uapi/linux/hyperv.h | |
parent | 4ee524587105011ef43e5bd3ef5ed019715363dd (diff) | |
download | linux-6de74d1069b821e96460d0fc2edfc35785db04fb.tar.xz |
hv_utils: Add comment about max VMbus packet size in VSS driver
The VSS driver allocates a VMbus receive buffer significantly
larger than sizeof(hv_vss_msg), with no explanation. To help
prevent future mistakes, add a #define and comment about why
this is done.
No functional change.
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1644423070-75125-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'include/uapi/linux/hyperv.h')
-rw-r--r-- | include/uapi/linux/hyperv.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h index daf82a230c0e..aaa502a7bff4 100644 --- a/include/uapi/linux/hyperv.h +++ b/include/uapi/linux/hyperv.h @@ -90,6 +90,17 @@ struct hv_vss_check_dm_info { __u32 flags; } __attribute__((packed)); +/* + * struct hv_vss_msg encodes the fields that the Linux VSS + * driver accesses. However, FREEZE messages from Hyper-V contain + * additional LUN information that Linux doesn't use and are not + * represented in struct hv_vss_msg. A received FREEZE message may + * be as large as 6,260 bytes, so the driver must allocate at least + * that much space, not sizeof(struct hv_vss_msg). Other messages + * such as AUTO_RECOVER may be as large as 12,500 bytes. However, + * because the Linux VSS driver responds that it doesn't support + * auto-recovery, it should not receive such messages. + */ struct hv_vss_msg { union { struct hv_vss_hdr vss_hdr; |