limit the queue size (send_q)

cbench in throughtput mode doesn't work with ryu. We need to limit
queue size to prevent the queue from eating memory up.

The size is arbitrary. It can be the startup parameter. But I think
that we should solve this in the better way. So let's not make it
global for now

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
FUJITA Tomonori 2012-02-25 11:47:13 +09:00
parent e44c9d6089
commit d0e3264a84

View File

@ -81,8 +81,9 @@ class Datapath(object):
self.address = address
self.is_active = True
# XIX limit queue size somehow to prevent it from eating memory up
self.send_q = Queue()
# The limit is arbitrary. We need to limit queue size to
# prevent it from eating memory up
self.send_q = Queue(16)
# circular reference self.ev_q.aux == self
self.ev_q = dispatcher.EventQueue(handler.QUEUE_NAME_OFP_MSG,