mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-08 05:46:10 +02:00
avoid reading too much data from socket
Currently, we try to read OFP_MSG_SIZE_MAX (65535) from sockets. This hurts the performance badly. This patch changes ryu to read a single request from socket. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
d0e3264a84
commit
f6741e9c93
@ -115,7 +115,7 @@ class Datapath(object):
|
||||
required_len = ofproto.OFP_HEADER_SIZE
|
||||
|
||||
while self.is_active:
|
||||
ret = self.socket.recv(ofproto.OFP_MSG_SIZE_MAX)
|
||||
ret = self.socket.recv(required_len)
|
||||
if len(ret) == 0:
|
||||
self.is_active = False
|
||||
break
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user