Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
9699424c
Commit
9699424c
authored
Nov 13, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split params.h from heritage.h, they are different beasts now.
Reduce scope of heritage.h Reduce scope of libvcl.h
parent
4f9e61d6
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
38 additions
and
225 deletions
+38
-225
Makefile.am
bin/varnishd/Makefile.am
+1
-0
cache.h
bin/varnishd/cache.h
+2
-1
cache_acceptor.c
bin/varnishd/cache_acceptor.c
+1
-0
cache_cli.c
bin/varnishd/cache_cli.c
+1
-0
cache_main.c
bin/varnishd/cache_main.c
+1
-0
cache_panic.c
bin/varnishd/cache_panic.c
+1
-2
cache_pool.c
bin/varnishd/cache_pool.c
+1
-0
cache_vcl.c
bin/varnishd/cache_vcl.c
+16
-2
cache_vrt_var.c
bin/varnishd/cache_vrt_var.c
+1
-0
heritage.h
bin/varnishd/heritage.h
+0
-163
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+2
-1
mgt_cli.c
bin/varnishd/mgt/mgt_cli.c
+2
-1
mgt_param.c
bin/varnishd/mgt/mgt_param.c
+2
-1
mgt_pool.c
bin/varnishd/mgt/mgt_pool.c
+2
-1
mgt_sandbox.c
bin/varnishd/mgt/mgt_sandbox.c
+1
-1
mgt_shmem.c
bin/varnishd/mgt/mgt_shmem.c
+2
-1
params.h
bin/varnishd/params.h
+0
-34
varnishd.c
bin/varnishd/varnishd.c
+2
-1
libvcl.h
include/libvcl.h
+0
-1
vcc_compile.c
lib/libvcl/vcc_compile.c
+0
-15
No files found.
bin/varnishd/Makefile.am
View file @
9699424c
...
...
@@ -89,6 +89,7 @@ noinst_HEADERS = \
heritage.h
\
mgt/mgt.h
\
mgt/mgt_cli.h
\
params.h
\
storage/storage.h
\
storage/storage_persistent.h
\
vparam.h
...
...
bin/varnishd/cache.h
View file @
9699424c
...
...
@@ -55,7 +55,7 @@
#endif
#include "
heritage
.h"
#include "
params
.h"
enum
body_status
{
#define BODYSTATUS(U,l) BS_##U,
...
...
@@ -909,6 +909,7 @@ void VCL_Init(void);
void
VCL_Refresh
(
struct
VCL_conf
**
vcc
);
void
VCL_Rel
(
struct
VCL_conf
**
vcc
);
void
VCL_Poll
(
void
);
const
char
*
VCL_Return_Name
(
unsigned
method
);
#define VCL_MET_MAC(l,u,b) void VCL_##l##_method(struct sess *);
#include "tbl/vcl_returns.h"
...
...
bin/varnishd/cache_acceptor.c
View file @
9699424c
...
...
@@ -31,6 +31,7 @@
#include "config.h"
#include "cache.h"
#include "heritage.h"
#include "vcli.h"
#include "vcli_priv.h"
...
...
bin/varnishd/cache_cli.c
View file @
9699424c
...
...
@@ -39,6 +39,7 @@
#include <stddef.h> // offsetof
#include "cache.h"
#include "heritage.h"
#include "cache_backend.h" // struct vbc
#include "hash/hash_slinger.h" // struct objhead
...
...
bin/varnishd/cache_main.c
View file @
9699424c
...
...
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include "cache.h"
#include "heritage.h"
#include "waiter/cache_waiter.h"
#include "hash/hash_slinger.h"
...
...
bin/varnishd/cache_panic.c
View file @
9699424c
...
...
@@ -44,7 +44,6 @@
#include "cache_backend.h"
#include "waiter/cache_waiter.h"
#include "libvcl.h"
#include "vcl.h"
/*
...
...
@@ -226,7 +225,7 @@ pan_sess(const struct sess *sp)
#undef STEP
default:
stp
=
NULL
;
}
hand
=
VC
C
_Return_Name
(
sp
->
handling
);
hand
=
VC
L
_Return_Name
(
sp
->
handling
);
if
(
stp
!=
NULL
)
VSB_printf
(
vsp
,
" step = %s,
\n
"
,
stp
);
else
...
...
bin/varnishd/cache_pool.c
View file @
9699424c
...
...
@@ -46,6 +46,7 @@
#include <stdlib.h>
#include "cache.h"
#include "heritage.h"
#include "waiter/cache_waiter.h"
#include "vtcp.h"
...
...
bin/varnishd/cache_vcl.c
View file @
9699424c
...
...
@@ -38,7 +38,6 @@
#include "cache.h"
#include "libvcl.h"
#include "vcl.h"
#include "vcli.h"
#include "vcli_priv.h"
...
...
@@ -65,6 +64,21 @@ static struct vcls *vcl_active; /* protected by vcl_mtx */
/*--------------------------------------------------------------------*/
const
char
*
VCL_Return_Name
(
unsigned
method
)
{
switch
(
method
)
{
#define VCL_RET_MAC(l, U, B) case VCL_RET_##U: return(#l);
#include "tbl/vcl_returns.h"
#undef VCL_RET_MAC
default:
return
(
NULL
);
}
}
/*--------------------------------------------------------------------*/
static
void
VCL_Get
(
struct
VCL_conf
**
vcc
)
{
...
...
@@ -323,7 +337,7 @@ VCL_##func##_method(struct sess *sp) \
sp->cur_method = VCL_MET_ ## upper; \
WSP(sp, SLT_VCL_call, "%s", #func); \
(void)sp->vcl->func##_func(sp); \
WSP(sp, SLT_VCL_return, "%s", VC
C
_Return_Name(sp->handling)); \
WSP(sp, SLT_VCL_return, "%s", VC
L
_Return_Name(sp->handling)); \
sp->cur_method = 0; \
assert((1U << sp->handling) & bitmap); \
assert(!((1U << sp->handling) & ~bitmap)); \
...
...
bin/varnishd/cache_vrt_var.c
View file @
9699424c
...
...
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include "cache.h"
#include "heritage.h"
#include "cache_backend.h"
#include "vrt_obj.h"
...
...
bin/varnishd/heritage.h
View file @
9699424c
...
...
@@ -29,8 +29,6 @@
* This file contains the heritage passed when mgt forks cache
*/
#include "vre.h"
struct
listen_sock
{
unsigned
magic
;
#define LISTEN_SOCK_MAGIC 0x999e4b57
...
...
@@ -62,167 +60,6 @@ struct heritage {
char
identity
[
1024
];
};
struct
params
{
/* Unprivileged user / group */
char
*
user
;
uid_t
uid
;
char
*
group
;
gid_t
gid
;
/* TTL used for lack of anything better */
double
default_ttl
;
/* Default grace period */
double
default_grace
;
/* Default keep period */
double
default_keep
;
/* Maximum concurrent sessions */
unsigned
max_sess
;
/* Worker threads and pool */
unsigned
wthread_min
;
unsigned
wthread_max
;
unsigned
wthread_timeout
;
unsigned
wthread_pools
;
unsigned
wthread_add_threshold
;
unsigned
wthread_add_delay
;
unsigned
wthread_fail_delay
;
unsigned
wthread_purge_delay
;
unsigned
wthread_stats_rate
;
unsigned
wthread_stacksize
;
unsigned
wthread_workspace
;
unsigned
queue_max
;
/* Memory allocation hints */
unsigned
sess_workspace
;
unsigned
shm_workspace
;
unsigned
http_req_size
;
unsigned
http_req_hdr_len
;
unsigned
http_resp_size
;
unsigned
http_resp_hdr_len
;
unsigned
http_max_hdr
;
unsigned
shm_reclen
;
/* Acceptor hints */
unsigned
sess_timeout
;
unsigned
pipe_timeout
;
unsigned
send_timeout
;
unsigned
idle_send_timeout
;
/* Management hints */
unsigned
auto_restart
;
/* Fetcher hints */
unsigned
fetch_chunksize
;
unsigned
fetch_maxchunksize
;
unsigned
nuke_limit
;
#ifdef SENDFILE_WORKS
/* Sendfile object minimum size */
unsigned
sendfile_threshold
;
#endif
/* VCL traces */
unsigned
vcl_trace
;
/* Listen address */
char
*
listen_address
;
/* Listen depth */
unsigned
listen_depth
;
/* CLI related */
unsigned
cli_timeout
;
unsigned
ping_interval
;
/* LRU list ordering interval */
unsigned
lru_timeout
;
/* Maximum restarts allowed */
unsigned
max_restarts
;
/* Maximum esi:include depth allowed */
unsigned
max_esi_depth
;
/* ESI parser hints */
unsigned
esi_syntax
;
/* Rush exponent */
unsigned
rush_exponent
;
/* Default connection_timeout */
double
connect_timeout
;
/* Read timeouts for backend */
double
first_byte_timeout
;
double
between_bytes_timeout
;
/* How long to linger on sessions */
unsigned
session_linger
;
/* CLI buffer size */
unsigned
cli_buffer
;
/* Control diagnostic code */
unsigned
diag_bitmap
;
/* Log hash string to shm */
unsigned
log_hash
;
/* Log local socket address to shm */
unsigned
log_local_addr
;
/* Prefer IPv6 connections to backend*/
unsigned
prefer_ipv6
;
/* Acceptable clockskew with backends */
unsigned
clock_skew
;
/* Expiry pacer parameters */
double
expiry_sleep
;
/* Acceptor pacer parameters */
double
acceptor_sleep_max
;
double
acceptor_sleep_incr
;
double
acceptor_sleep_decay
;
/* Get rid of duplicate bans */
unsigned
ban_dups
;
/* How long time does the ban lurker sleep */
double
ban_lurker_sleep
;
/* Max size of the saintmode list. 0 == no saint mode. */
unsigned
saintmode_threshold
;
unsigned
syslog_cli_traffic
;
unsigned
http_range_support
;
unsigned
http_gzip_support
;
unsigned
gzip_stack_buffer
;
unsigned
gzip_tmp_space
;
unsigned
gzip_level
;
unsigned
gzip_window
;
unsigned
gzip_memlevel
;
double
critbit_cooloff
;
double
shortlived
;
struct
vre_limits
vre_limits
;
};
/*
* We declare this a volatile pointer, so that reads of parameters
* become atomic, leaving the CLI thread lattitude to change the values
*/
extern
volatile
struct
params
*
cache_param
;
extern
struct
heritage
heritage
;
void
child_main
(
void
);
bin/varnishd/mgt/mgt_child.c
View file @
9699424c
...
...
@@ -44,8 +44,9 @@
#include <unistd.h>
#include "mgt/mgt.h"
#include "heritage.h"
#include "params.h"
#include "vapi/vsm_int.h"
#include "vbm.h"
#include "vcli.h"
...
...
bin/varnishd/mgt/mgt_cli.c
View file @
9699424c
...
...
@@ -43,8 +43,9 @@
#include <unistd.h>
#include "mgt/mgt.h"
#include "heritage.h"
#include "params.h"
#include "vcli.h"
#include "vcli_common.h"
#include "vcli_priv.h"
...
...
bin/varnishd/mgt/mgt_param.c
View file @
9699424c
...
...
@@ -38,9 +38,10 @@
#include <unistd.h>
#include "mgt/mgt.h"
#include "heritage.h"
#include "params.h"
#include "waiter/cache_waiter.h"
#include "heritage.h"
#include "vav.h"
#include "vcli.h"
#include "vcli_common.h"
...
...
bin/varnishd/mgt/mgt_pool.c
View file @
9699424c
...
...
@@ -48,8 +48,9 @@
#include <unistd.h>
#include "mgt/mgt.h"
#include "heritage.h"
#include "params.h"
#include "vparam.h"
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/mgt/mgt_sandbox.c
View file @
9699424c
...
...
@@ -53,8 +53,8 @@
#include <unistd.h>
#include "mgt/mgt.h"
#include "heritage.h"
#include "params.h"
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/mgt/mgt_shmem.c
View file @
9699424c
...
...
@@ -98,9 +98,10 @@
#include <unistd.h>
#include "mgt/mgt.h"
#include "heritage.h"
#include "params.h"
#include "flopen.h"
#include "heritage.h"
#include "vapi/vsc_int.h"
#include "vapi/vsl_int.h"
#include "vapi/vsm_int.h"
...
...
bin/varnishd/params.h
View file @
9699424c
...
...
@@ -31,37 +31,6 @@
#include "vre.h"
struct
listen_sock
{
unsigned
magic
;
#define LISTEN_SOCK_MAGIC 0x999e4b57
VTAILQ_ENTRY
(
listen_sock
)
list
;
int
sock
;
char
*
name
;
struct
vss_addr
*
addr
;
};
VTAILQ_HEAD
(
listen_sock_head
,
listen_sock
);
struct
heritage
{
/* Two pipe(2)'s for CLI connection between cache and mgt. */
int
cli_in
;
int
cli_out
;
/* File descriptor for stdout/stderr */
int
std_fd
;
/* Sockets from which to accept connections */
struct
listen_sock_head
socks
;
unsigned
nsocks
;
/* Hash method */
const
struct
hash_slinger
*
hash
;
char
*
name
;
char
identity
[
1024
];
};
struct
params
{
/* Unprivileged user / group */
...
...
@@ -223,6 +192,3 @@ struct params {
* become atomic, leaving the CLI thread lattitude to change the values
*/
extern
volatile
struct
params
*
cache_param
;
extern
struct
heritage
heritage
;
void
child_main
(
void
);
bin/varnishd/varnishd.c
View file @
9699424c
...
...
@@ -44,9 +44,10 @@
#include <unistd.h>
#include "mgt/mgt.h"
#include "heritage.h"
#include "params.h"
#include "hash/hash_slinger.h"
#include "heritage.h"
#include "vav.h"
#include "vcli.h"
#include "vcli_common.h"
...
...
include/libvcl.h
View file @
9699424c
...
...
@@ -37,4 +37,3 @@ void VCC_VMOD_dir(struct vcc *, const char *str);
void
VCC_Err_Unref
(
struct
vcc
*
tl
,
unsigned
u
);
char
*
VCC_Compile
(
const
struct
vcc
*
,
struct
vsb
*
sb
,
const
char
*
b
);
const
char
*
VCC_Return_Name
(
unsigned
action
);
lib/libvcl/vcc_compile.c
View file @
9699424c
...
...
@@ -710,21 +710,6 @@ VCC_Compile(const struct vcc *tl, struct vsb *sb, const char *b)
return
(
r
);
}
/*--------------------------------------------------------------------*/
const
char
*
VCC_Return_Name
(
unsigned
method
)
{
switch
(
method
)
{
#define VCL_RET_MAC(l, U, B) case VCL_RET_##U: return(#l);
#include "tbl/vcl_returns.h"
#undef VCL_RET_MAC
default:
return
(
NULL
);
}
}
/*--------------------------------------------------------------------
* Allocate a compiler instance
*/
...
...
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