From: Matus Fabian Date: Mon, 28 Apr 2025 11:28:40 +0000 (-0400) Subject: http: http2_transport_conn_reschedule_callback X-Git-Tag: v25.10-rc0~37 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F42906%2F3;p=vpp.git http: http2_transport_conn_reschedule_callback Type: improvement Change-Id: I96f9bf3587ccf9ed5b779d2d387785e91e9d303a Signed-off-by: Matus Fabian --- diff --git a/src/plugins/http/http2/http2.c b/src/plugins/http/http2/http2.c index 3c6949c3bc2..6c420c59625 100644 --- a/src/plugins/http/http2/http2.c +++ b/src/plugins/http/http2/http2.c @@ -1599,7 +1599,27 @@ http2_transport_reset_callback (http_conn_t *hc) static void http2_transport_conn_reschedule_callback (http_conn_t *hc) { - /* TODO */ + u32 req_index, stream_id; + http2_req_t *req; + http2_conn_ctx_t *h2c; + + HTTP_DBG (1, "hc [%u]%x", hc->c_thread_index, hc->hc_hc_index); + ASSERT (hc->flags & HTTP_CONN_F_HAS_REQUEST); + + if (!(hc->flags & HTTP_CONN_F_HAS_REQUEST)) + return; + + h2c = http2_conn_ctx_get_w_thread (hc); + hash_foreach ( + stream_id, req_index, h2c->req_by_stream_id, ({ + req = http2_req_get (req_index, hc->c_thread_index); + if (req->stream_state != HTTP2_STREAM_STATE_CLOSED && + transport_connection_is_descheduled (&req->base.connection)) + { + HTTP_DBG (1, "req_index %u", req_index); + transport_connection_reschedule (&req->base.connection); + } + })); } static void