More precise flow table cleaning
OVS-agent wants to clean flows table by table during restart, but actually it does not. If one table has same cookie with other tables, all related flows will be clean at once. This patch adds the table_id param to the related call to limit the flow clean on one table at once. Closes-Bug: #2060587 Change-Id: I266eb0f5115af718b91f930d759581616310999d
This commit is contained in:
parent
4cad0eda59
commit
bac1b1f721
|
@ -183,7 +183,8 @@ class OpenFlowSwitchMixin(object):
|
|||
for c in cookies:
|
||||
LOG.warning("Deleting flow with cookie 0x%(cookie)x",
|
||||
{'cookie': c})
|
||||
self.uninstall_flows(cookie=c, cookie_mask=ovs_lib.UINT64_BITMASK)
|
||||
self.uninstall_flows(table_id=table_id,
|
||||
cookie=c, cookie_mask=ovs_lib.UINT64_BITMASK)
|
||||
|
||||
def cleanup_flows(self):
|
||||
LOG.info("Reserved cookies for %s: %s", self.br_name,
|
||||
|
|
|
@ -3045,9 +3045,11 @@ class TestOvsNeutronAgentOSKen(TestOvsNeutronAgent,
|
|||
mock.call(tid) for tid in ovs_constants.INT_BR_ALL_TABLES]
|
||||
dump_flows.assert_has_calls(dump_flows_expected)
|
||||
|
||||
expected = [mock.call(cookie=17185,
|
||||
expected = [mock.call(table_id=2,
|
||||
cookie=17185,
|
||||
cookie_mask=uint64_max),
|
||||
mock.call(cookie=9029,
|
||||
mock.call(table_id=2,
|
||||
cookie=9029,
|
||||
cookie_mask=uint64_max)]
|
||||
uninstall_flows.assert_has_calls(expected, any_order=True)
|
||||
self.assertEqual(
|
||||
|
|
Loading…
Reference in New Issue