eal/bsd: silence unsupported interrupts error
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 27 Jul 2018 08:24:35 +0000 (09:24 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 1 Aug 2018 16:25:05 +0000 (18:25 +0200)
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

index 29356f3..2feee2d 100644 (file)
@@ -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;
                }