Drivers: hv: vmbus: Add utility function for querying ring size

Add a function to query for the preferred ring buffer size of VMBus
device. This will allow the drivers (eg. UIO) to allocate the most
optimized ring buffer size for devices.

Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
Link: https://lore.kernel.org/r/1711788723-8593-2-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Saurabh Sengar
2024-03-30 01:51:57 -07:00
committed by Greg Kroah-Hartman
parent a36b69775f
commit e8c4bd6c6e
3 changed files with 19 additions and 3 deletions

View File

@@ -820,6 +820,8 @@ struct vmbus_requestor {
#define VMBUS_RQST_RESET (U64_MAX - 3)
struct vmbus_device {
/* preferred ring buffer size in KB, 0 means no preferred size for this device */
size_t pref_ring_size;
u16 dev_type;
guid_t guid;
bool perf_device;