From: Willy Tarreau Date: Tue, 9 Dec 2014 18:56:47 +0000 (+0100) Subject: OPTIM: stream-int: try to send pending spliced data X-Git-Tag: v1.6-dev1~208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56efc4896b71b0020a93744abce018835c16f346;p=thirdparty%2Fhaproxy.git OPTIM: stream-int: try to send pending spliced data This is the equivalent of eb9fd51 ("OPTIM: stream_sock: reduce the amount of in-flight spliced data") whose purpose is to try to immediately send spliced data if available. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 781f449343..bafb0d2c03 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -180,7 +180,8 @@ static void stream_int_update_embedded(struct stream_interface *si) si_chk_rcv(si->ob->prod); if (((si->ib->flags & CF_READ_PARTIAL) && !channel_is_empty(si->ib)) && - (si->ib->cons->flags & SI_FL_WAIT_DATA)) { + (si->ib->pipe /* always try to send spliced data */ || + (si->ib->buf->i == 0 && (si->ib->cons->flags & SI_FL_WAIT_DATA)))) { si_chk_snd(si->ib->cons); /* check if the consumer has freed some space */ if (!channel_full(si->ib) && !si->ib->pipe)