hv: utils: properly pick TS protocol version for future hosts
PATCH 1/1 hv: utils: properly pick TS protocol version for future hosts
It is reasonable to expect that future Hyper-V versions will continue supporting TimeSync v4 protocol, we, however, only pick it for VERSION_WIN10. Currently this is not an issue as VERSION_WIN10 is the maximum protocol version we can negotiate but this may change in future. Instead of hoping that we won't forget to update it when time comes I suggest we change the default now.
--- drivers/hv/hv_util.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)
drivers/hv/hv_util.c +5 -8
@@ -382,23 +382,20 @@ static int util_probe(struct hv_device *dev,* Based on the host; initialize the framework and * service version numbers we will negotiate. */ -switch (vmbus_proto_version) { -case (VERSION_WS2008 ): +if (vmbus_proto_version <=VERSION_WS2008 ) { util_fw_version =UTIL_WS2K8_FW_VERSION ; sd_srv_version =SD_VERSION_1 ; ts_srv_version =TS_VERSION_1 ; hb_srv_version =HB_VERSION_1 ; -break ; -case (VERSION_WIN10 ): + }else if (vmbus_proto_version <VERSION_WIN10 ) { util_fw_version =UTIL_FW_VERSION ; sd_srv_version =SD_VERSION ; - ts_srv_version =TS_VERSION ; + ts_srv_version =TS_VERSION_3 ; hb_srv_version =HB_VERSION ; -break ; -default : + }else { util_fw_version =UTIL_FW_VERSION ; sd_srv_version =SD_VERSION ; - ts_srv_version =TS_VERSION_3 ; + ts_srv_version =TS_VERSION ; hb_srv_version =HB_VERSION ; }
Signature · 1 line
2.9.3
Quoted 9 lines
-----Original Message-----
From: Vitaly Kuznetsov [mailto:[email protected]]
Sent: Monday, November 28, 2016 8:30 AM
To: [email protected]
Cc: [email protected]; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Alex Ng (LIS) <[email protected]>
Subject: [PATCH] hv: utils: properly pick TS protocol version for future hosts
Quoted 7 lines
It is reasonable to expect that future Hyper-V versions will continue supporting TimeSync v4 protocol, we, however, only pick it for
VERSION_WIN10. Currently this is not an issue asVERSION_WIN10is the maximum protocol version we can negotiate but this may change in future. Instead of hoping that we won't forget to update it when time comes I suggest we change the default now.
Vitaly, can you see if this upstream commit already fixes the issue you described?
Quoted 40 lines
Signed-off-by Vitaly Kuznetsov <[email protected]>--- drivers/hv/hv_util.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)drivers/hv/hv_util.c +5
-9@@ -382,23 +382,20 @@ static int util_probe(struct hv_device *dev,* Based on the host; initialize the framework and * service version numbers we will negotiate. */ -switch (vmbus_proto_version) { -case (VERSION_WS2008 ): +if (vmbus_proto_version <=VERSION_WS2008 ) { util_fw_version =UTIL_WS2K8_FW_VERSION ; sd_srv_version =SD_VERSION_1 ; ts_srv_version =TS_VERSION_1 ; hb_srv_version =HB_VERSION_1 ; -break ; -case (VERSION_WIN10 ): + }else if (vmbus_proto_version <VERSION_WIN10 ) { util_fw_version =UTIL_FW_VERSION ; sd_srv_version =SD_VERSION ; - ts_srv_version =TS_VERSION ; + ts_srv_version =TS_VERSION_3 ; hb_srv_version =HB_VERSION ; -break ; -default : + }else { util_fw_version =UTIL_FW_VERSION ; sd_srv_version =SD_VERSION ; - ts_srv_version =TS_VERSION_3 ; + ts_srv_version =TS_VERSION ; hb_srv_version =HB_VERSION ; } --2.9.3
Quoted 17 lines · Alex Ng (LIS)
Quoted 9 lines
-----Original Message-----
From: Vitaly Kuznetsov [mailto:[email protected]]
Sent: Monday, November 28, 2016 8:30 AM
To: [email protected]
Cc: [email protected]; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Alex Ng (LIS) <[email protected]>
Subject: [PATCH] hv: utils: properly pick TS protocol version for future hostsQuoted 7 lines
It is reasonable to expect that future Hyper-V versions will continue supporting TimeSync v4 protocol, we, however, only pick it for
VERSION_WIN10. Currently this is not an issue asVERSION_WIN10is the maximum protocol version we can negotiate but this may change in future. Instead of hoping that we won't forget to update it when time comes I suggest we change the default now.
Quoted 4 lines
Vitaly, can you see if this upstream commit already fixes the issue you described?
Yes, thanks, missied it!
Quoted 40 lines
Quoted 40 lines
Signed-off-by Vitaly Kuznetsov <[email protected]>--- drivers/hv/hv_util.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)drivers/hv/hv_util.c +5
-9@@ -382,23 +382,20 @@ static int util_probe(struct hv_device *dev,* Based on the host; initialize the framework and * service version numbers we will negotiate. */ -switch (vmbus_proto_version) { -case (VERSION_WS2008 ): +if (vmbus_proto_version <=VERSION_WS2008 ) { util_fw_version =UTIL_WS2K8_FW_VERSION ; sd_srv_version =SD_VERSION_1 ; ts_srv_version =TS_VERSION_1 ; hb_srv_version =HB_VERSION_1 ; -break ; -case (VERSION_WIN10 ): + }else if (vmbus_proto_version <VERSION_WIN10 ) { util_fw_version =UTIL_FW_VERSION ; sd_srv_version =SD_VERSION ; - ts_srv_version =TS_VERSION ; + ts_srv_version =TS_VERSION_3 ; hb_srv_version =HB_VERSION ; -break ; -default : + }else { util_fw_version =UTIL_FW_VERSION ; sd_srv_version =SD_VERSION ; - ts_srv_version =TS_VERSION_3 ; + ts_srv_version =TS_VERSION ; hb_srv_version =HB_VERSION ; } --2.9.3
Signature · 1 line
Vitaly