Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
9f50fc17
Commit
9f50fc17
authored
Aug 23, 2018
by
Poul-Henning Kamp
Committed by
Dridi Boukelmoune
Oct 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call VCL_Onboard whenever a req or bo gets a particular VCL for the first time.
parent
67ca3d89
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
0 deletions
+16
-0
cache_busyobj.c
bin/varnishd/cache/cache_busyobj.c
+1
-0
cache_esi_deliver.c
bin/varnishd/cache/cache_esi_deliver.c
+1
-0
cache_varnishd.h
bin/varnishd/cache/cache_varnishd.h
+1
-0
cache_vcl_vrt.c
bin/varnishd/cache/cache_vcl_vrt.c
+11
-0
cache_http1_fsm.c
bin/varnishd/http1/cache_http1_fsm.c
+1
-0
cache_http2_proto.c
bin/varnishd/http2/cache_http2_proto.c
+1
-0
No files found.
bin/varnishd/cache/cache_busyobj.c
View file @
9f50fc17
...
@@ -133,6 +133,7 @@ VBO_GetBusyObj(struct worker *wrk, const struct req *req)
...
@@ -133,6 +133,7 @@ VBO_GetBusyObj(struct worker *wrk, const struct req *req)
bo
->
director_req
=
req
->
director_hint
;
bo
->
director_req
=
req
->
director_hint
;
bo
->
vcl
=
req
->
vcl
;
bo
->
vcl
=
req
->
vcl
;
VCL_Ref
(
bo
->
vcl
);
VCL_Ref
(
bo
->
vcl
);
VCL_Onboard
(
NULL
,
bo
);
bo
->
t_first
=
bo
->
t_prev
=
NAN
;
bo
->
t_first
=
bo
->
t_prev
=
NAN
;
...
...
bin/varnishd/cache/cache_esi_deliver.c
View file @
9f50fc17
...
@@ -164,6 +164,7 @@ ved_include(struct req *preq, const char *src, const char *host,
...
@@ -164,6 +164,7 @@ ved_include(struct req *preq, const char *src, const char *host,
AZ
(
req
->
vcl
);
AZ
(
req
->
vcl
);
req
->
vcl
=
preq
->
vcl
;
req
->
vcl
=
preq
->
vcl
;
preq
->
vcl
=
NULL
;
preq
->
vcl
=
NULL
;
VCL_Onboard
(
req
,
NULL
);
req
->
req_step
=
R_STP_RECV
;
req
->
req_step
=
R_STP_RECV
;
req
->
t_req
=
preq
->
t_req
;
req
->
t_req
=
preq
->
t_req
;
...
...
bin/varnishd/cache/cache_varnishd.h
View file @
9f50fc17
...
@@ -388,6 +388,7 @@ void VCL_Poll(void);
...
@@ -388,6 +388,7 @@ void VCL_Poll(void);
void
VCL_Ref
(
struct
vcl
*
);
void
VCL_Ref
(
struct
vcl
*
);
void
VCL_Refresh
(
struct
vcl
**
);
void
VCL_Refresh
(
struct
vcl
**
);
void
VCL_Rel
(
struct
vcl
**
);
void
VCL_Rel
(
struct
vcl
**
);
void
VCL_Onboard
(
struct
req
*
,
struct
busyobj
*
);
const
char
*
VCL_Return_Name
(
unsigned
);
const
char
*
VCL_Return_Name
(
unsigned
);
const
char
*
VCL_Method_Name
(
unsigned
);
const
char
*
VCL_Method_Name
(
unsigned
);
void
VCL_Bo2Ctx
(
struct
vrt_ctx
*
,
struct
busyobj
*
);
void
VCL_Bo2Ctx
(
struct
vrt_ctx
*
,
struct
busyobj
*
);
...
...
bin/varnishd/cache/cache_vcl_vrt.c
View file @
9f50fc17
...
@@ -73,6 +73,16 @@ VCL_Method_Name(unsigned m)
...
@@ -73,6 +73,16 @@ VCL_Method_Name(unsigned m)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
void
VCL_Onboard
(
struct
req
*
req
,
struct
busyobj
*
bo
)
{
CHECK_OBJ_ORNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_ORNULL
(
bo
,
BUSYOBJ_MAGIC
);
assert
(
req
!=
NULL
||
bo
!=
NULL
);
assert
(
req
==
NULL
||
bo
==
NULL
);
}
void
void
VCL_Refresh
(
struct
vcl
**
vcc
)
VCL_Refresh
(
struct
vcl
**
vcc
)
{
{
...
@@ -265,6 +275,7 @@ VRT_vcl_select(VRT_CTX, VCL_VCL vcl)
...
@@ -265,6 +275,7 @@ VRT_vcl_select(VRT_CTX, VCL_VCL vcl)
vcl_get
(
&
req
->
vcl
,
vcl
);
vcl_get
(
&
req
->
vcl
,
vcl
);
/* XXX: better logging */
/* XXX: better logging */
VSLb
(
ctx
->
req
->
vsl
,
SLT_Debug
,
"Now using %s VCL"
,
vcl
->
loaded_name
);
VSLb
(
ctx
->
req
->
vsl
,
SLT_Debug
,
"Now using %s VCL"
,
vcl
->
loaded_name
);
VCL_Onboard
(
req
,
NULL
);
}
}
struct
vclref
*
struct
vclref
*
...
...
bin/varnishd/http1/cache_http1_fsm.c
View file @
9f50fc17
...
@@ -330,6 +330,7 @@ http1_dissect(struct worker *wrk, struct req *req)
...
@@ -330,6 +330,7 @@ http1_dissect(struct worker *wrk, struct req *req)
VCL_Refresh
(
&
wrk
->
vcl
);
VCL_Refresh
(
&
wrk
->
vcl
);
req
->
vcl
=
wrk
->
vcl
;
req
->
vcl
=
wrk
->
vcl
;
wrk
->
vcl
=
NULL
;
wrk
->
vcl
=
NULL
;
VCL_Onboard
(
req
,
NULL
);
HTTP_Setup
(
req
->
http
,
req
->
ws
,
req
->
vsl
,
SLT_ReqMethod
);
HTTP_Setup
(
req
->
http
,
req
->
ws
,
req
->
vsl
,
SLT_ReqMethod
);
req
->
err_code
=
HTTP1_DissectRequest
(
req
->
htc
,
req
->
http
);
req
->
err_code
=
HTTP1_DissectRequest
(
req
->
htc
,
req
->
http
);
...
...
bin/varnishd/http2/cache_http2_proto.c
View file @
9f50fc17
...
@@ -643,6 +643,7 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
...
@@ -643,6 +643,7 @@ h2_rx_headers(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
VCL_Refresh
(
&
wrk
->
vcl
);
VCL_Refresh
(
&
wrk
->
vcl
);
req
->
vcl
=
wrk
->
vcl
;
req
->
vcl
=
wrk
->
vcl
;
wrk
->
vcl
=
NULL
;
wrk
->
vcl
=
NULL
;
VCL_Onboard
(
req
,
NULL
);
req
->
acct
.
req_hdrbytes
+=
h2
->
rxf_len
;
req
->
acct
.
req_hdrbytes
+=
h2
->
rxf_len
;
HTTP_Setup
(
req
->
http
,
req
->
ws
,
req
->
vsl
,
SLT_ReqMethod
);
HTTP_Setup
(
req
->
http
,
req
->
ws
,
req
->
vsl
,
SLT_ReqMethod
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment