MINOR: stream-int: remove dependency on CO_FL_WAIT_ROOM for rcv_buf()

The only case where this made sense was with mux_h1 but Since we
introduced CS_FL_MAY_SPLICE, we don't need to rely on this anymore,
thus we don't need to clear it either when we do not splice.

There is a last check on this flag used to determine if the rx channel
is full and that cannot go away unless it's changed to use the CS
instead but for now this wouldn't add any benefit so better not do
it yet.
This commit is contained in:
Willy Tarreau 2020-01-17 17:24:30 +01:00
parent e2a0eeca77
commit 93c9f59a9c

View File

@ -1316,10 +1316,6 @@ int si_cs_recv(struct conn_stream *cs)
/* splice not possible (anymore), let's go on on standard copy */ /* splice not possible (anymore), let's go on on standard copy */
} }
else {
/* be sure not to block regular receive path below */
conn->flags &= ~CO_FL_WAIT_ROOM;
}
abort_splice: abort_splice:
if (ic->pipe && unlikely(!ic->pipe->data)) { if (ic->pipe && unlikely(!ic->pipe->data)) {
@ -1344,7 +1340,7 @@ int si_cs_recv(struct conn_stream *cs)
* recv(). * recv().
*/ */
while ((cs->flags & CS_FL_RCV_MORE) || while ((cs->flags & CS_FL_RCV_MORE) ||
(!(conn->flags & (CO_FL_ERROR | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE)) && (!(conn->flags & (CO_FL_ERROR | CO_FL_HANDSHAKE)) &&
(!(cs->flags & (CS_FL_ERROR|CS_FL_EOS))) && !(ic->flags & CF_SHUTR))) { (!(cs->flags & (CS_FL_ERROR|CS_FL_EOS))) && !(ic->flags & CF_SHUTR))) {
/* <max> may be null. This is the mux responsibility to set /* <max> may be null. This is the mux responsibility to set
* CS_FL_RCV_MORE on the CS if more space is needed. * CS_FL_RCV_MORE on the CS if more space is needed.