[master] 993ca79 Don't reembark h2 streams as http/1 requests

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Oct 3 12:30:12 UTC 2017


commit 993ca79eb8b2890d2e893dbea57364b590d8860e
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Oct 3 14:22:55 2017 +0200

    Don't reembark h2 streams as http/1 requests

diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index bd0716e..bc3a86d 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -362,7 +362,7 @@ SES_New(struct pool *pp)
  */
 
 int
-SES_Reschedule_Req(struct req *req)
+SES_Reschedule_Req(struct req *req, enum task_prio prio)
 {
 	struct sess *sp;
 	struct pool *pp;
@@ -372,10 +372,11 @@ SES_Reschedule_Req(struct req *req)
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	pp = sp->pool;
 	CHECK_OBJ_NOTNULL(pp, POOL_MAGIC);
+	AN(TASK_QUEUE_CLIENT(prio));
 
 	AN(req->task.func);
 
-	return (Pool_Task(pp, &req->task, TASK_QUEUE_REQ));
+	return (Pool_Task(pp, &req->task, prio));
 }
 
 /*--------------------------------------------------------------------
diff --git a/bin/varnishd/cache/cache_varnishd.h b/bin/varnishd/cache/cache_varnishd.h
index d81edcf..4e67f7b 100644
--- a/bin/varnishd/cache/cache_varnishd.h
+++ b/bin/varnishd/cache/cache_varnishd.h
@@ -172,7 +172,7 @@ void SES_DestroyPool(struct pool *);
 void SES_Wait(struct sess *, const struct transport *);
 void SES_Ref(struct sess *sp);
 void SES_Rel(struct sess *sp);
-int SES_Reschedule_Req(struct req *);
+int SES_Reschedule_Req(struct req *, enum task_prio);
 
 enum htc_status_e {
 	HTC_S_JUNK =		-5,
diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c
index 58748d3..6e8de47 100644
--- a/bin/varnishd/http1/cache_http1_fsm.c
+++ b/bin/varnishd/http1/cache_http1_fsm.c
@@ -188,7 +188,7 @@ http1_reembark(struct worker *wrk, struct req *req)
 
 	http1_setstate(sp, H1BUSY);
 
-	if (!SES_Reschedule_Req(req))
+	if (!SES_Reschedule_Req(req, TASK_QUEUE_REQ))
 		return;
 
 	/* Couldn't schedule, ditch */
diff --git a/bin/varnishd/http2/cache_http2_session.c b/bin/varnishd/http2/cache_http2_session.c
index f679a3a..567e908 100644
--- a/bin/varnishd/http2/cache_http2_session.c
+++ b/bin/varnishd/http2/cache_http2_session.c
@@ -357,7 +357,7 @@ h2_reembark(struct worker *wrk, struct req *req)
 	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
 	assert(req->transport == &H2_transport);
 
-	if (!SES_Reschedule_Req(req))
+	if (!SES_Reschedule_Req(req, TASK_QUEUE_STR))
 		return;
 
 	/* Couldn't schedule, ditch */


More information about the varnish-commit mailing list