forked from ovn-org/ovn
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn-controller: Detect OVS datapath capabilities.
Automatically create an OVS Datapath record if none exists for the current br-int datapath type. Add a 'features' module to track which OVS features are available in the datapath currently being used. For now, only ct_all_zero_nat is tracked, all other features are assumed to be on-par between all datapaths. A future commit will make use of the 'features' module to conditionally program openflows based on available datapath features. Signed-off-by: Dumitru Ceara <dceara@redhat.com>
- Loading branch information
Showing
5 changed files
with
156 additions
and
32 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,39 @@ | ||
/* Copyright (c) 2021, Red Hat, Inc. | ||
* | ||
* 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 "ovn/features.h" | ||
|
||
static struct ovs_feature_support ovs_features; | ||
|
||
const struct ovs_feature_support * | ||
ovs_feature_support_get(void) | ||
{ | ||
return &ovs_features; | ||
} | ||
|
||
/* Returns 'true' if the OVS feature set has been updated since the last | ||
* call. | ||
*/ | ||
bool | ||
ovs_feature_support_update(bool ct_all_zero_nat) | ||
{ | ||
if (ovs_features.ct_all_zero_nat != ct_all_zero_nat) { | ||
ovs_features.ct_all_zero_nat = ct_all_zero_nat; | ||
return true; | ||
} | ||
return false; | ||
} |
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