From 10f90ccd7bdb730d8e18daa46e6e4f66356a3ba3 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 17 Jan 2023 16:22:16 +0000 Subject: [PATCH] bdev_nvme: shorten poller period for mdns We may need to process multiple events to get all of the events associated with a newly published service, so a 1 second poller is actually a bit too long since we will only get one event per poll iteration. Shorten it to 100ms instead. It doesn't appear there is any easy way to use the avahi API to help with this, maybe we could have some context variable used to detect if an event was processed or not, and call avahi_simple_poll_iterate() multiple times if necessary. This might be something worth investigating in the future. Signed-off-by: Jim Harris Change-Id: Ifea7a99dc8b8b501392e29276b20528a873b1ae1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16327 Reviewed-by: Paul Luse Reviewed-by: Boris Glimcher Reviewed-by: Tomasz Zawadzki Reviewed-by: Konrad Sztyber Tested-by: SPDK CI Jenkins --- module/bdev/nvme/bdev_mdns_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/bdev/nvme/bdev_mdns_client.c b/module/bdev/nvme/bdev_mdns_client.c index 2616f62af..c9d323ffe 100644 --- a/module/bdev/nvme/bdev_mdns_client.c +++ b/module/bdev/nvme/bdev_mdns_client.c @@ -440,7 +440,7 @@ start_mdns_discovery_poller(void *arg) assert(arg); TAILQ_INSERT_TAIL(&g_mdns_discovery_ctxs, ctx, tailq); - ctx->poller = SPDK_POLLER_REGISTER(bdev_nvme_avahi_iterate, ctx, 1000 * 1000); + ctx->poller = SPDK_POLLER_REGISTER(bdev_nvme_avahi_iterate, ctx, 100 * 1000); } int