MINOR: streams: Remove SF_CURR_SESS

The SF_CURR_SESS flag was used to indicate that the stream incremented
cur_sess. Now that cur_sess is gone, the flag is no longer needed.
This commit is contained in:
Olivier Houchard 2026-02-03 07:21:38 +01:00 committed by Olivier Houchard
parent e3c4ae966c
commit 9d749374ea
5 changed files with 4 additions and 23 deletions

View File

@ -46,7 +46,7 @@
#define SF_FORCE_PRST 0x00000010 /* force persistence here, even if server is down */
#define SF_MONITOR 0x00000020 /* this stream comes from a monitoring system */
#define SF_CURR_SESS 0x00000040 /* a connection is currently being counted on the server */
/* 0x00000040 unused */
#define SF_CONN_EXP 0x00000080 /* timeout has expired */
#define SF_REDISP 0x00000100 /* set if this stream was redispatched from one server to another */
#define SF_IGNORE 0x00000200 /* The stream lead to a mux upgrade, and should be ignored */
@ -120,8 +120,8 @@ static forceinline char *strm_show_flags(char *buf, size_t len, const char *deli
_e(SF_ERR_MASK, SF_ERR_UP, _e(SF_ERR_MASK, SF_ERR_CHK_PORT))))))))))));
_(SF_DIRECT, _(SF_ASSIGNED, _(SF_MAYALLOC, _(SF_BE_ASSIGNED, _(SF_FORCE_PRST,
_(SF_MONITOR, _(SF_CURR_SESS, _(SF_CONN_EXP, _(SF_REDISP,
_(SF_IGNORE, _(SF_REDIRECTABLE, _(SF_HTX))))))))))));
_(SF_MONITOR, _(SF_CONN_EXP, _(SF_REDISP,
_(SF_IGNORE, _(SF_REDIRECTABLE, _(SF_HTX)))))))))));
/* epilogue */
_(~0U);

View File

@ -2276,7 +2276,6 @@ int connect_server(struct stream *s)
s->conn_exp = tick_add_ifset(now_ms, s->connect_timeout);
if (srv) {
s->flags |= SF_CURR_SESS;
if (s->be->lbprm.server_take_conn)
s->be->lbprm.server_take_conn(srv);
}
@ -2783,9 +2782,6 @@ void back_handle_st_cer(struct stream *s)
health_adjust(__objt_server(s->target), HANA_STATUS_L4_ERR);
if (s->flags & SF_CURR_SESS)
s->flags &= ~SF_CURR_SESS;
if ((sc->flags & SC_FL_ERROR) &&
conn && conn->err_code == CO_ER_SSL_MISMATCH_SNI) {
/* We tried to connect to a server which is configured

View File

@ -3534,9 +3534,6 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
stream_del_srv_conn(s);
if (objt_server(s->target)) {
if (s->flags & SF_CURR_SESS) {
s->flags &= ~SF_CURR_SESS;
}
if (may_dequeue_tasks(__objt_server(s->target), be))
process_srv_queue(__objt_server(s->target));
}
@ -3566,7 +3563,7 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
s->res.to_forward = 0;
s->pcli_flags &= ~PCLI_F_BIDIR;
s->flags &= ~(SF_DIRECT|SF_ASSIGNED|SF_BE_ASSIGNED|SF_FORCE_PRST|SF_IGNORE_PRST);
s->flags &= ~(SF_CURR_SESS|SF_REDIRECTABLE|SF_SRV_REUSED);
s->flags &= ~(SF_REDIRECTABLE|SF_SRV_REUSED);
s->flags &= ~(SF_ERR_MASK|SF_FINST_MASK|SF_REDISP);
s->conn_retries = 0; /* used for logging too */
s->conn_exp = TICK_ETERNITY;

View File

@ -1191,9 +1191,6 @@ static __inline int do_l7_retry(struct stream *s, struct stconn *sc)
return -1;
s->conn_retries++;
if (objt_server(s->target)) {
if (s->flags & SF_CURR_SESS)
s->flags &= ~SF_CURR_SESS;
if (s->sv_tgcounters)
_HA_ATOMIC_INC(&s->sv_tgcounters->retries);
}

View File

@ -630,9 +630,6 @@ void stream_free(struct stream *s)
pendconn_free(s);
if (objt_server(s->target)) { /* there may be requests left pending in queue */
if (s->flags & SF_CURR_SESS)
s->flags &= ~SF_CURR_SESS;
if (may_dequeue_tasks(__objt_server(s->target), s->be))
process_srv_queue(__objt_server(s->target));
}
@ -2056,9 +2053,6 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
scb->state = SC_ST_CLO;
srv = objt_server(s->target);
if (srv) {
if (s->flags & SF_CURR_SESS)
s->flags &= ~SF_CURR_SESS;
/*
* We don't want to release the slot just yet
* if we're using strict-maxconn, we want to
@ -2980,9 +2974,6 @@ void stream_shutdown_self(struct stream *stream, int why)
stream->flags |= why;
if (objt_server(stream->target)) {
if (stream->flags & SF_CURR_SESS)
stream->flags &= ~SF_CURR_SESS;
sess_change_server(stream, NULL);
if (may_dequeue_tasks(objt_server(stream->target), stream->be))
process_srv_queue(objt_server(stream->target));