From: Matus Fabian Date: Sun, 24 Aug 2025 16:01:19 +0000 (-0400) Subject: http: remove assert in http2_req_state_tunnel_tx X-Git-Tag: v26.02-rc0~73 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=b30374d4f25cc03fd5be9eb5f917440783b87c4e;p=vpp.git http: remove assert in http2_req_state_tunnel_tx proxy app can send new payload before we were able to send previous Type: fix Change-Id: I7d0c2605da38e7495e3e26705f58a5370d1e296f Signed-off-by: Matus Fabian --- diff --git a/src/plugins/http/http.c b/src/plugins/http/http.c index 7341bdf7e76..7bfe5ea32bd 100644 --- a/src/plugins/http/http.c +++ b/src/plugins/http/http.c @@ -570,8 +570,8 @@ http_ts_connected_callback (u32 http_app_index, u32 ho_hc_index, session_t *ts, hc_handle.conn_index = new_hc_index; ts->opaque = hc_handle.as_u32; - HTTP_DBG (1, "half-open hc index %x, hc [%u]%x", ho_hc_index, - ts->thread_index, new_hc_index); + HTTP_DBG (1, "half-open hc index %x, hc [%u]%x", ts->thread_index, + ho_hc_index, new_hc_index); if ((rv = http_vfts[hc->version].transport_connected_callback (hc))) { @@ -1257,7 +1257,7 @@ http_app_tx_callback (void *session, transport_send_params_t *sp) hc_index = http_vfts[hr_handle.version].hc_index_get_by_req_index ( hr_handle.req_index, as->thread_index); - HTTP_DBG (1, "hc [%u]%x", hc_index, as->connection_index); + HTTP_DBG (1, "hc [%u]%x", as->thread_index, hc_index); hc = http_conn_get_w_thread (hc_index, as->thread_index); @@ -1289,7 +1289,7 @@ http_app_rx_evt_cb (transport_connection_t *tc) http_conn_t *hc; http_req_handle_t hr_handle; - HTTP_DBG (1, "hc [%u]%x", vlib_get_thread_index (), req->hr_hc_index); + HTTP_DBG (1, "hc [%u]%x", req->c_thread_index, req->hr_hc_index); hr_handle.as_u32 = req->hr_req_handle; hc = http_conn_get_w_thread (req->hr_hc_index, req->c_thread_index); diff --git a/src/plugins/http/http2/http2.c b/src/plugins/http/http2/http2.c index 5ecf8cc6fcb..5b3b8536fd0 100644 --- a/src/plugins/http/http2/http2.c +++ b/src/plugins/http/http2/http2.c @@ -1867,10 +1867,17 @@ http2_req_state_tunnel_tx (http_conn_t *hc, http2_req_t *req, { http2_conn_ctx_t *h2c; - ASSERT (!clib_llist_elt_is_linked (req, sched_list)); - HTTP_DBG (1, "tunnel received data from app"); + /* zero-copy proxy app can program new tx event before we were able to send + * previous payload, because fifos are shared, UDP/TCP clears evt on rx and + * proxy app program new tx evt for http */ + if (clib_llist_elt_is_linked (req, sched_list)) + { + http_req_deschedule (&req->base, sp); + return HTTP_SM_STOP; + } + /* add data back to stream scheduler */ HTTP_DBG (1, "adding to data queue req_index %x", ((http_req_handle_t) req->base.hr_req_handle).req_index); diff --git a/src/plugins/http/http_private.h b/src/plugins/http/http_private.h index 5b8f2c48942..1c906715b55 100644 --- a/src/plugins/http/http_private.h +++ b/src/plugins/http/http_private.h @@ -828,7 +828,7 @@ http_conn_accept_request (http_conn_t *hc, http_req_t *req) app_worker_t *app_wrk; int rv; - HTTP_DBG (1, "hc [%u]%x req %x", hc->hc_hc_index, hc->c_thread_index, + HTTP_DBG (1, "hc [%u]%x req %x", hc->c_thread_index, hc->hc_hc_index, req->hr_req_handle); /* allocate app session and initialize */