Re: [Linuxptp-users] Fw: “Resource temporarily unavailable” errors during flood ping test
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2012-10-30 17:05:59
|
On Tue, Oct 30, 2012 at 04:47:09PM +0100, Mario Molitor wrote: > > I have instrument the ptp4l code and I could see that a part of problem was a not correct error handling in the function sk_receive(). The recvmsg() returns sometime a EAGAIN and try-again variable was not increment. > I have changed this and now disappears this error message with GM Clock search during my flood ping test and it works all very well. > > My code changes: > --- a/sk.c > +++ b/sk.c > > } > if (errno == EINTR) { > try_again++; > - } else if (errno == EAGAIN) { > + } else if ((errno == EAGAIN ) || (errno == EWOULDBLOCK)) { This does not accomplish anything since: --- /usr/include/asm-generic/errno.h --- #define EWOULDBLOCK EAGAIN /* Operation would block */ > usleep(1); > + try_again++; This is the wrong solution. The right way is to set the tx_timestamp_retries configuration variable to a higher number, like 200 or 2000 instead of the default of 2. HTH, Richard |