From 321330501f62f7a15dfa470ad11fac49c0ed3981 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 4 Mar 2012 08:23:40 +0100 Subject: [PATCH] Be more verbose about errors on the receive path. Signed-off-by: Richard Cochran --- udp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/udp.c b/udp.c index 0d92222..ef4ac86 100644 --- a/udp.c +++ b/udp.c @@ -275,6 +275,10 @@ static int receive(int fd, void *buf, int buflen, } else if (errno == EAGAIN) { usleep(1); } else { + if (flags == MSG_ERRQUEUE) + pr_err("recvmsg tx timestamp failed: %m"); + else + pr_err("recvmsg failed: %m"); break; } } @@ -294,6 +298,8 @@ static int receive(int fd, void *buf, int buflen, if (!ts) { memset(&hwts->ts, 0, sizeof(hwts->ts)); + if (cnt > 0) + pr_err("missing SO_TIMESTAMPING message"); return cnt; }