]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: channel: No longer notify the producer in co_skip()/co_htx_skip()
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 27 Apr 2021 21:06:20 +0000 (23:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 28 Apr 2021 09:08:35 +0000 (11:08 +0200)
Thanks to the commit "BUG/MINOR: applet: Notify the other side if data were
consumed by an applet", it is no longer necessary to notify the producer when an
applet skips output data. Now, it is the default applet handler responsibility
to take care of that.

include/haproxy/channel.h

index 65c294fe14251b38d283d488b32d21d89f410490..aa1996f4f9288ae604f41af29b664248319835d9 100644 (file)
@@ -925,36 +925,26 @@ static inline int32_t channel_htx_fwd_headers(struct channel *chn, struct htx *h
  * when data have been read directly from the buffer. It is illegal to call
  * this function with <len> causing a wrapping at the end of the buffer. It's
  * the caller's responsibility to ensure that <len> is never larger than
- * chn->o. Channel flags WRITE_PARTIAL and WROTE_DATA are set.
+ * chn->o.
  */
 static inline void co_skip(struct channel *chn, int len)
 {
        b_del(&chn->buf, len);
        chn->output -= len;
        c_realign_if_empty(chn);
-
-       /* notify that some data was written to the SI from the buffer */
-       chn->flags |= CF_WRITE_PARTIAL | CF_WROTE_DATA;
-       chn_prod(chn)->flags &= ~SI_FL_RXBLK_ROOM; // si_rx_room_rdy()
 }
 
 /* HTX version of co_skip(). This function skips at most <len> bytes from the
  * output of the channel <chn>. Depending on how data are stored in <htx> less
- * than <len> bytes can be skipped. Channel flags WRITE_PARTIAL and WROTE_DATA
- * are set.
+ * than <len> bytes can be skipped..
  */
 static inline void co_htx_skip(struct channel *chn, struct htx *htx, int len)
 {
        struct htx_ret htxret;
 
        htxret = htx_drain(htx, len);
-       if (htxret.ret) {
+       if (htxret.ret)
                chn->output -= htxret.ret;
-
-               /* notify that some data was written to the SI from the buffer */
-               chn->flags |= CF_WRITE_PARTIAL | CF_WROTE_DATA;
-               chn_prod(chn)->flags &= ~SI_FL_RXBLK_ROOM; // si_rx_room_rdy()
-       }
 }
 
 /* Tries to copy chunk <chunk> into the channel's buffer after length controls.