]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream-int: remove dependency on CO_FL_WAIT_ROOM for rcv_buf()
authorWilly Tarreau <w@1wt.eu>
Fri, 17 Jan 2020 16:24:30 +0000 (17:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Jan 2020 16:24:30 +0000 (17:24 +0100)
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.

src/stream_interface.c

index a2ea7d7790ccff91039d1d9f0d590860cdd156ae..ba82cae94552b9dec040e1d2a16b9bca18246cee 100644 (file)
@@ -1316,10 +1316,6 @@ int si_cs_recv(struct conn_stream *cs)
 
                /* 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:
        if (ic->pipe && unlikely(!ic->pipe->data)) {
@@ -1344,7 +1340,7 @@ int si_cs_recv(struct conn_stream *cs)
         * recv().
         */
        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))) {
                /* <max> may be null. This is the mux responsibility to set
                 * CS_FL_RCV_MORE on the CS if more space is needed.