diff options
author | Thanos Makatos <thanos.makatos@nutanix.com> | 2021-01-28 20:54:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 20:54:48 +0000 |
commit | 45d383c981d60cc7dae5c3a62dc37139a5f465e8 (patch) | |
tree | 620fcc14efb7e066f239eaa16e18853bbbf2be76 /samples | |
parent | 50639d1659093fa6304f78ea10d0cdf204b64568 (diff) | |
download | libvfio-user-45d383c981d60cc7dae5c3a62dc37139a5f465e8.zip libvfio-user-45d383c981d60cc7dae5c3a62dc37139a5f465e8.tar.gz libvfio-user-45d383c981d60cc7dae5c3a62dc37139a5f465e8.tar.bz2 |
client/server: arm timer for a little longer (#283)
The interrupt might be delivered too soon, when e.g. the client is
waiting for a response for a message it previously sent. This isn't 100%
bulletproof.
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/client.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/samples/client.c b/samples/client.c index 4296153..0ba844e 100644 --- a/samples/client.c +++ b/samples/client.c @@ -1259,12 +1259,12 @@ int main(int argc, char *argv[]) } /* - * Schedule an interrupt in 2 seconds from now in the old server and then + * Schedule an interrupt in 3 seconds from now in the old server and then * immediatelly migrate the device. The new server should deliver the - * interrupt. Hopefully 2 seconds should be enough for migration to finish. + * interrupt. Hopefully 3 seconds should be enough for migration to finish. * TODO make this value a command line option. */ - t = time(NULL) + 2; + t = time(NULL) + 3; ret = access_region(sock, VFU_PCI_DEV_BAR0_REGION_IDX, true, 0, &t, sizeof t); if (ret < 0) { errx(EXIT_FAILURE, "failed to write to BAR0: %s", strerror(-ret)); |