Be more verbose about errors on the receive path.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
6daff667c5
commit
321330501f
6
udp.c
6
udp.c
|
@ -275,6 +275,10 @@ static int receive(int fd, void *buf, int buflen,
|
||||||
} else if (errno == EAGAIN) {
|
} else if (errno == EAGAIN) {
|
||||||
usleep(1);
|
usleep(1);
|
||||||
} else {
|
} else {
|
||||||
|
if (flags == MSG_ERRQUEUE)
|
||||||
|
pr_err("recvmsg tx timestamp failed: %m");
|
||||||
|
else
|
||||||
|
pr_err("recvmsg failed: %m");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,6 +298,8 @@ static int receive(int fd, void *buf, int buflen,
|
||||||
|
|
||||||
if (!ts) {
|
if (!ts) {
|
||||||
memset(&hwts->ts, 0, sizeof(hwts->ts));
|
memset(&hwts->ts, 0, sizeof(hwts->ts));
|
||||||
|
if (cnt > 0)
|
||||||
|
pr_err("missing SO_TIMESTAMPING message");
|
||||||
return cnt;
|
return cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue