-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn-controller: Avoid reprocessing same lflows in the same I-P run.
For I-P node lflow_output, different change handlers can trigger reprocessing lflows. However, it is a waste to reprocess the same lflow multiple times in the same run, because each processing of the lflow is against the same input data. For example, if a lflow references an addresset A and a port-group P, it is possible that both A and P are changed in the same run, the same lflow reprocess would be triggered by both lflow_output_addr_sets_handler() and lflow_output_port_groups_handler(). Another example may incur a even bigger waste is that when a NB port-group include ports across a big number of datapaths, so the lflow is referencing a big number of SB port-groups with DP group including all those DPs. When there are multiple port changes in the NB port-group, there can be multiple small SB port-group changes, and so the lflows can be reprocessed multiple times. This patch avoid reprocessing the same lflow in the same I-P run, which should improve performance in above scenarios. There is only one exception when a lflow may still be reprocessed more than once: if a lflow A is processed, which results in a compound conjunction added to an existed flow generated by an exited lflow B, and then lflow B needs to be reprocessed in the same run, which would cause flood-remove and reprocess lflow A. In this case lflow A is processed twice. Apart from the performance gains, there is also a potential problem of DP group fixed by this patch. If there is addrset/pg change and at the same run there is also a new local datapath monitored, then the existed code would firstly handle the addrset/pg changes causing a lflow being processed against the DP group including the new DP, which could have conjunction flows, but later the same lflow is reprocessed by lflow_output_runtime_data_handler()->lflow_add_flows_for_datapath() for the new DP only. Because lflows adding conjunction flows will not be checked against redundancy but only tries to combine the conjunction actions, it would result in redundanct conjunction actions added to the same flow, which is also linked to the same SB lflow twice. The mechanism of this patch will avoid this problem. Signed-off-by: Han Zhou <hzhou@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
- Loading branch information
Showing
3 changed files
with
147 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters