@@ -386,6 +386,11 @@ static void qcc_refresh_timeout(struct qcc *qcc)
386386 TRACE_LEAVE (QMUX_EV_QCS_NEW , qcc -> conn );
387387}
388388
389+ static void qcc_wakeup (struct qcc * qcc )
390+ {
391+ tasklet_wakeup (qcc -> wait_event .tasklet );
392+ }
393+
389394/* Mark a stream as open if it was idle. This can be used on every
390395 * successful emission/reception operation to update the stream state.
391396 */
@@ -711,7 +716,7 @@ void qcc_set_error(struct qcc *qcc, int err, int app)
711716 * is too tedious too not forget a wakeup outside of this function for
712717 * the moment.
713718 */
714- tasklet_wakeup (qcc -> wait_event . tasklet );
719+ qcc_wakeup (qcc );
715720}
716721
717722/* Increment glitch counter for <qcc> connection by <inc> steps. If configured
@@ -1065,7 +1070,7 @@ static void qcs_consume(struct qcs *qcs, uint64_t bytes)
10651070 frm -> max_stream_data .max_stream_data = qcs -> rx .msd ;
10661071
10671072 LIST_APPEND (& qcc -> lfctl .frms , & frm -> list );
1068- tasklet_wakeup (qcc -> wait_event . tasklet );
1073+ qcc_wakeup (qcc );
10691074 }
10701075
10711076 conn_fctl :
@@ -1083,7 +1088,7 @@ static void qcs_consume(struct qcs *qcs, uint64_t bytes)
10831088 frm -> max_data .max_data = qcc -> lfctl .md ;
10841089
10851090 LIST_APPEND (& qcs -> qcc -> lfctl .frms , & frm -> list );
1086- tasklet_wakeup ( qcs -> qcc -> wait_event . tasklet );
1091+ qcc_wakeup ( qcc );
10871092 }
10881093
10891094 TRACE_LEAVE (QMUX_EV_QCS_RECV , qcc -> conn , qcs );
@@ -1343,7 +1348,7 @@ void qcc_reset_stream(struct qcs *qcs, int err)
13431348 }
13441349
13451350 qcc_send_stream (qcs , 1 , 0 );
1346- tasklet_wakeup (qcc -> wait_event . tasklet );
1351+ qcc_wakeup (qcc );
13471352}
13481353
13491354/* Register <qcs> stream for emission of STREAM, STOP_SENDING or RESET_STREAM.
@@ -1391,7 +1396,7 @@ void qcc_abort_stream_read(struct qcs *qcs)
13911396 qcs -> flags |= (QC_SF_TO_STOP_SENDING |QC_SF_READ_ABORTED );
13921397
13931398 qcc_send_stream (qcs , 1 , 0 );
1394- tasklet_wakeup (qcc -> wait_event . tasklet );
1399+ qcc_wakeup (qcc );
13951400
13961401 end :
13971402 TRACE_LEAVE (QMUX_EV_QCC_NEW , qcc -> conn , qcs );
@@ -1424,7 +1429,7 @@ int qcc_install_app_ops(struct qcc *qcc, const struct qcc_app_ops *app_ops)
14241429 TRACE_ERROR ("app ops finalize error" , QMUX_EV_QCC_NEW , qcc -> conn );
14251430 goto err ;
14261431 }
1427- tasklet_wakeup (qcc -> wait_event . tasklet );
1432+ qcc_wakeup (qcc );
14281433 }
14291434
14301435 TRACE_LEAVE (QMUX_EV_QCC_NEW , qcc -> conn );
@@ -1603,7 +1608,7 @@ int qcc_recv_max_data(struct qcc *qcc, uint64_t max)
16031608 TRACE_DATA ("increase remote max-data" , QMUX_EV_QCC_RECV , qcc -> conn );
16041609
16051610 if (unblock_real )
1606- tasklet_wakeup (qcc -> wait_event . tasklet );
1611+ qcc_wakeup (qcc );
16071612
16081613 if (unblock_soft )
16091614 qcc_notify_fctl (qcc );
@@ -1649,7 +1654,7 @@ int qcc_recv_max_stream_data(struct qcc *qcc, uint64_t id, uint64_t max)
16491654 TRACE_DATA ("increase remote max-stream-data" , QMUX_EV_QCC_RECV |QMUX_EV_QCS_RECV , qcc -> conn , qcs );
16501655 if (unblock_real ) {
16511656 /* TODO optim: only wakeup IO-CB if stream has data to sent. */
1652- tasklet_wakeup (qcc -> wait_event . tasklet );
1657+ qcc_wakeup (qcc );
16531658 }
16541659
16551660 if (unblock_soft ) {
@@ -1899,7 +1904,7 @@ static int qcc_release_remote_stream(struct qcc *qcc, uint64_t id)
18991904 frm -> max_streams_bidi .max_streams = qcc -> lfctl .ms_bidi +
19001905 qcc -> lfctl .cl_bidi_r ;
19011906 LIST_APPEND (& qcc -> lfctl .frms , & frm -> list );
1902- tasklet_wakeup (qcc -> wait_event . tasklet );
1907+ qcc_wakeup (qcc );
19031908
19041909 qcc -> lfctl .ms_bidi += qcc -> lfctl .cl_bidi_r ;
19051910 qcc -> lfctl .cl_bidi_r = 0 ;
@@ -2407,7 +2412,7 @@ static int qcc_io_send(struct qcc *qcc)
24072412 }
24082413
24092414 if (!qfctl_rblocked (& qcc -> tx .fc ))
2410- tasklet_wakeup (qcc -> wait_event . tasklet );
2415+ qcc_wakeup (qcc );
24112416 }
24122417
24132418 out :
@@ -2952,7 +2957,7 @@ static int qmux_init(struct connection *conn, struct proxy *prx,
29522957 LIST_APPEND (& mux_stopping_data [tid ].list , & conn -> stopping_list );
29532958
29542959 /* init read cycle */
2955- tasklet_wakeup (qcc -> wait_event . tasklet );
2960+ qcc_wakeup (qcc );
29562961
29572962 TRACE_LEAVE (QMUX_EV_QCC_NEW , conn );
29582963 return 0 ;
@@ -3098,7 +3103,7 @@ static size_t qmux_strm_rcv_buf(struct stconn *sc, struct buffer *buf,
30983103
30993104 qcs -> flags &= ~QC_SF_DEM_FULL ;
31003105 if (!(qcc -> flags & QC_CF_ERRL ))
3101- tasklet_wakeup (qcc -> wait_event . tasklet );
3106+ qcc_wakeup (qcc );
31023107 }
31033108
31043109 TRACE_LEAVE (QMUX_EV_STRM_RECV , qcc -> conn , qcs );
@@ -3162,7 +3167,7 @@ static size_t qmux_strm_snd_buf(struct stconn *sc, struct buffer *buf,
31623167 if (data || fin )
31633168 qcc_send_stream (qcs , 0 , data );
31643169 if (!(qcs -> qcc -> wait_event .events & SUB_RETRY_SEND ))
3165- tasklet_wakeup (qcs -> qcc -> wait_event . tasklet );
3170+ qcc_wakeup (qcs -> qcc );
31663171 }
31673172
31683173 end :
@@ -3283,7 +3288,7 @@ static size_t qmux_strm_done_ff(struct stconn *sc)
32833288 if (data || qcs -> flags & QC_SF_FIN_STREAM )
32843289 qcc_send_stream (qcs , 0 , data );
32853290 if (!(qcs -> qcc -> wait_event .events & SUB_RETRY_SEND ))
3286- tasklet_wakeup (qcc -> wait_event . tasklet );
3291+ qcc_wakeup (qcc );
32873292
32883293 end :
32893294 TRACE_LEAVE (QMUX_EV_STRM_SEND , qcs -> qcc -> conn , qcs );
@@ -3381,7 +3386,7 @@ static void qmux_strm_shut(struct stconn *sc, unsigned int mode, struct se_abort
33813386 qcc_reset_stream (qcs , 0 );
33823387 }
33833388
3384- tasklet_wakeup (qcc -> wait_event . tasklet );
3389+ qcc_wakeup (qcc );
33853390 }
33863391
33873392 out :
0 commit comments