Hi Fujita-San,
Thank you for reviewing my patch.
>> + cfg.IntOpt('interval', default=0,
>> + help='interval time in seconds of each test '
>> + '(default: 0)'),
>
> how about tester-interval for the consistency with the rest?
I think 'tester' means 'Tester Switch', so I didn't add 'tester-' into the name.
Thanks,
Iwase
On 2015年09月10日 11:46, FUJITA Tomonori wrote:
> On Wed, 2 Sep 2015 08:26:31 +0900
> Yusuke Iwase <[email protected]> wrote:
>
>> Hi,
>>
>> On 2015年08月29日 03:46, Alan Deikman wrote:
>>>
>>>> On Aug 27, 2015, at 10:44 PM, Yusuke Iwase <[email protected]
>>>> <mailto:[email protected]>> wrote:
>>>>
>>>> If OVS work so, I think it is a bug of OVS and tester.py should not wait
>>>> OVS.
>>>
>>> I believe you are right. In the process of investigating this I captured
>>> all the OpenFlow packets between Ryu and the switches and looked at them
>>> with Wireshark. There seems to be no problem with how tester.py uses the
>>> OpenFlow protocol.
>>>
>>> The flaw is that the OF agent that OVS uses will update its own data base
>>> (tables of flows) then signal via the Barrier Request Reply that this is
>>> done. It should wait until the flow tables all the way into the cache are
>>> updated but it does not. However it appears this will be very hard to
>>> implement due to the architecture of OVS which separates the data base
>>> (ovsdb) from the actual switching logic (openvswitchd and the dkms kernel
>>> module.)
>>>
>>> However since so many OF products are based on OVS I wonder if tester.py
>>> should have an additional command line option to invoke this work around.
>>
>> If tester.py should support such feature, how about the following patch?
>> I added sleep interval for each test case.
>>
>>
>> $ git diff
>> 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)'),
>
> how about tester-interval for the consistency with the rest?
>
>> ], 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):
>>
>>
>> Usage Example)
>> $ ryu-manager ryu/tests/switch/tester.py --test-switch-interval 10
>>
>>
>> Thanks,
>> Iwase
>>
>>>
>>> ----------------------------
>>> Alan Deikman
>>> ZNYX Networks, Inc.
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>>
>>>
>>> _______________________________________________
>>> Ryu-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Ryu-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>>
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel