From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id D7575324B for ; Fri, 27 Jul 2018 10:24:57 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Jul 2018 01:24:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,408,1526367600"; d="scan'208";a="76406417" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 27 Jul 2018 01:24:36 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id w6R8OZm7009868; Fri, 27 Jul 2018 09:24:35 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id w6R8OZCV024161; Fri, 27 Jul 2018 09:24:35 +0100 Received: (from aburakov@localhost) by sivswdev01.ir.intel.com with LOCAL id w6R8OZwh024149; Fri, 27 Jul 2018 09:24:35 +0100 From: Anatoly Burakov To: dev@dpdk.org Cc: Bruce Richardson , thomas@monjalon.net, changqingx.wu@intel.com Date: Fri, 27 Jul 2018 09:24:35 +0100 Message-Id: <7679658279b52ae069260b62696398a97648eb6a.1532679585.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] eal/bsd: silence not supported error in interrupts X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2018 08:24:58 -0000 Currently, nic_uio driver does not support interrupts, so any attempts to install an interrupt handler will fail with a not supported error, which will cause an error message that is confusing to the user. Silence this error by moving it to debug log level, and reword the message to avoid containing the word "Error", to avoid triggering DTS test failures [1]. [1] https://git.dpdk.org/tools/dts/tree/tests/ TestSuite_scatter.py?#n110 Fixes: 23150bd8d8a8 ("eal/bsd: add interrupt thread") Signed-off-by: Anatoly Burakov --- lib/librte_eal/bsdapp/eal/eal_interrupts.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_interrupts.c b/lib/librte_eal/bsdapp/eal/eal_interrupts.c index 29356f320..2feee2d52 100644 --- a/lib/librte_eal/bsdapp/eal/eal_interrupts.c +++ b/lib/librte_eal/bsdapp/eal/eal_interrupts.c @@ -156,8 +156,18 @@ rte_intr_callback_register(const struct rte_intr_handle *intr_handle, * add the intr file descriptor into wait list. */ if (kevent(kq, &ke, 1, NULL, 0, NULL) < 0) { - RTE_LOG(ERR, EAL, "Error adding fd %d kevent, %s\n", - src->intr_handle.fd, strerror(errno)); + /* currently, nic_uio does not support interrupts, so + * this error will always be triggered and output to the + * user. so, don't output it unless debug log level set. + */ + if (errno == ENODEV) + RTE_LOG(DEBUG, EAL, "Interrupt handle %d not supported\n", + src->intr_handle.fd); + else + RTE_LOG(ERR, EAL, "Error adding fd %d " + "kevent, %s\n", + src->intr_handle.fd, + strerror(errno)); ret = -errno; goto fail; } -- 2.17.1