DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	thomas@monjalon.net, changqingx.wu@intel.com
Subject: [dpdk-dev] [PATCH] eal/bsd: silence not supported error in interrupts
Date: Fri, 27 Jul 2018 09:24:35 +0100	[thread overview]
Message-ID: <7679658279b52ae069260b62696398a97648eb6a.1532679585.git.anatoly.burakov@intel.com> (raw)

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 <anatoly.burakov@intel.com>
---
 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

             reply	other threads:[~2018-07-27  8:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  8:24 Anatoly Burakov [this message]
2018-08-01 15:54 ` Thomas Monjalon
2018-08-03  1:54 ` Zhao, MeijuanX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7679658279b52ae069260b62696398a97648eb6a.1532679585.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=changqingx.wu@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).