> There are going to be additional incremental nodes that wish to know if > vxlan mode is enabled. Instead of having to traverse the chassis in each > of those nodes, we can cache the vxlan status in the global config. > > We can do the same with the max tunnel key based on the vxlan setting.
Hi Mark, the patch seems fine to me but it does not compile since you removed vxlan_ic_mode in northd.c Regards, Lorenzo > > Signed-off-by: Mark Michelson <[email protected]> > --- > northd/en-global-config.c | 50 ++++++++++++++++++++++++++------------- > northd/en-global-config.h | 3 +++ > northd/en-northd.c | 1 + > northd/northd.c | 23 +----------------- > northd/northd.h | 5 +--- > 5 files changed, 40 insertions(+), 42 deletions(-) > [...] > } > > void > diff --git a/northd/northd.c b/northd/northd.c > index 488bfdf69..d58c68c26 100644 > --- a/northd/northd.c > +++ b/northd/northd.c > @@ -96,8 +96,6 @@ static bool default_acl_drop; > * and ports tunnel key allocation (12 bits for each instead of default 16). > */ > static bool vxlan_mode; > > -static bool vxlan_ic_mode; > - I guess you are not supposed to remove it, right? > #define MAX_OVN_TAGS 4096 > > > @@ -974,24 +972,6 @@ join_datapaths(const struct nbrec_logical_switch_table > *nbrec_ls_table, > } > } > > -bool > -is_vxlan_mode(const struct smap *nb_options, > - const struct sbrec_chassis_table *sbrec_chassis_table) > -{ > - if (!smap_get_bool(nb_options, "vxlan_mode", true)) { > - return false; > - } > - > - const struct sbrec_chassis *chassis; > - SBREC_CHASSIS_TABLE_FOR_EACH (chassis, sbrec_chassis_table) { > - for (int i = 0; i < chassis->n_encaps; i++) { > - if (!strcmp(chassis->encaps[i]->type, "vxlan")) { > - return true; > - } > - } > - } > - return false; > -} > > uint32_t > get_ovn_max_dp_key_local(bool _vxlan_mode, bool _vxlan_ic_mode) > @@ -18810,8 +18790,7 @@ ovnnb_db_run(struct northd_input *input_data, > use_common_zone = smap_get_bool(input_data->nb_options, > "use_common_zone", > false); > > - vxlan_mode = is_vxlan_mode(input_data->nb_options, > - input_data->sbrec_chassis_table); > + vxlan_mode = input_data->vxlan_mode; > > build_datapaths(ovnsb_txn, > input_data->nbrec_logical_switch_table, > diff --git a/northd/northd.h b/northd/northd.h > index 1a7afe902..c1ea010bf 100644 > --- a/northd/northd.h > +++ b/northd/northd.h > @@ -63,6 +63,7 @@ struct northd_input { > const char *svc_monitor_mac; > struct eth_addr svc_monitor_mac_ea; > const struct chassis_features *features; > + bool vxlan_mode; > > /* ACL ID inputs. */ > const struct acl_id_data *acl_id_data; > @@ -965,10 +966,6 @@ lr_has_multiple_gw_ports(const struct ovn_datapath *od) > return od->n_l3dgw_ports > 1 && !od->is_gw_router; > } > > -bool > -is_vxlan_mode(const struct smap *nb_options, > - const struct sbrec_chassis_table *sbrec_chassis_table); > - > uint32_t get_ovn_max_dp_key_local(bool _vxlan_mode, bool ic_mode); > > /* Returns true if the logical router port 'enabled' column is empty or > -- > 2.45.2 > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
_______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
