Hi Fujita-San, Would you mind reviewing this patch when you have a time?
Regards, Iwase On 2015年09月10日 13:50, Yusuke Iwase wrote: > Open vSwitch, which installed with the kernel module, has a cache in > the kernel for the flow table and the cached flow entries have a > hard timeout of 5 seconds. > tester.py attempts to confirm its flow modifications with a barrier > request, but Open vSwitch sends a barrier reply back regardless of > the the state of the cached entries in the kernel module. > So in some cases, Open vSwtich needs the interval between each test > case. > This patch adds an option for setting interval for the workaround. > > Note: With a zero seconds interval, the whole test suite runs in > 20-30 minutes, but with a 10 seconds interval between each test, > the entire suite takes 3-4 hours. > > Reported-by: Alan Deikman <[email protected]> > Signed-off-by: IWASE Yusuke <[email protected]> > --- > ryu/flags.py | 5 ++++- > ryu/tests/switch/tester.py | 2 ++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/ryu/flags.py b/ryu/flags.py > index 225cbbb..a45ac34 100644 > --- a/ryu/flags.py > +++ b/ryu/flags.py > @@ -80,5 +80,8 @@ CONF.register_cli_opts([ > '(default: openflow13)'), > cfg.StrOpt('tester-version', default='openflow13', > help='tester sw OFP version [openflow13|openflow14] ' > - '(default: openflow13)') > + '(default: openflow13)'), > + cfg.IntOpt('interval', default=0, > + help='interval time in seconds of each test ' > + '(default: 0)'), > ], group='test-switch') > diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py > index 6c4e233..5087614 100644 > --- a/ryu/tests/switch/tester.py > +++ b/ryu/tests/switch/tester.py > @@ -273,6 +273,7 @@ class OfTester(app_manager.RyuApp): > super(OfTester, self).__init__() > self._set_logger() > > + self.interval = CONF['test-switch']['interval'] > self.target_dpid = self._convert_dpid(CONF['test-switch']['target']) > self.target_send_port_1 = CONF['test-switch']['target_send_port_1'] > self.target_send_port_2 = CONF['test-switch']['target_send_port_2'] > @@ -434,6 +435,7 @@ class OfTester(app_manager.RyuApp): > result = self._test_execute(test, desc) > report.setdefault(result, []) > report[result].append([testfile.description, test.description]) > + hub.sleep(self.interval) > return report > > def _test_execute(self, test, description): > ------------------------------------------------------------------------------ _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
