mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: stream-int: Remove SI_FL_INDEP_STR to rely on CS flags instead
Flag to consider a stream as indepenent is now handled at the conn-stream level. Thus SI_FL_INDEP_STR stream-int flag is replaced by CS_FL_INDEP_STR conn-stream flags.
This commit is contained in:
parent
974da9f8a4
commit
a728518c15
@ -219,6 +219,7 @@ void show_cs_flags(unsigned int f)
|
|||||||
printf("0\n");
|
printf("0\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
SHOW_FLAG(f, CS_FL_INDEP_STR);
|
||||||
SHOW_FLAG(f, CS_FL_DONT_WAKE);
|
SHOW_FLAG(f, CS_FL_DONT_WAKE);
|
||||||
SHOW_FLAG(f, CS_FL_NOLINGER);
|
SHOW_FLAG(f, CS_FL_NOLINGER);
|
||||||
SHOW_FLAG(f, CS_FL_NOHALF);
|
SHOW_FLAG(f, CS_FL_NOHALF);
|
||||||
@ -268,7 +269,6 @@ void show_si_flags(unsigned int f)
|
|||||||
|
|
||||||
SHOW_FLAG(f, SI_FL_WAIT_DATA);
|
SHOW_FLAG(f, SI_FL_WAIT_DATA);
|
||||||
SHOW_FLAG(f, SI_FL_ISBACK);
|
SHOW_FLAG(f, SI_FL_ISBACK);
|
||||||
SHOW_FLAG(f, SI_FL_INDEP_STR);
|
|
||||||
SHOW_FLAG(f, SI_FL_SRC_ADDR);
|
SHOW_FLAG(f, SI_FL_SRC_ADDR);
|
||||||
SHOW_FLAG(f, SI_FL_WANT_GET);
|
SHOW_FLAG(f, SI_FL_WANT_GET);
|
||||||
SHOW_FLAG(f, SI_FL_CLEAN_ABRT);
|
SHOW_FLAG(f, SI_FL_CLEAN_ABRT);
|
||||||
|
@ -86,6 +86,7 @@ enum {
|
|||||||
CS_FL_NOLINGER = 0x00000008, /* may close without lingering. One-shot. */
|
CS_FL_NOLINGER = 0x00000008, /* may close without lingering. One-shot. */
|
||||||
CS_FL_NOHALF = 0x00000010, /* no half close, close both sides at once */
|
CS_FL_NOHALF = 0x00000010, /* no half close, close both sides at once */
|
||||||
CS_FL_DONT_WAKE = 0x00000020, /* resync in progress, don't wake up */
|
CS_FL_DONT_WAKE = 0x00000020, /* resync in progress, don't wake up */
|
||||||
|
CS_FL_INDEP_STR = 0x00000040, /* independent streams = don't update rex on write */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* cs_shutr() modes */
|
/* cs_shutr() modes */
|
||||||
|
@ -86,7 +86,6 @@ enum {
|
|||||||
/* unused: 0x00000001, 0x00000002 */
|
/* unused: 0x00000001, 0x00000002 */
|
||||||
SI_FL_WAIT_DATA = 0x00000008, /* stream-int waits for more outgoing data to send */
|
SI_FL_WAIT_DATA = 0x00000008, /* stream-int waits for more outgoing data to send */
|
||||||
SI_FL_ISBACK = 0x00000010, /* 0 for front-side SI, 1 for back-side */
|
SI_FL_ISBACK = 0x00000010, /* 0 for front-side SI, 1 for back-side */
|
||||||
SI_FL_INDEP_STR = 0x00000040, /* independent streams = don't update rex on write */
|
|
||||||
SI_FL_SRC_ADDR = 0x00001000, /* get the source ip/port with getsockname */
|
SI_FL_SRC_ADDR = 0x00001000, /* get the source ip/port with getsockname */
|
||||||
/* unused: 0x00000200 */
|
/* unused: 0x00000200 */
|
||||||
SI_FL_WANT_GET = 0x00004000, /* a stream-int would like to get some data from the buffer */
|
SI_FL_WANT_GET = 0x00004000, /* a stream-int would like to get some data from the buffer */
|
||||||
|
@ -2305,9 +2305,9 @@ int stream_set_backend(struct stream *s, struct proxy *be)
|
|||||||
proxy_inc_be_ctr(be);
|
proxy_inc_be_ctr(be);
|
||||||
|
|
||||||
/* assign new parameters to the stream from the new backend */
|
/* assign new parameters to the stream from the new backend */
|
||||||
cs_si(s->csb)->flags &= ~SI_FL_INDEP_STR;
|
s->csb->flags &= ~CS_FL_INDEP_STR;
|
||||||
if (be->options2 & PR_O2_INDEPSTR)
|
if (be->options2 & PR_O2_INDEPSTR)
|
||||||
cs_si(s->csb)->flags |= SI_FL_INDEP_STR;
|
s->csb->flags |= CS_FL_INDEP_STR;
|
||||||
|
|
||||||
if (tick_isset(be->timeout.serverfin))
|
if (tick_isset(be->timeout.serverfin))
|
||||||
s->csb->hcto = be->timeout.serverfin;
|
s->csb->hcto = be->timeout.serverfin;
|
||||||
|
@ -458,12 +458,12 @@ struct stream *stream_new(struct session *sess, struct conn_stream *cs, struct b
|
|||||||
s->csf->hcto = sess->fe->timeout.clientfin;
|
s->csf->hcto = sess->fe->timeout.clientfin;
|
||||||
|
|
||||||
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
|
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
|
||||||
cs_si(s->csf)->flags |= SI_FL_INDEP_STR;
|
s->csf->flags |= CS_FL_INDEP_STR;
|
||||||
|
|
||||||
cs_si(s->csb)->flags = SI_FL_ISBACK;
|
cs_si(s->csb)->flags = SI_FL_ISBACK;
|
||||||
s->csb->hcto = TICK_ETERNITY;
|
s->csb->hcto = TICK_ETERNITY;
|
||||||
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
|
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
|
||||||
cs_si(s->csb)->flags |= SI_FL_INDEP_STR;
|
s->csb->flags |= CS_FL_INDEP_STR;
|
||||||
|
|
||||||
if (cs->endp->flags & CS_EP_WEBSOCKET)
|
if (cs->endp->flags & CS_EP_WEBSOCKET)
|
||||||
s->flags |= SF_WEBSOCKET;
|
s->flags |= SF_WEBSOCKET;
|
||||||
|
@ -459,7 +459,7 @@ static void stream_int_notify(struct stream_interface *si)
|
|||||||
if (tick_isset(oc->wex))
|
if (tick_isset(oc->wex))
|
||||||
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
||||||
|
|
||||||
if (!(si->flags & SI_FL_INDEP_STR))
|
if (!(si->cs->flags & CS_FL_INDEP_STR))
|
||||||
if (tick_isset(ic->rex))
|
if (tick_isset(ic->rex))
|
||||||
ic->rex = tick_add_ifset(now_ms, ic->rto);
|
ic->rex = tick_add_ifset(now_ms, ic->rto);
|
||||||
}
|
}
|
||||||
@ -912,7 +912,7 @@ void si_update_tx(struct stream_interface *si)
|
|||||||
si->flags &= ~SI_FL_WAIT_DATA;
|
si->flags &= ~SI_FL_WAIT_DATA;
|
||||||
if (!tick_isset(oc->wex)) {
|
if (!tick_isset(oc->wex)) {
|
||||||
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
||||||
if (tick_isset(ic->rex) && !(si->flags & SI_FL_INDEP_STR)) {
|
if (tick_isset(ic->rex) && !(si->cs->flags & CS_FL_INDEP_STR)) {
|
||||||
/* Note: depending on the protocol, we don't know if we're waiting
|
/* Note: depending on the protocol, we don't know if we're waiting
|
||||||
* for incoming data or not. So in order to prevent the socket from
|
* for incoming data or not. So in order to prevent the socket from
|
||||||
* expiring read timeouts during writes, we refresh the read timeout,
|
* expiring read timeouts during writes, we refresh the read timeout,
|
||||||
@ -1216,7 +1216,7 @@ static void stream_int_chk_snd_conn(struct stream_interface *si)
|
|||||||
!channel_is_empty(oc))
|
!channel_is_empty(oc))
|
||||||
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
||||||
|
|
||||||
if (tick_isset(ic->rex) && !(si->flags & SI_FL_INDEP_STR)) {
|
if (tick_isset(ic->rex) && !(cs->flags & CS_FL_INDEP_STR)) {
|
||||||
/* Note: to prevent the client from expiring read timeouts
|
/* Note: to prevent the client from expiring read timeouts
|
||||||
* during writes, we refresh it. We only do this if the
|
* during writes, we refresh it. We only do this if the
|
||||||
* interface is not configured for "independent streams",
|
* interface is not configured for "independent streams",
|
||||||
|
Loading…
Reference in New Issue
Block a user