Hi Jochen, thank you for the submission. And apologies for the long
turnaround time on reviewing this change.
On 4/26/22 14:31, Jochen Friedrich via dev wrote:
Add ovn-encap-df_default configuration option to set df_default on OVN tunnels.
Signed-off-by: Jochen Friedrich <[email protected]>
---
controller/encaps.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/controller/encaps.c b/controller/encaps.c
index ed01b1368..01b023960 100644
--- a/controller/encaps.c
+++ b/controller/encaps.c
@@ -190,6 +190,14 @@ tunnel_add(struct tunnel_ctx *tc, const struct
sbrec_sb_global *sbg,
smap_add(&options, "tos", encap_tos);
}
+ /* If the df_default option is configured, get it */
+ const char *encap_df = smap_get_def(&cfg->external_ids,
+ "ovn-encap-df_default", "none");
+
+ if (encap_df && strcmp(encap_df, "none")) {
+ smap_add(&options, "df_default", encap_df);
+ }
It would be simpler to use the non-def version of smap_get() here.
const char *encap_df = smap_get(&cfg->external_ids, "ovn-encap-df_default");
if (encap_df) {
smap_add(&options, "df_default", encap_df);
}
This makes it so that the user can just remove the value from the Encap
table instead of relying on a magic "none" value.
+
/* If ovn-set-local-ip option is configured, get it */
set_local_ip = smap_get_bool(&cfg->external_ids, "ovn-set-local-ip",
false);
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev