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
6bc1ffc3
Commit
6bc1ffc3
authored
Apr 22, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move beresp.ttl/grace/keep to busyobj
parent
ee5ded36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
31 deletions
+39
-31
cache_vrt_var.c
bin/varnishd/cache/cache_vrt_var.c
+36
-28
generate.py
lib/libvcl/generate.py
+3
-3
No files found.
bin/varnishd/cache/cache_vrt_var.c
View file @
6bc1ffc3
...
...
@@ -386,10 +386,10 @@ VRT_r_req_restarts(const struct req *req)
#define VRT_DO_EXP(which, exp, fld, offset, extra) \
\
void \
VRT_l_##which##_##fld(struct
req *req
, double a) \
VRT_l_##which##_##fld(struct
CPAR *px
, double a) \
{ \
\
CHECK_OBJ_NOTNULL(
req, REQ_MAGIC);
\
CHECK_OBJ_NOTNULL(
px, CMAGIC);
\
if (a > 0.) \
a += offset; \
EXP_Set_##fld(&exp, a); \
...
...
@@ -397,10 +397,10 @@ VRT_l_##which##_##fld(struct req *req, double a) \
} \
\
double \
VRT_r_##which##_##fld(const struct
req *req
) \
VRT_r_##which##_##fld(const struct
CPAR *px
) \
{ \
\
CHECK_OBJ_NOTNULL(
req, REQ_MAGIC);
\
CHECK_OBJ_NOTNULL(
px, CMAGIC);
\
return(EXP_Get_##fld(&exp) - offset); \
}
...
...
@@ -414,30 +414,38 @@ vrt_wsp_exp(struct vsl_log *vsl, unsigned xid, double now, const struct exp *e)
xid
,
e
->
ttl
-
dt
,
e
->
grace
,
e
->
keep
,
now
,
e
->
age
+
dt
);
}
VRT_DO_EXP
(
req
,
req
->
exp
,
ttl
,
0
,
)
VRT_DO_EXP
(
req
,
req
->
exp
,
grace
,
0
,
)
VRT_DO_EXP
(
req
,
req
->
exp
,
keep
,
0
,
)
VRT_DO_EXP
(
obj
,
req
->
obj
->
exp
,
grace
,
0
,
EXP_Rearm
(
req
->
obj
);
vrt_wsp_exp
(
req
->
vsl
,
req
->
obj
->
vxid
,
req
->
t_req
,
&
req
->
obj
->
exp
);)
VRT_DO_EXP
(
obj
,
req
->
obj
->
exp
,
ttl
,
(
req
->
t_req
-
req
->
obj
->
exp
.
entered
),
EXP_Rearm
(
req
->
obj
);
vrt_wsp_exp
(
req
->
vsl
,
req
->
obj
->
vxid
,
req
->
t_req
,
&
req
->
obj
->
exp
);)
VRT_DO_EXP
(
obj
,
req
->
obj
->
exp
,
keep
,
0
,
EXP_Rearm
(
req
->
obj
);
vrt_wsp_exp
(
req
->
vsl
,
req
->
obj
->
vxid
,
req
->
t_req
,
&
req
->
obj
->
exp
);)
VRT_DO_EXP
(
beresp
,
req
->
busyobj
->
exp
,
grace
,
0
,
vrt_wsp_exp
(
req
->
vsl
,
req
->
vsl
->
wid
&
VSL_IDENTMASK
,
req
->
busyobj
->
exp
.
entered
,
&
req
->
busyobj
->
exp
);)
VRT_DO_EXP
(
beresp
,
req
->
busyobj
->
exp
,
ttl
,
0
,
vrt_wsp_exp
(
req
->
vsl
,
req
->
vsl
->
wid
&
VSL_IDENTMASK
,
req
->
busyobj
->
exp
.
entered
,
&
req
->
busyobj
->
exp
);)
VRT_DO_EXP
(
beresp
,
req
->
busyobj
->
exp
,
keep
,
0
,
vrt_wsp_exp
(
req
->
vsl
,
req
->
vsl
->
wid
&
VSL_IDENTMASK
,
req
->
busyobj
->
exp
.
entered
,
&
req
->
busyobj
->
exp
);)
#define CPAR req
#define CMAGIC REQ_MAGIC
VRT_DO_EXP
(
req
,
px
->
exp
,
ttl
,
0
,
)
VRT_DO_EXP
(
req
,
px
->
exp
,
grace
,
0
,
)
VRT_DO_EXP
(
req
,
px
->
exp
,
keep
,
0
,
)
VRT_DO_EXP
(
obj
,
px
->
obj
->
exp
,
grace
,
0
,
EXP_Rearm
(
px
->
obj
);
vrt_wsp_exp
(
px
->
vsl
,
px
->
obj
->
vxid
,
px
->
t_req
,
&
px
->
obj
->
exp
);)
VRT_DO_EXP
(
obj
,
px
->
obj
->
exp
,
ttl
,
(
px
->
t_req
-
px
->
obj
->
exp
.
entered
),
EXP_Rearm
(
px
->
obj
);
vrt_wsp_exp
(
px
->
vsl
,
px
->
obj
->
vxid
,
px
->
t_req
,
&
px
->
obj
->
exp
);)
VRT_DO_EXP
(
obj
,
px
->
obj
->
exp
,
keep
,
0
,
EXP_Rearm
(
px
->
obj
);
vrt_wsp_exp
(
px
->
vsl
,
px
->
obj
->
vxid
,
px
->
t_req
,
&
px
->
obj
->
exp
);)
#undef CPAR
#undef CMAGIC
#define CPAR busyobj
#define CMAGIC BUSYOBJ_MAGIC
VRT_DO_EXP
(
beresp
,
px
->
exp
,
grace
,
0
,
vrt_wsp_exp
(
px
->
vsl
,
px
->
vsl
->
wid
&
VSL_IDENTMASK
,
px
->
exp
.
entered
,
&
px
->
exp
);)
VRT_DO_EXP
(
beresp
,
px
->
exp
,
ttl
,
0
,
vrt_wsp_exp
(
px
->
vsl
,
px
->
vsl
->
wid
&
VSL_IDENTMASK
,
px
->
exp
.
entered
,
&
px
->
exp
);)
VRT_DO_EXP
(
beresp
,
px
->
exp
,
keep
,
0
,
vrt_wsp_exp
(
px
->
vsl
,
px
->
vsl
->
wid
&
VSL_IDENTMASK
,
px
->
exp
.
entered
,
&
px
->
exp
);)
#undef CPAR
#undef CMAGIC
/*--------------------------------------------------------------------
* req.xid
...
...
lib/libvcl/generate.py
View file @
6bc1ffc3
...
...
@@ -355,19 +355,19 @@ sp_variables = (
'DURATION'
,
(
'backend_response'
,),
(
'backend_response'
,),
'
R
'
'
B
'
),
(
'beresp.grace'
,
'DURATION'
,
(
'backend_response'
,),
(
'backend_response'
,),
'
R
'
'
B
'
),
(
'beresp.keep'
,
'DURATION'
,
(
'backend_response'
,),
(
'backend_response'
,),
'
R
'
'
B
'
),
(
'beresp.backend.name'
,
'STRING'
,
...
...
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