You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2015/05/15 18:21:24 UTC
trafficserver git commit: TS-3604: Transparent mode does not work
when accept_threads set to 0.
Repository: trafficserver
Updated Branches:
refs/heads/master 75612311c -> becd95d7f
TS-3604: Transparent mode does not work when accept_threads set to 0.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/becd95d7
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/becd95d7
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/becd95d7
Branch: refs/heads/master
Commit: becd95d7fa81e5d5ff21cfc1f748b2e2b7f07e21
Parents: 7561231
Author: shinrich <sh...@yahoo-inc.com>
Authored: Fri May 15 11:21:03 2015 -0500
Committer: shinrich <sh...@yahoo-inc.com>
Committed: Fri May 15 11:21:03 2015 -0500
----------------------------------------------------------------------
CHANGES | 2 ++
iocore/net/P_NetAccept.h | 4 ++--
iocore/net/P_SSLNetAccept.h | 2 +-
iocore/net/SSLNetAccept.cc | 4 ++--
iocore/net/UnixNetAccept.cc | 8 ++++----
iocore/net/UnixNetProcessor.cc | 4 ++--
6 files changed, 13 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/becd95d7/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 87e50d4..b631182 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 6.0.0
+ *) [TS-3604] Transparent Mode does not work when accept_threads set to 0.
+
*) [TS-3597] TLS can fail accecpt / handshake when accept thread is turned off.
*) [TS-3603] Debug Assert due to missing lock when accept_threads are disabled.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/becd95d7/iocore/net/P_NetAccept.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_NetAccept.h b/iocore/net/P_NetAccept.h
index b0183fd..14a844a 100644
--- a/iocore/net/P_NetAccept.h
+++ b/iocore/net/P_NetAccept.h
@@ -99,8 +99,8 @@ struct NetAccept : public Continuation {
virtual NetProcessor *getNetProcessor() const;
void init_accept_loop(const char *);
- virtual void init_accept(EThread *t = NULL);
- virtual void init_accept_per_thread();
+ virtual void init_accept(EThread *t = NULL, bool isTransparent = false);
+ virtual void init_accept_per_thread(bool isTransparent);
virtual NetAccept *clone() const;
// 0 == success
int do_listen(bool non_blocking, bool transparent = false);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/becd95d7/iocore/net/P_SSLNetAccept.h
----------------------------------------------------------------------
diff --git a/iocore/net/P_SSLNetAccept.h b/iocore/net/P_SSLNetAccept.h
index 1ed4280..71e8689 100644
--- a/iocore/net/P_SSLNetAccept.h
+++ b/iocore/net/P_SSLNetAccept.h
@@ -53,7 +53,7 @@ class UnixNetVConnection;
struct SSLNetAccept : public NetAccept {
virtual NetProcessor *getNetProcessor() const;
virtual EventType getEtype() const;
- virtual void init_accept_per_thread();
+ virtual void init_accept_per_thread(bool isTransparent);
virtual NetAccept *clone() const;
SSLNetAccept(){};
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/becd95d7/iocore/net/SSLNetAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/SSLNetAccept.cc b/iocore/net/SSLNetAccept.cc
index b4017be..a41b327 100644
--- a/iocore/net/SSLNetAccept.cc
+++ b/iocore/net/SSLNetAccept.cc
@@ -40,12 +40,12 @@ SSLNetAccept::getNetProcessor() const
}
void
-SSLNetAccept::init_accept_per_thread()
+SSLNetAccept::init_accept_per_thread(bool isTransparent)
{
int i, n;
NetAccept *a;
- if (do_listen(NON_BLOCKING))
+ if (do_listen(NON_BLOCKING, isTransparent))
return;
if (accept_fn == net_accept)
SET_HANDLER((SSLNetAcceptHandler)&SSLNetAccept::acceptFastEvent);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/becd95d7/iocore/net/UnixNetAccept.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetAccept.cc b/iocore/net/UnixNetAccept.cc
index f6d9596..3cbcbe8 100644
--- a/iocore/net/UnixNetAccept.cc
+++ b/iocore/net/UnixNetAccept.cc
@@ -158,7 +158,7 @@ NetAccept::init_accept_loop(const char *thr_name)
// use it for high connection rates as well.
//
void
-NetAccept::init_accept(EThread *t)
+NetAccept::init_accept(EThread *t, bool isTransparent)
{
if (!t)
t = eventProcessor.assign_thread(etype);
@@ -167,7 +167,7 @@ NetAccept::init_accept(EThread *t)
action_->continuation->mutex = t->mutex;
action_->mutex = t->mutex;
}
- if (do_listen(NON_BLOCKING))
+ if (do_listen(NON_BLOCKING, isTransparent))
return;
SET_HANDLER((NetAcceptHandler)&NetAccept::acceptEvent);
period = ACCEPT_PERIOD;
@@ -176,11 +176,11 @@ NetAccept::init_accept(EThread *t)
void
-NetAccept::init_accept_per_thread()
+NetAccept::init_accept_per_thread(bool isTransparent)
{
int i, n;
- if (do_listen(NON_BLOCKING))
+ if (do_listen(NON_BLOCKING, isTransparent))
return;
if (accept_fn == net_accept)
SET_HANDLER((NetAcceptHandler)&NetAccept::acceptFastEvent);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/becd95d7/iocore/net/UnixNetProcessor.cc
----------------------------------------------------------------------
diff --git a/iocore/net/UnixNetProcessor.cc b/iocore/net/UnixNetProcessor.cc
index 557192b..d2b81a6 100644
--- a/iocore/net/UnixNetProcessor.cc
+++ b/iocore/net/UnixNetProcessor.cc
@@ -158,10 +158,10 @@ UnixNetProcessor::accept_internal(Continuation *cont, int fd, AcceptOptions cons
na->init_accept_loop(thr_name);
}
} else {
- na->init_accept_per_thread();
+ na->init_accept_per_thread(opt.f_inbound_transparent);
}
} else {
- na->init_accept();
+ na->init_accept(NULL, opt.f_inbound_transparent);
}
#ifdef TCP_DEFER_ACCEPT