diff options
author | Andrea Parri <parri.andrea@gmail.com> | 2019-10-15 14:46:44 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2019-11-22 04:10:43 +0300 |
commit | bedc61a922f9dbbe3bfb26ec2745f8cd63b57637 (patch) | |
tree | a0b1a0f0365f52045fbdf06ea0bd9a4463282507 /include/linux/hyperv.h | |
parent | a99d8080aaf358d5d23581244e5da23b35e340b9 (diff) | |
download | linux-bedc61a922f9dbbe3bfb26ec2745f8cd63b57637.tar.xz |
Drivers: hv: vmbus: Introduce table of VMBus protocol versions
The technique used to get the next VMBus version seems increasisly
clumsy as the number of VMBus versions increases. Performance is
not a concern since this is only done once during system boot; it's
just that we'll end up with more lines of code than is really needed.
As an alternative, introduce a table with the version numbers listed
in order (from the most recent to the oldest). vmbus_connect() loops
through the versions listed in the table until it gets an accepted
connection or gets to the end of the table (invalid version).
Suggested-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r-- | include/linux/hyperv.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index b4a017093b69..c08b62dbd151 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -192,10 +192,6 @@ static inline u32 hv_get_avail_to_write_percent( #define VERSION_WIN10 ((4 << 16) | (0)) #define VERSION_WIN10_V5 ((5 << 16) | (0)) -#define VERSION_INVAL -1 - -#define VERSION_CURRENT VERSION_WIN10_V5 - /* Make maximum size of pipe payload of 16K */ #define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384) |