]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: stream-int: use si_rx_buff_{rdy,blk} to report buffer readiness
authorWilly Tarreau <w@1wt.eu>
Wed, 14 Nov 2018 14:12:08 +0000 (15:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 18 Nov 2018 20:41:47 +0000 (21:41 +0100)
commit8be7cd7b92d9189312a17d6acb9452133caa4665
treeb6770fcc2efae65c3a29c3a2422b8d07367bd9b7
parent32742fdf4548bd1f85b24c324a013f24a8eeb760
MEDIUM: stream-int: use si_rx_buff_{rdy,blk} to report buffer readiness

The stream interface used to conflate a missing buffer and lack of
buffer space into SI_FL_WAIT_ROOM but this causes difficulties as
these cannot be checked at the same moment and are not resolved at
the same moment either. Now we instead mark the buffer as presumably
available using si_rx_buff_rdy() and mark it as unavailable+requested
using si_rx_buff_blk().

The call to si_alloc_buf() was moved after si_stop_put(). This makes
sure that the SI_FL_RX_WAIT_EP flag is cleared on allocation failure so
that the function is called again if the callee fails to do its work.
include/proto/stream_interface.h
src/applet.c
src/stream.c