forked from ovn-org/ovn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In case we find a LRP (or a LSP connected to a LRP) that has options:active-active-lrp set we ignore it during normal processing in join_logical_ports. We add an additional section at the end where we then use these ports to generate derived Port_Bindings for each LRP + LSP combination once for each matching ovn-aa-port-mappings entry. In the end this gives us the same result as if someone would have precreated a LRP + LSP combination for each ovn-aa-port-mappings in the northbound. However it allows our users to benefit from active-active routing without their CMS needing to know about this feature (besides the active-active-lrp setting). Signed-off-by: Felix Huettner <[email protected]> Signed-off-by: 0-day Robot <[email protected]>
- Loading branch information
1 parent
82f8192
commit 80bcaf2
Showing
14 changed files
with
832 additions
and
14 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include <config.h> | ||
#include "lib/lrp-index.h" | ||
#include "lib/ovn-nb-idl.h" | ||
|
||
struct ovsdb_idl_index * | ||
lrp_index_create(struct ovsdb_idl *idl) | ||
{ | ||
return ovsdb_idl_index_create1(idl, &nbrec_logical_router_port_col_name); | ||
} | ||
|
||
|
||
/* Finds and returns the lrp with the given 'name', or NULL if no such | ||
* lrp exists. */ | ||
const struct nbrec_logical_router_port * | ||
lrp_lookup_by_name(struct ovsdb_idl_index *nbrec_lrp_by_name, | ||
const char *name) | ||
{ | ||
struct nbrec_logical_router_port *target = | ||
nbrec_logical_router_port_index_init_row(nbrec_lrp_by_name); | ||
nbrec_logical_router_port_index_set_name(target, name); | ||
|
||
struct nbrec_logical_router_port *retval = | ||
nbrec_logical_router_port_index_find(nbrec_lrp_by_name, target); | ||
|
||
nbrec_logical_router_port_index_destroy_row(target); | ||
|
||
return retval; | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at: | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#ifndef OVN_LRP_INDEX_H | ||
#define OVN_LRP_INDEX_H 1 | ||
|
||
struct ovsdb_idl; | ||
|
||
struct ovsdb_idl_index *lrp_index_create(struct ovsdb_idl *); | ||
|
||
const struct nbrec_logical_router_port *lrp_lookup_by_name( | ||
struct ovsdb_idl_index *nbrec_lrp_by_name, const char *name); | ||
|
||
#endif /* lib/lrp-index.h */ |
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
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
Oops, something went wrong.