From: Matus Fabian Date: Mon, 22 Sep 2025 15:18:25 +0000 (-0400) Subject: http: add stream reset countres to the stats X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=6de136a5818409f8175fe9f2233178c015d75550;p=vpp.git http: add stream reset countres to the stats Type: improvement Change-Id: Id255a0e03f127576abcdc7a0e025c9f3c3eb6981 Signed-off-by: Matus Fabian --- diff --git a/src/plugins/http/http2/http2.c b/src/plugins/http/http2/http2.c index dc3dd3e8c6a..f09bc2d98f4 100644 --- a/src/plugins/http/http2/http2.c +++ b/src/plugins/http/http2/http2.c @@ -2517,6 +2517,7 @@ http2_handle_rst_stream_frame (http_conn_t *hc, http2_frame_header_t *fh) } req->stream_state = HTTP2_STREAM_STATE_CLOSED; + http_stats_stream_reset_by_peer_inc (hc->c_thread_index); if (!(req->flags & HTTP2_REQ_F_APP_CLOSED)) session_transport_reset_notify (&req->base.connection); @@ -2950,6 +2951,7 @@ http2_app_reset_callback (http_conn_t *hc, u32 req_index, req_index); req = http2_req_get (req_index, thread_index); req->flags |= HTTP2_REQ_F_APP_CLOSED; + http_stats_stream_reset_by_app_inc (thread_index); http2_send_stream_error (hc, req->stream_id, req->base.is_tunnel ? HTTP2_ERROR_CONNECT_ERROR : HTTP2_ERROR_INTERNAL_ERROR, diff --git a/src/plugins/http/http_private.h b/src/plugins/http/http_private.h index 0fdb632e498..f5d600c5164 100644 --- a/src/plugins/http/http_private.h +++ b/src/plugins/http/http_private.h @@ -26,6 +26,8 @@ static const http_token_t http2_conn_preface = { http_token_lit ( _ (connections_reset_by_app, "connections reset by app") \ _ (app_streams_opened, "application streams opened") \ _ (app_streams_closed, "application streams closed") \ + _ (stream_reset_by_peer, "streams reset by peer") \ + _ (stream_reset_by_app, "streams reset by app") \ _ (requests_received, "requests received") \ _ (requests_sent, "requests sent") \ _ (responses_received, "responses received") \