http2: flow control and buffer improvements

- use bufq for send/receive of network data
- usd bufq for send/receive of stream data
- use HTTP/2 flow control with no-auto updates to control the
  amount of data we are buffering for a stream
  HTTP/2 stream window set to 128K after local tests, defined
  code constant for now
- elminiating PAUSEing nghttp2 processing when receiving data
  since a stream can now take in all DATA nghttp2 forwards

Improved scorecard and adjuste http2 stream window sizes
- scorecard improved output formatting and options default
- scorecard now also benchmarks small requests / second

Closes #10771
This commit is contained in:
Stefan Eissing 2023-03-30 12:13:49 +02:00 committed by Daniel Stenberg
parent 4ced75b7ce
commit 744dcf22fa
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
10 changed files with 716 additions and 746 deletions

View file

@ -4556,7 +4556,8 @@ CURLcode Curl_http_req_make(struct http_req **preq,
if(!req->path)
goto out;
}
Curl_dynhds_init(&req->headers, 128, DYN_H2_HEADERS);
Curl_dynhds_init(&req->headers, 0, DYN_H2_HEADERS);
Curl_dynhds_init(&req->trailers, 0, DYN_H2_TRAILERS);
result = CURLE_OK;
out:
@ -4573,6 +4574,7 @@ void Curl_http_req_free(struct http_req *req)
free(req->authority);
free(req->path);
Curl_dynhds_free(&req->headers);
Curl_dynhds_free(&req->trailers);
free(req);
}
}
@ -4594,7 +4596,8 @@ CURLcode Curl_http_resp_make(struct http_resp **presp,
if(!resp->description)
goto out;
}
Curl_dynhds_init(&resp->headers, 128, DYN_H2_HEADERS);
Curl_dynhds_init(&resp->headers, 0, DYN_H2_HEADERS);
Curl_dynhds_init(&resp->trailers, 0, DYN_H2_TRAILERS);
result = CURLE_OK;
out:
@ -4609,6 +4612,7 @@ void Curl_http_resp_free(struct http_resp *resp)
if(resp) {
free(resp->description);
Curl_dynhds_free(&resp->headers);
Curl_dynhds_free(&resp->trailers);
if(resp->prev)
Curl_http_resp_free(resp->prev);
free(resp);