From 0d377522a891cf462e4744fc32e2aa85e4efa452 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 25 Mar 2014 20:31:29 +0900 Subject: 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 Signed-off-by: FUJITA Tomonori --- ryu/controller/controller.py | 2 ++ 1 file changed, 2 insertions(+) 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 -- cgit v1.2.3