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>
This commit is contained in:
parent
e33a59554d
commit
0d377522a8
@ -22,6 +22,7 @@ from ryu.lib.hub import StreamServer
|
|||||||
import traceback
|
import traceback
|
||||||
import random
|
import random
|
||||||
import ssl
|
import ssl
|
||||||
|
from socket import IPPROTO_TCP, TCP_NODELAY
|
||||||
|
|
||||||
import ryu.base.app_manager
|
import ryu.base.app_manager
|
||||||
|
|
||||||
@ -101,6 +102,7 @@ class Datapath(ofproto_protocol.ProtocolDesc):
|
|||||||
super(Datapath, self).__init__()
|
super(Datapath, self).__init__()
|
||||||
|
|
||||||
self.socket = socket
|
self.socket = socket
|
||||||
|
self.socket.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
|
||||||
self.address = address
|
self.address = address
|
||||||
self.is_active = True
|
self.is_active = True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user