Commit ae6dfe2e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Further reduce transport code frobbing of req->req_step

parent efca75a5
......@@ -187,10 +187,10 @@ ved_include(struct req *preq, const char *src, const char *host,
req->transport = &VED_transport;
req->transport_priv = ecx;
CNT_Embark(wrk, req);
VCL_TaskEnter(req->privs);
while (1) {
CNT_Embark(wrk, req);
ecx->woken = 0;
s = CNT_Request(req);
if (s == REQ_FSM_DONE)
......@@ -204,7 +204,6 @@ ved_include(struct req *preq, const char *src, const char *host,
&ecx->preq->wrk->cond, &sp->mtx, 0);
Lck_Unlock(&sp->mtx);
AZ(req->wrk);
CNT_Embark(wrk, req);
}
VCL_Rel(&req->vcl);
......
......@@ -250,6 +250,7 @@ Req_Cleanup(struct sess *sp, struct worker *wrk, struct req *req)
req->hash_ignore_busy = 0;
req->esi_level = 0;
req->is_hit = 0;
req->req_step = R_STP_TRANSPORT;
if (WS_Overflowed(req->ws))
wrk->stats->ws_client_overflow++;
......
......@@ -389,17 +389,15 @@ HTTP1_Session(struct worker *wrk, struct req *req)
return;
}
}
req->req_step = R_STP_TRANSPORT;
assert(req->req_step == R_STP_TRANSPORT);
VCL_TaskEnter(req->privs);
VCL_TaskEnter(req->top->privs);
http1_setstate(sp, H1PROC);
} else if (st == H1PROC) {
req->task->func = http1_req;
req->task->priv = req;
wrk->stats->client_req++;
CNT_Embark(wrk, req);
if (req->req_step == R_STP_TRANSPORT) {
VCL_TaskEnter(req->privs);
VCL_TaskEnter(req->top->privs);
}
if (CNT_Request(req) == REQ_FSM_DISEMBARK)
return;
AZ(req->top->vcl0);
......
......@@ -525,10 +525,6 @@ h2_do_req(struct worker *wrk, void *priv)
CAST_OBJ_NOTNULL(r2, req->transport_priv, H2_REQ_MAGIC);
THR_SetRequest(req);
CNT_Embark(wrk, req);
if (req->req_step == R_STP_TRANSPORT) {
VCL_TaskEnter(req->privs);
VCL_TaskEnter(req->top->privs);
}
wrk->stats->client_req++;
if (CNT_Request(req) != REQ_FSM_DISEMBARK) {
......@@ -598,6 +594,8 @@ h2_end_headers(struct worker *wrk, struct h2_sess *h2,
AN(req->http->hd[HTTP_HDR_PROTO].b);
assert(req->req_step == R_STP_TRANSPORT);
VCL_TaskEnter(req->privs);
VCL_TaskEnter(req->top->privs);
req->task->func = h2_do_req;
req->task->priv = req;
r2->scheduled = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment