History

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).

Andrea Parri committed 7 years ago

Commit bedc61a1 parent a99d8083 files · +19 −38Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/hyperv.h+0−4
@@ -192,10 +192,6 @@ static inline u32 hv_get_avail_to_write_percent( · 191 unmodified lines
192#define VERSION_WIN10 ((4 << 16) | (0))192#define VERSION_WIN10 ((4 << 16) | (0))
193#define VERSION_WIN10_V5 ((5 << 16) | (0))193#define VERSION_WIN10_V5 ((5 << 16) | (0))
194 194
195#define VERSION_INVAL -1
196
197#define VERSION_CURRENT VERSION_WIN10_V5
198
199/* Make maximum size of pipe payload of 16K */195/* Make maximum size of pipe payload of 16K */
200#define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384)196#define MAX_PIPE_DATA_PAYLOAD (sizeof(u8) * 16384)
201 197

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t