From 6490dbe4fe9d0bd457d035dcbc1fa755974faa1e Mon Sep 17 00:00:00 2001 From: Roman Penyaev Date: Wed, 18 Nov 2020 12:05:20 +0100 Subject: [PATCH] thread: don't output error in case of EAGAIN for interrupt mode Keep silence if nothing to read from message queue. Signed-off-by: Roman Penyaev Change-Id: I6f3df6a58e708aa424fe2c6ebca509c44062d12c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5153 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- lib/thread/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/thread/thread.c b/lib/thread/thread.c index b523b130d..ed00407d5 100644 --- a/lib/thread/thread.c +++ b/lib/thread/thread.c @@ -523,7 +523,7 @@ msg_queue_run_batch(struct spdk_thread *thread, uint32_t max_msgs) * This can avoid msg notification missing. */ rc = read(thread->msg_fd, ¬ify, sizeof(notify)); - if (rc < 0) { + if (rc < 0 && errno != EAGAIN) { SPDK_ERRLOG("failed to acknowledge msg_queue: %s.\n", spdk_strerror(errno)); } }