ipc: fix send error handling
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 26 Apr 2019 10:27:17 +0000 (11:27 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 3 May 2019 12:25:55 +0000 (14:25 +0200)
According to manpage, ENOBUFS error indicates that either the
input or the output queue is full. This should be considered
an error, but it is treated as an "ignore" condition. Fix the
code to report an error instead.

Fixes: bacaa2754017 ("eal: add channel for multi-process communication")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Rami Rosen <ramirose@gmail.com>
lib/librte_eal/common/eal_common_proc.c

index ef5eddb..8586474 100644 (file)
@@ -678,11 +678,6 @@ send_msg(const char *dst_path, struct rte_mp_msg *msg, int type)
                        unlink(dst_path);
                        return 0;
                }
-               if (errno == ENOBUFS) {
-                       RTE_LOG(ERR, EAL, "Peer cannot receive message %s\n",
-                               dst_path);
-                       return 0;
-               }
                RTE_LOG(ERR, EAL, "failed to send to (%s) due to %s\n",
                        dst_path, strerror(errno));
                return -1;