[master] 58b40c4 Kill h2->[tr]_window
Dag Haavi Finstad
daghf at varnish-software.com
Wed Oct 4 11:37:05 UTC 2017
commit 58b40c4f0c9d38951ec37ef713798fee33f427d2
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date: Thu Aug 17 15:33:11 2017 +0200
Kill h2->[tr]_window
Maintain stream 0 window limits via h2->req0.
diff --git a/bin/varnishd/http2/cache_http2.h b/bin/varnishd/http2/cache_http2.h
index f04fb0b..3b5ef99 100644
--- a/bin/varnishd/http2/cache_http2.h
+++ b/bin/varnishd/http2/cache_http2.h
@@ -144,9 +144,6 @@ struct h2_sess {
struct h2_req *mailcall;
pthread_cond_t *cond;
- int64_t r_window;
- int64_t t_window;
-
struct sess *sess;
int refcnt;
uint32_t highest_stream;
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index e3da09f..32aaf6f 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -660,7 +660,7 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
Lck_Lock(&h2->sess->mtx);
AZ(h2->mailcall);
h2->mailcall = r2;
- h2->r_window -= h2->rxf_len;
+ h2->req0->r_window -= h2->rxf_len;
r2->r_window -= h2->rxf_len;
// req_bodybytes accounted in CNT code.
if (r2->cond)
@@ -668,8 +668,8 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
while (h2->mailcall != NULL && h2->error == 0 && r2->error == 0)
AZ(Lck_CondWait(h2->cond, &h2->sess->mtx, 0));
wi = cache_param->h2_rx_window_increment;
- if (h2->r_window < cache_param->h2_rx_window_low_water) {
- h2->r_window += wi;
+ if (h2->req0->r_window < cache_param->h2_rx_window_low_water) {
+ h2->req0->r_window += wi;
w1 = 1;
}
if (r2->r_window < cache_param->h2_rx_window_low_water) {
More information about the varnish-commit
mailing list