[PATCH] sunrpc: Improvements for UDP client timeout handling [BZ #20257]

Florian Weimer fweimer@redhat.com
Tue Feb 14 13:32:00 GMT 2017


On 02/09/2017 04:36 PM, Florian Weimer wrote:
> This commit fixes various aspects in the UDP client timeout handling.
> Timeouts are now applied in a more consistent fashion.  Discarded UDP
> packets no longer prevent the timeout from happening at all.
>
> 2017-02-09  Florian Weimer  <fweimer@redhat.com>
>
> 	[BZ #20257]
> 	* inet/Makefile (routines): Add deadline.
> 	(tests-static): Add tst-deadline.
> 	* inet/net-internal.h (struct deadline_current_time)
> 	(__deadline_current_time, struct deadline, __deadline_is_infinite)
> 	(__deadline_elapsed, __deadline_first, __deadline_from_timeval)
> 	(__deadline_to_ms, __is_timeval_valid_timeout): Declare.
> 	* inet/deadline.c: New file.
> 	* inet/tst-deadline.c: Likewise.
> 	* sunrpc/Makefile (tests): Add tst-udp-timeout, tst-udp-garbage.
> 	(tst-udp-timeout): Link against libc.so explicitly.
> 	(tst-udp-garbage): Likewise.  Also link against thread library.
> 	* sunrpc/clnt_udp.c (clntudp_call): Rework timeout handling.
> 	* sunrpc/tst-udp-garbage.c: New file.
> 	* sunrpc/tst-udp-timeout.c: Likewise.

This patch breaks non-blocking use of clnt_call, as used by ypbind. 
I'll come up with yet another a test case and a fix.

Thanks,
Florian



More information about the Libc-alpha mailing list