[6.0] 55ef1bcdf Remove VDP_push's "bottom" argument, we always build VDP stacks from the top down.
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Feb 6 10:11:09 UTC 2019
commit 55ef1bcdf4fd776230145f30a25e0f39c600aa3d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Fri Oct 12 11:45:57 2018 +0000
Remove VDP_push's "bottom" argument, we always build VDP stacks
from the top down.
Conflicts:
bin/varnishd/cache/cache_req_fsm.c
The conflict was just the result of cherry-picking changes out of order,
nothing to be worried about.
diff --git a/bin/varnishd/cache/cache_deliver_proc.c b/bin/varnishd/cache/cache_deliver_proc.c
index f943d3f53..99b2c8318 100644
--- a/bin/varnishd/cache/cache_deliver_proc.c
+++ b/bin/varnishd/cache/cache_deliver_proc.c
@@ -74,7 +74,7 @@ VDP_bytes(struct req *req, enum vdp_action act, const void *ptr, ssize_t len)
}
int
-VDP_push(struct req *req, const struct vdp *vdp, void *priv, int bottom)
+VDP_Push(struct req *req, const struct vdp *vdp, void *priv)
{
struct vdp_entry *vdpe;
struct vdp_ctx *vdc;
@@ -102,10 +102,7 @@ VDP_push(struct req *req, const struct vdp *vdp, void *priv, int bottom)
INIT_OBJ(vdpe, VDP_ENTRY_MAGIC);
vdpe->vdp = vdp;
vdpe->priv = priv;
- if (bottom)
- VTAILQ_INSERT_TAIL(&vdc->vdp, vdpe, list);
- else
- VTAILQ_INSERT_HEAD(&vdc->vdp, vdpe, list);
+ VTAILQ_INSERT_TAIL(&vdc->vdp, vdpe, list);
vdc->nxt = VTAILQ_FIRST(&vdc->vdp);
AZ(vdc->retval);
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index e73663896..bed475be0 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -837,9 +837,9 @@ ved_deliver(struct req *req, struct boc *boc, int wantbody)
ved_stripgzip(req, boc);
} else {
if (ecx->isgzip && !i)
- (void)VDP_push(req, &ved_vdp_pgz, ecx, 1);
+ (void)VDP_Push(req, &ved_vdp_pgz, ecx);
else
- (void)VDP_push(req, &ved_ved, ecx->preq, 1);
+ (void)VDP_Push(req, &ved_ved, ecx->preq);
(void)VDP_DeliverObj(req);
(void)VDP_bytes(req, VDP_FLUSH, NULL, 0);
}
diff --git a/bin/varnishd/cache/cache_filter.h b/bin/varnishd/cache/cache_filter.h
index 6c2c04b70..778236994 100644
--- a/bin/varnishd/cache/cache_filter.h
+++ b/bin/varnishd/cache/cache_filter.h
@@ -134,6 +134,6 @@ struct vdp_ctx {
};
int VDP_bytes(struct req *, enum vdp_action act, const void *ptr, ssize_t len);
-int VDP_push(struct req *, const struct vdp *, void *priv, int bottom);
+int VDP_Push(struct req *, const struct vdp *, void *priv);
void VRT_AddVDP(VRT_CTX, const struct vdp *);
void VRT_RemoveVDP(VRT_CTX, const struct vdp *);
diff --git a/bin/varnishd/cache/cache_range.c b/bin/varnishd/cache/cache_range.c
index c6cf1fd3c..8bcec96d4 100644
--- a/bin/varnishd/cache/cache_range.c
+++ b/bin/varnishd/cache/cache_range.c
@@ -181,7 +181,7 @@ vrg_dorange(struct req *req, const char *r)
vrg_priv->range_off = 0;
vrg_priv->range_low = low;
vrg_priv->range_high = high + 1;
- if (VDP_push(req, &vrg_vdp, vrg_priv, 1))
+ if (VDP_Push(req, &vrg_vdp, vrg_priv))
return ("WS too small");
http_PutResponse(req->resp, "HTTP/1.1", 206, NULL);
return (NULL);
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index 0ca6714c1..cd01c2976 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -374,13 +374,13 @@ cnt_transmit(struct worker *wrk, struct req *req)
if (!req->disable_esi && req->resp_len != 0 &&
ObjHasAttr(wrk, req->objcore, OA_ESIDATA) &&
- VDP_push(req, &VDP_esi, NULL, 0) < 0)
+ VDP_Push(req, &VDP_esi, NULL) < 0)
err++;
if (cache_param->http_gzip_support &&
ObjCheckFlag(req->wrk, req->objcore, OF_GZIPED) &&
!RFC2616_Req_Gzip(req->http) &&
- VDP_push(req, &VDP_gunzip, NULL, 1) < 0)
+ VDP_Push(req, &VDP_gunzip, NULL) < 0)
err++;
if (cache_param->http_range_support && status == 200) {
diff --git a/bin/varnishd/http1/cache_http1_deliver.c b/bin/varnishd/http1/cache_http1_deliver.c
index 03c5f3ba8..12bcaa545 100644
--- a/bin/varnishd/http1/cache_http1_deliver.c
+++ b/bin/varnishd/http1/cache_http1_deliver.c
@@ -127,7 +127,7 @@ V1D_Deliver(struct req *req, struct boc *boc, int sendbody)
if (req->resp_len == 0)
sendbody = 0;
- if (sendbody && VDP_push(req, &v1d_vdp, NULL, 1)) {
+ if (sendbody && VDP_Push(req, &v1d_vdp, NULL)) {
v1d_error(req, "workspace_thread overflow");
AZ(req->wrk->v1l);
return;
diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c
index 60d35bc40..c40124e40 100644
--- a/bin/varnishd/http2/cache_http2_deliver.c
+++ b/bin/varnishd/http2/cache_http2_deliver.c
@@ -306,7 +306,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody)
/* XXX someone into H2 please add appropriate error handling */
if (sendbody) {
- if (!VDP_push(req, &h2_vdp, NULL, 1))
+ if (!VDP_Push(req, &h2_vdp, NULL))
(void)VDP_DeliverObj(req);
}
More information about the varnish-commit
mailing list