From 45d383c981d60cc7dae5c3a62dc37139a5f465e8 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Thu, 28 Jan 2021 20:54:48 +0000 Subject: 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 --- samples/client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'samples/client.c') 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)); -- cgit v1.1