Commit Graph

2 Commits

Author SHA1 Message Date
Harald Welte 7d6688f9bc add module parameter "sleep_on_enobufs" to work around -ENOBUFS
AF_PACKET sockets have these incredibly useful semantics in where
for both non-blocking and blocking I/O, they will tell you the
socket is rwite-able, but then still return -1 and sett errno=ENOBUFS
if the current socket buffer / transmit queue is full.

All we can do is usleep and retry.  The new module parameter, if set
to non-zero, determines the number of microseconds we shall sleep before
any retry.  If set to zero, the existing behavior is preserved:
TTCN_error().

Related: SYS#5343
Change-Id: I1608403d94a10ae52c7e1de0f1b02687b048c01e
2021-01-29 21:29:17 +01:00
Harald Welte 7f7437b0d7 initial check-in of new Linux AF_PACKET test port 2020-09-09 11:59:10 +02:00