mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 15:17:01 +02:00
MINOR: quic: remove unneeded QUIC specific stopping function
On CONNECTION_CLOSE reception/emission, QUIC connections enter CLOSING state. At this stage, only CONNECTION_CLOSE can be reemitted and all other exchanges are stopped. Previously, on haproxy process stopping, if all QUIC connections were in CLOSING state, they were released before their closing timer expiration to not block the process shutdown. However, since a recent commit, the closing timer has been shorten to a more reasonable delay. It is now consider viable to respect connections closing state even on process shutdown. As such, stopping specific code in QUIC connections idle timer task was removed. A specific function quic_handle_stopping() was implemented to notify QUIC connections on shutdown from main() function. It should have been deleted along the removal in QUIC idle timer task. This patch just does this.
This commit is contained in:
parent
756b3c5f7b
commit
decf29d06d
@ -606,20 +606,6 @@ int qc_parse_hd_form(struct quic_rx_packet *pkt,
|
||||
int quic_dgram_parse(struct quic_dgram *dgram, struct quic_conn *qc,
|
||||
struct listener *li);
|
||||
|
||||
/* Wake up every QUIC connections on closing/draining state if process stopping
|
||||
* is active. They will be immediately released so this ensures haproxy process
|
||||
* stopping is not delayed by them.
|
||||
*/
|
||||
static inline void quic_handle_stopping(void)
|
||||
{
|
||||
struct quic_conn *qc;
|
||||
|
||||
if (stopping) {
|
||||
list_for_each_entry(qc, &th_ctx->quic_conns_clo, el_th_ctx)
|
||||
task_wakeup(qc->idle_timer_task, TASK_WOKEN_OTHER);
|
||||
}
|
||||
}
|
||||
|
||||
int qc_set_tid_affinity(struct quic_conn *qc, uint new_tid, struct listener *new_li);
|
||||
void qc_finalize_affinity_rebind(struct quic_conn *qc);
|
||||
|
||||
|
@ -2995,9 +2995,6 @@ void run_poll_loop()
|
||||
/* stop muxes/quic-conns before acknowledging stopping */
|
||||
if (!(tg_ctx->stopping_threads & ti->ltid_bit)) {
|
||||
task_wakeup(mux_stopping_data[tid].task, TASK_WOKEN_OTHER);
|
||||
#ifdef USE_QUIC
|
||||
quic_handle_stopping();
|
||||
#endif
|
||||
wake = 1;
|
||||
}
|
||||
|
||||
|
@ -2021,9 +2021,11 @@ void qc_finalize_affinity_rebind(struct quic_conn *qc)
|
||||
BUG_ON(!(qc->flags & QUIC_FL_CONN_AFFINITY_CHANGED));
|
||||
qc->flags &= ~QUIC_FL_CONN_AFFINITY_CHANGED;
|
||||
|
||||
/* A connection must not pass to closing state until affinity rebind
|
||||
* is completed. Else quic_handle_stopping() may miss it during process
|
||||
* stopping cleanup.
|
||||
/* If quic_conn is closing it is unnecessary to migrate it as it will
|
||||
* be soon released. Besides, special care must be taken for CLOSING
|
||||
* connections (using quic_cc_conn and th_ctx.quic_conns_clo list for
|
||||
* instance). This should never occur as CLOSING connections are
|
||||
* skipped by quic_sock_accept_conn().
|
||||
*/
|
||||
BUG_ON(qc->flags & (QUIC_FL_CONN_CLOSING|QUIC_FL_CONN_DRAINING));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user