UDP can return EINVAL if the route is down or not configured, this can
cause knet to 'spin' (well, ish, there is a usleep in there).
With this patch in place knet doesn't hog the CPU anywhere near so much
(and it does recover if the link returns).
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
read_errs_from_sock(knet_h, sockfd);
return 0;
}
+ if (recv_errno == EINVAL) {
+ return -1;
+ }
if ((recv_errno == ENOBUFS) || (recv_errno == EAGAIN)) {
#ifdef DEBUG
log_debug(knet_h, KNET_SUB_TRANSP_UDP, "Sock: %d is overloaded. Slowing TX down", sockfd);