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
ba9a6117
Commit
ba9a6117
authored
Mar 09, 2015
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collaps the backend TCP pools to only identify by {IPv4+IPv6}
parent
70e143c1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
10 deletions
+5
-10
cache_backend.h
bin/varnishd/cache/cache_backend.h
+1
-1
cache_backend_cfg.c
bin/varnishd/cache/cache_backend_cfg.c
+1
-2
cache_backend_tcp.c
bin/varnishd/cache/cache_backend_tcp.c
+3
-7
No files found.
bin/varnishd/cache/cache_backend.h
View file @
ba9a6117
...
@@ -116,7 +116,7 @@ void VBP_Remove(struct backend *b, struct vrt_backend_probe const *p);
...
@@ -116,7 +116,7 @@ void VBP_Remove(struct backend *b, struct vrt_backend_probe const *p);
void
VBP_Use
(
const
struct
backend
*
b
,
const
struct
vrt_backend_probe
*
p
);
void
VBP_Use
(
const
struct
backend
*
b
,
const
struct
vrt_backend_probe
*
p
);
void
VBP_Summary
(
struct
cli
*
cli
,
const
struct
vbp_target
*
vt
);
void
VBP_Summary
(
struct
cli
*
cli
,
const
struct
vbp_target
*
vt
);
struct
tcp_pool
*
VBT_Ref
(
const
char
*
name
,
const
struct
suckaddr
*
ip4
,
struct
tcp_pool
*
VBT_Ref
(
const
struct
suckaddr
*
ip4
,
const
struct
suckaddr
*
ip6
);
const
struct
suckaddr
*
ip6
);
void
VBT_Rel
(
struct
tcp_pool
**
tpp
);
void
VBT_Rel
(
struct
tcp_pool
**
tpp
);
int
VBT_Open
(
const
struct
tcp_pool
*
tp
,
double
tmo
,
const
struct
suckaddr
**
sa
);
int
VBT_Open
(
const
struct
tcp_pool
*
tp
,
double
tmo
,
const
struct
suckaddr
**
sa
);
...
...
bin/varnishd/cache/cache_backend_cfg.c
View file @
ba9a6117
...
@@ -103,8 +103,7 @@ VBE_AddBackend(const char *vcl, const struct vrt_backend *vb)
...
@@ -103,8 +103,7 @@ VBE_AddBackend(const char *vcl, const struct vrt_backend *vb)
b
->
ipv6_addr
=
vb
->
ipv6_addr
;
b
->
ipv6_addr
=
vb
->
ipv6_addr
;
b
->
port
=
vb
->
port
;
b
->
port
=
vb
->
port
;
b
->
tcp_pool
=
VBT_Ref
(
vb
->
vcl_name
,
b
->
tcp_pool
=
VBT_Ref
(
vb
->
ipv4_suckaddr
,
vb
->
ipv6_suckaddr
);
vb
->
ipv4_suckaddr
,
vb
->
ipv6_suckaddr
);
/*
/*
* Copy over the sockaddrs
* Copy over the sockaddrs
...
...
bin/varnishd/cache/cache_backend_tcp.c
View file @
ba9a6117
...
@@ -131,21 +131,18 @@ tcp_handle(struct waited *w, enum wait_event ev, double now)
...
@@ -131,21 +131,18 @@ tcp_handle(struct waited *w, enum wait_event ev, double now)
}
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
* Reference a TCP pool given by {
name, ip4, ip6} triplet. Create if
* Reference a TCP pool given by {
ip4, ip6} pair. Create if it
*
it
doesn't exist already.
* doesn't exist already.
*/
*/
struct
tcp_pool
*
struct
tcp_pool
*
VBT_Ref
(
const
char
*
name
,
const
struct
suckaddr
*
ip4
,
VBT_Ref
(
const
struct
suckaddr
*
ip4
,
const
struct
suckaddr
*
ip6
)
const
struct
suckaddr
*
ip6
)
{
{
struct
tcp_pool
*
tp
;
struct
tcp_pool
*
tp
;
ASSERT_CLI
();
ASSERT_CLI
();
VTAILQ_FOREACH
(
tp
,
&
pools
,
list
)
{
VTAILQ_FOREACH
(
tp
,
&
pools
,
list
)
{
assert
(
tp
->
refcnt
>
0
);
assert
(
tp
->
refcnt
>
0
);
if
(
strcmp
(
tp
->
name
,
name
))
continue
;
if
(
ip4
==
NULL
)
{
if
(
ip4
==
NULL
)
{
if
(
tp
->
ip4
!=
NULL
)
if
(
tp
->
ip4
!=
NULL
)
continue
;
continue
;
...
@@ -170,7 +167,6 @@ VBT_Ref(const char *name, const struct suckaddr *ip4,
...
@@ -170,7 +167,6 @@ VBT_Ref(const char *name, const struct suckaddr *ip4,
ALLOC_OBJ
(
tp
,
TCP_POOL_MAGIC
);
ALLOC_OBJ
(
tp
,
TCP_POOL_MAGIC
);
AN
(
tp
);
AN
(
tp
);
REPLACE
(
tp
->
name
,
name
);
if
(
ip4
!=
NULL
)
if
(
ip4
!=
NULL
)
tp
->
ip4
=
VSA_Clone
(
ip4
);
tp
->
ip4
=
VSA_Clone
(
ip4
);
if
(
ip6
!=
NULL
)
if
(
ip6
!=
NULL
)
...
...
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