hv_utils: drain the timesync packets on onchannelcallback
authorVineeth Pillai <viremana@linux.microsoft.com>
Fri, 21 Aug 2020 15:28:49 +0000 (15:28 +0000)
committerWei Liu <wei.liu@kernel.org>
Mon, 24 Aug 2020 14:49:04 +0000 (14:49 +0000)
commitb46b4a8a57c377b72a98c7930a9f6969d2d4784e
tree00cada960772aa99e7f04d537feaceb8f51e87e7
parent90b125f4cd2697f949f5877df723a0b710693dd0
hv_utils: drain the timesync packets on onchannelcallback

There could be instances where a system stall prevents the timesync
packets to be consumed. And this might lead to more than one packet
pending in the ring buffer. Current code empties one packet per callback
and it might be a stale one. So drain all the packets from ring buffer
on each callback.

Signed-off-by: Vineeth Pillai <viremana@linux.microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200821152849.99517-1-viremana@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/hv_util.c