diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-03-25 20:31:29 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-03-26 06:12:18 +0900 |
commit | 0d377522a891cf462e4744fc32e2aa85e4efa452 (patch) | |
tree | de493f01bd59ac692b30fc16062e62be16391ec6 | |
parent | e33a59554df1afc41c3a5874d67a526150bdf1a1 (diff) |
of: set TCP_NODELAY for secure channel socket
Due to Nagle, an OF message that an application sends might be not
delivered to a switch immediately. This patch disables Nagle. This has
bad effect on throughput. I think that the latency matters for any
management channel. To avoid throughput drop, we could use TCP_CORK on
Linux but it's linux specific.
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/controller/controller.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index db5e54a4..48ab83cc 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -22,6 +22,7 @@ from ryu.lib.hub import StreamServer import traceback import random import ssl +from socket import IPPROTO_TCP, TCP_NODELAY import ryu.base.app_manager @@ -101,6 +102,7 @@ class Datapath(ofproto_protocol.ProtocolDesc): super(Datapath, self).__init__() self.socket = socket + self.socket.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) self.address = address self.is_active = True |