The northd options "arp_ns_explicit_output" and "register_consolidation" are not needed anymore as they were present in 26.03 release and any newer ovn-controller supports them so we can safely remove both of those options.
Signed-off-by: Ales Musil <[email protected]> --- controller/lflow.c | 52 +++++++++++--------------------- controller/lflow.h | 2 -- controller/ovn-controller.c | 43 +------------------------- include/ovn/actions.h | 6 ---- include/ovn/logical-fields.h | 10 ------ lib/actions.c | 16 ++-------- northd/en-global-config.c | 8 ----- tests/ovn-controller.at | 49 ------------------------------ tests/ovn-inc-proc-graph-dump.at | 7 ++--- tests/test-ovn.c | 2 -- 10 files changed, 23 insertions(+), 172 deletions(-) diff --git a/controller/lflow.c b/controller/lflow.c index 89ad6831f..a71d4e0d7 100644 --- a/controller/lflow.c +++ b/controller/lflow.c @@ -111,8 +111,7 @@ consider_logical_flow(const struct sbrec_logical_flow *lflow, static void consider_lb_hairpin_flows(const struct ovn_controller_lb *lb, const struct hmap *local_datapaths, - struct ovn_desired_flow_table *flow_table, - bool register_consolidation); + struct ovn_desired_flow_table *flow_table); static void add_port_sec_flows(const struct shash *binding_lports, const struct sbrec_chassis *, @@ -926,8 +925,6 @@ add_matches_to_flow_table(const struct sbrec_logical_flow *lflow, .collector_ids = l_ctx_in->collector_ids, .lflow_uuid = lflow->header_.uuid, .dp_key = ldp->datapath->tunnel_key, - .explicit_arp_ns_output = l_ctx_in->explicit_arp_ns_output, - .register_consolidation = l_ctx_in->register_consolidation, .pipeline = ingress ? OVNACT_P_INGRESS : OVNACT_P_EGRESS, .ingress_ptable = OFTABLE_LOG_INGRESS_PIPELINE, @@ -1594,8 +1591,7 @@ static void add_lb_vip_hairpin_flows(const struct ovn_controller_lb *lb, struct ovn_lb_vip *lb_vip, struct ovn_lb_backend *lb_backend, - struct ovn_desired_flow_table *flow_table, - bool register_consolidation) + struct ovn_desired_flow_table *flow_table) { uint64_t stub[1024 / 8]; struct ofpbuf ofpacts = OFPBUF_STUB_INITIALIZER(stub); @@ -1613,10 +1609,8 @@ add_lb_vip_hairpin_flows(const struct ovn_controller_lb *lb, match_set_dl_type(&hairpin_match, htons(ETH_TYPE_IP)); match_set_nw_src(&hairpin_match, bip4); match_set_nw_dst(&hairpin_match, bip4); - enum mf_field_id id = register_consolidation - ? MFF_LOG_LB_ORIG_DIP_IPV4 - : MFF_LOG_LB_ORIG_DIP_IPV4_OLD; - match_set_reg(&hairpin_match, id - MFF_LOG_REG0, ntohl(vip4)); + match_set_reg(&hairpin_match, MFF_LOG_LB_ORIG_DIP_IPV4 - MFF_LOG_REG0, + ntohl(vip4)); add_lb_vip_hairpin_reply_action(NULL, snat_vip4, lb->proto, lb_backend->port, @@ -1714,8 +1708,7 @@ static void add_lb_ct_snat_hairpin_vip_flow(const struct ovn_controller_lb *lb, const struct ovn_lb_vip *lb_vip, const struct hmap *local_datapaths, - struct ovn_desired_flow_table *flow_table, - bool register_consolidation) + struct ovn_desired_flow_table *flow_table) { uint64_t stub[1024 / 8]; struct ofpbuf ofpacts = OFPBUF_STUB_INITIALIZER(stub); @@ -1760,10 +1753,8 @@ add_lb_ct_snat_hairpin_vip_flow(const struct ovn_controller_lb *lb, ovs_be32 vip4 = in6_addr_get_mapped_ipv4(&lb_vip->vip); match_set_dl_type(&match, htons(ETH_TYPE_IP)); - enum mf_field_id id = register_consolidation - ? MFF_LOG_LB_ORIG_DIP_IPV4 - : MFF_LOG_LB_ORIG_DIP_IPV4_OLD; - match_set_reg(&match, id - MFF_LOG_REG0, ntohl(vip4)); + match_set_reg(&match, MFF_LOG_LB_ORIG_DIP_IPV4 - MFF_LOG_REG0, + ntohl(vip4)); } else { match_set_dl_type(&match, htons(ETH_TYPE_IPV6)); ovs_be128 vip6_value; @@ -1828,8 +1819,7 @@ add_lb_ct_snat_hairpin_vip_flow(const struct ovn_controller_lb *lb, static void add_lb_ct_snat_hairpin_flows(const struct ovn_controller_lb *lb, const struct hmap *local_datapaths, - struct ovn_desired_flow_table *flow_table, - bool register_consolidation) + struct ovn_desired_flow_table *flow_table) { /* We must add a flow for each LB VIP. In the general case, this flow is added to the OFTABLE_CT_SNAT_HAIRPIN table. If it matches, we @@ -1863,28 +1853,25 @@ add_lb_ct_snat_hairpin_flows(const struct ovn_controller_lb *lb, for (int i = 0; i < lb->n_vips; i++) { add_lb_ct_snat_hairpin_vip_flow(lb, &lb->vips[i], local_datapaths, - flow_table, register_consolidation); + flow_table); } } static void consider_lb_hairpin_flows(const struct ovn_controller_lb *lb, const struct hmap *local_datapaths, - struct ovn_desired_flow_table *flow_table, - bool register_consolidation) + struct ovn_desired_flow_table *flow_table) { for (size_t i = 0; i < lb->n_vips; i++) { struct ovn_lb_vip *lb_vip = &lb->vips[i]; struct ovn_lb_backend *lb_backend; VECTOR_FOR_EACH_PTR (&lb_vip->backends, lb_backend) { - add_lb_vip_hairpin_flows(lb, lb_vip, lb_backend, flow_table, - register_consolidation); + add_lb_vip_hairpin_flows(lb, lb_vip, lb_backend, flow_table); } } - add_lb_ct_snat_hairpin_flows(lb, local_datapaths, flow_table, - register_consolidation); + add_lb_ct_snat_hairpin_flows(lb, local_datapaths, flow_table); } /* Adds OpenFlow flows to flow tables for each Load balancer VIPs and @@ -1892,13 +1879,11 @@ consider_lb_hairpin_flows(const struct ovn_controller_lb *lb, static void add_lb_hairpin_flows(const struct hmap *local_lbs, const struct hmap *local_datapaths, - struct ovn_desired_flow_table *flow_table, - bool register_consolidation) + struct ovn_desired_flow_table *flow_table) { const struct ovn_controller_lb *lb; HMAP_FOR_EACH (lb, hmap_node, local_lbs) { - consider_lb_hairpin_flows(lb, local_datapaths, flow_table, - register_consolidation); + consider_lb_hairpin_flows(lb, local_datapaths, flow_table); } } @@ -2059,8 +2044,7 @@ lflow_run(struct lflow_ctx_in *l_ctx_in, struct lflow_ctx_out *l_ctx_out) l_ctx_out->flow_table); add_lb_hairpin_flows(l_ctx_in->local_lbs, l_ctx_in->local_datapaths, - l_ctx_out->flow_table, - l_ctx_in->register_consolidation); + l_ctx_out->flow_table); add_fdb_flows(l_ctx_in->fdb_table, l_ctx_in->local_datapaths, l_ctx_out->flow_table, l_ctx_in->sbrec_port_binding_by_key, @@ -2319,8 +2303,7 @@ lflow_handle_changed_lbs(struct lflow_ctx_in *l_ctx_in, UUID_FMT, UUID_ARGS(&uuid_node->uuid)); ofctrl_remove_flows(l_ctx_out->flow_table, &uuid_node->uuid); consider_lb_hairpin_flows(lb, l_ctx_in->local_datapaths, - l_ctx_out->flow_table, - l_ctx_in->register_consolidation); + l_ctx_out->flow_table); } UUIDSET_FOR_EACH (uuid_node, new_lbs) { @@ -2329,8 +2312,7 @@ lflow_handle_changed_lbs(struct lflow_ctx_in *l_ctx_in, VLOG_DBG("Add load balancer hairpin flows for "UUID_FMT, UUID_ARGS(&uuid_node->uuid)); consider_lb_hairpin_flows(lb, l_ctx_in->local_datapaths, - l_ctx_out->flow_table, - l_ctx_in->register_consolidation); + l_ctx_out->flow_table); } return true; diff --git a/controller/lflow.h b/controller/lflow.h index 0b7e53a10..c211fe195 100644 --- a/controller/lflow.h +++ b/controller/lflow.h @@ -149,8 +149,6 @@ struct lflow_ctx_in { const struct shash *lbinding_lports; bool localnet_learn_fdb; bool localnet_learn_fdb_changed; - bool explicit_arp_ns_output; - bool register_consolidation; }; struct lflow_ctx_out { diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c index 4f4119dd5..e2b096989 100644 --- a/controller/ovn-controller.c +++ b/controller/ovn-controller.c @@ -3739,13 +3739,11 @@ non_vif_data_ovs_iface_handler(struct engine_node *node, void *data OVS_UNUSED) } struct ed_type_northd_options { - bool explicit_arp_ns_output; bool always_tunnel; /* Indicates if the traffic to the * logical port of a bridged logical * switch (i.e with localnet port) should * be tunnelled or sent via the localnet * port. Default value is 'false'. */ - bool register_consolidation; bool enable_ch_nb_cfg_update; }; @@ -3772,24 +3770,12 @@ en_northd_options_run(struct engine_node *node, void *data) const struct sbrec_sb_global *sb_global = sbrec_sb_global_table_first(sb_global_table); - n_opts->explicit_arp_ns_output = - sb_global - ? smap_get_bool(&sb_global->options, "arp_ns_explicit_output", - false) - : false; - n_opts->always_tunnel = sb_global ? smap_get_bool(&sb_global->options, "always_tunnel", false) : false; - n_opts->register_consolidation = - sb_global - ? smap_get_bool(&sb_global->options, "register_consolidation", - false) - : false; - n_opts->enable_ch_nb_cfg_update = sb_global ? smap_get_bool(&sb_global->options, "enable_chassis_nb_cfg_update", @@ -3809,17 +3795,6 @@ en_northd_options_sb_sb_global_handler(struct engine_node *node, void *data) sbrec_sb_global_table_first(sb_global_table); enum engine_input_handler_result result = EN_HANDLED_UNCHANGED; - bool explicit_arp_ns_output = - sb_global - ? smap_get_bool(&sb_global->options, "arp_ns_explicit_output", - false) - : false; - - if (explicit_arp_ns_output != n_opts->explicit_arp_ns_output) { - n_opts->explicit_arp_ns_output = explicit_arp_ns_output; - result = EN_HANDLED_UPDATED; - } - bool always_tunnel = sb_global ? smap_get_bool(&sb_global->options, "always_tunnel", @@ -3831,17 +3806,6 @@ en_northd_options_sb_sb_global_handler(struct engine_node *node, void *data) result = EN_HANDLED_UPDATED; } - bool register_consolidation = - sb_global - ? smap_get_bool(&sb_global->options, "register_consolidation", - false) - : false; - - if (register_consolidation != n_opts->register_consolidation) { - n_opts->register_consolidation = register_consolidation; - result = EN_HANDLED_UPDATED; - } - bool enable_ch_nb_cfg_update = sb_global ? smap_get_bool(&sb_global->options, "enable_chassis_nb_cfg_update", @@ -4040,9 +4004,6 @@ init_lflow_ctx(struct engine_node *node, engine_get_input_data("port_groups", node); struct shash *port_groups = &pg_data->port_groups_cs_local; - struct ed_type_northd_options *n_opts = - engine_get_input_data("northd_options", node); - struct ed_type_dhcp_options *dhcp_opts = engine_get_input_data("dhcp_options", node); @@ -4081,8 +4042,6 @@ init_lflow_ctx(struct engine_node *node, l_ctx_in->localnet_learn_fdb = rt_data->localnet_learn_fdb; l_ctx_in->localnet_learn_fdb_changed = rt_data->localnet_learn_fdb_changed; l_ctx_in->chassis_tunnels = &non_vif_data->chassis_tunnels; - l_ctx_in->explicit_arp_ns_output = n_opts->explicit_arp_ns_output; - l_ctx_in->register_consolidation = n_opts->register_consolidation; l_ctx_in->nd_ra_opts = &fo->nd_ra_opts; l_ctx_in->dhcp_opts = &dhcp_opts->v4_opts; l_ctx_in->dhcpv6_opts = &dhcp_opts->v6_opts; @@ -4926,6 +4885,7 @@ pflow_output_if_status_mgr_handler(struct engine_node *node, engine_get_input_data("if_status_mgr", node); struct physical_ctx p_ctx; + init_physical_ctx(node, pfo, rt_data, non_vif_data, &p_ctx); const struct ovsrec_interface *iface; @@ -7128,7 +7088,6 @@ inc_proc_ovn_controller_init( engine_add_input(&en_dhcp_options, &en_sb_dhcp_options, NULL); engine_add_input(&en_dhcp_options, &en_sb_dhcpv6_options, NULL); - engine_add_input(&en_lflow_output, &en_northd_options, NULL); engine_add_input(&en_lflow_output, &en_dhcp_options, NULL); /* Keep en_addr_sets before en_runtime_data because diff --git a/include/ovn/actions.h b/include/ovn/actions.h index 1d32998f7..92dfdc1ab 100644 --- a/include/ovn/actions.h +++ b/include/ovn/actions.h @@ -934,12 +934,6 @@ struct ovnact_encode_params { /* The datapath key. */ uint32_t dp_key; - /* Indication if we should add explicit output after arp/nd_ns action. */ - bool explicit_arp_ns_output; - - /* Indication if we should use the "old" version of registers. */ - bool register_consolidation; - /* OVN maps each logical flow table (ltable), one-to-one, onto a physical * OpenFlow flow table (ptable). A number of parameters describe this * mapping and data related to flow tables: diff --git a/include/ovn/logical-fields.h b/include/ovn/logical-fields.h index 8b4876530..54d8e7318 100644 --- a/include/ovn/logical-fields.h +++ b/include/ovn/logical-fields.h @@ -106,16 +106,6 @@ CHECK_REG(CT_SAVED_STATE); * port (32 bits). */ CHECK_REG(REMOTE_OUTPORT); -/* Logical registers that are needed for backwards - * compatibility with older northd versions. - * XXX: All of them can be removed in 26.09. */ -#define MFF_LOG_LB_ORIG_DIP_IPV4_OLD MFF_REG1 -CHECK_REG(LB_ORIG_DIP_IPV4_OLD); -#define MFF_LOG_LB_AFF_MATCH_PORT_OLD MFF_REG8 -CHECK_REG(LB_AFF_MATCH_PORT_OLD); -#define MFF_LOG_LB_AFF_MATCH_LS_IP6_ADDR_OLD MFF_XXREG0 -CHECK_XXREG(LB_AFF_MATCH_LS_IP6_ADDR_OLD); - /* Maximum number of networks supported by 4-bit flags.network_id. */ #define OVN_MAX_NETWORK_ID \ ((1 << (MLF_NETWORK_ID_END_BIT - MLF_NETWORK_ID_START_BIT + 1)) - 1) diff --git a/lib/actions.c b/lib/actions.c index 256114e6e..0367b330c 100644 --- a/lib/actions.c +++ b/lib/actions.c @@ -2061,9 +2061,6 @@ encode_ARP(const struct ovnact_nest *on, struct ofpbuf *ofpacts) { encode_nested_actions(on, ep, ACTION_OPCODE_ARP, ofpacts); - if (!ep->explicit_arp_ns_output) { - emit_resubmit(ofpacts, ep->output_ptable); - } } static void @@ -2152,9 +2149,6 @@ encode_ND_NS(const struct ovnact_nest *on, struct ofpbuf *ofpacts) { encode_nested_actions(on, ep, ACTION_OPCODE_ND_NS, ofpacts); - if (!ep->explicit_arp_ns_output) { - emit_resubmit(ofpacts, ep->output_ptable); - } } static void @@ -5520,10 +5514,7 @@ encode_COMMIT_LB_AFF(const struct ovnact_commit_lb_aff *lb_aff, imm_backend_ip = (union mf_value) { .ipv6 = lb_aff->backend, }; - enum mf_field_id id = !ep->register_consolidation && ep->is_switch - ? MFF_LOG_LB_AFF_MATCH_LS_IP6_ADDR_OLD - : MFF_LOG_LB_AFF_MATCH_IP6_ADDR; - ol_spec->dst.field = mf_from_id(id); + ol_spec->dst.field = mf_from_id(MFF_LOG_LB_AFF_MATCH_IP6_ADDR); } else { ovs_be32 ip4 = in6_addr_get_mapped_ipv4(&lb_aff->backend); imm_backend_ip = (union mf_value) { @@ -5551,10 +5542,7 @@ encode_COMMIT_LB_AFF(const struct ovnact_commit_lb_aff *lb_aff, .be16 = htons(lb_aff->backend_port), }; - enum mf_field_id id = !ep->register_consolidation - ? MFF_LOG_LB_AFF_MATCH_PORT_OLD - : MFF_LOG_LB_AFF_MATCH_PORT; - ol_spec->dst.field = mf_from_id(id); + ol_spec->dst.field = mf_from_id(MFF_LOG_LB_AFF_MATCH_PORT); ol_spec->dst_type = NX_LEARN_DST_LOAD; ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE; ol_spec->dst.ofs = 0; diff --git a/northd/en-global-config.c b/northd/en-global-config.c index f02f50e93..4e6b07ebe 100644 --- a/northd/en-global-config.c +++ b/northd/en-global-config.c @@ -714,14 +714,6 @@ update_sb_config_options_to_sbrec(struct ed_type_global_config *config_data, smap_replace(options, "sbctl_probe_interval", sip); } - /* Adds indication that northd is handling explicit output after - * arp/nd_ns action. */ - smap_add(options, "arp_ns_explicit_output", "true"); - - /* Adds indication that northd has code with consolidated - * register usage. */ - smap_add(options, "register_consolidation", "true"); - if (!smap_equal(&sb->options, options)) { sbrec_sb_global_set_options(sb, options); } diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at index 2ddf39c8e..9f104916a 100644 --- a/tests/ovn-controller.at +++ b/tests/ovn-controller.at @@ -2539,55 +2539,6 @@ check as northd ovn-appctl -t ovn-northd resume OVN_CLEANUP([hv1]) AT_CLEANUP -AT_SETUP([ovn-controller - I-P handle arp_ns_explicit_output change]) - -ovn_start - -net_add n1 -sim_add hv1 -as hv1 -check ovs-vsctl add-br br-phys -ovn_attach n1 br-phys 192.168.0.1 -check ovs-vsctl -- add-port br-int hv1-vif1 -- \ - set interface hv1-vif1 external-ids:iface-id=ls1-lp1 - -check ovn-nbctl ls-add ls1 - -check ovn-nbctl lsp-add ls1 ls1-lp1 \ --- lsp-set-addresses ls1-lp1 "f0:00:00:00:00:01" - -wait_for_ports_up -ovn-appctl -t ovn-controller vlog/set file:dbg - -read_counter() { - ovn-appctl -t ovn-controller coverage/read-counter $1 -} - -# nb_cfg update in sb_global shouldn't trigger lflow_run. -lflow_run_old=$(read_counter lflow_run) -check ovn-nbctl --wait=hv sync -lflow_run_new=$(read_counter lflow_run) -AT_CHECK([echo $(($lflow_run_new - $lflow_run_old))], [0], [0 -]) - -# arp_ns_explicit_output update in sb_global:options should trigger lflow_run. -# The below steps should cause arp_ns_explicit_output change twice. One by -# ovn-sbctl, and the other by ovn-northd to change it back. - -# In some cases, both changes are catched by ovn-controller in the same run, -# ending up in no change. - -OVS_WAIT_UNTIL([ - lflow_run_old=$(read_counter lflow_run) - check ovn-sbctl set SB_Global . options:arp_ns_explicit_output=false - check ovn-nbctl --wait=hv sync - lflow_run_new=$(read_counter lflow_run) - test x"$(($lflow_run_new - $lflow_run_old))" = x2 -]) - -OVN_CLEANUP([hv1]) -AT_CLEANUP - OVN_FOR_EACH_NORTHD([ AT_SETUP([ovn-controller - ofctrl delay until all monitored updates come]) diff --git a/tests/ovn-inc-proc-graph-dump.at b/tests/ovn-inc-proc-graph-dump.at index bec11bdf0..a1fc1d289 100644 --- a/tests/ovn-inc-proc-graph-dump.at +++ b/tests/ovn-inc-proc-graph-dump.at @@ -289,9 +289,6 @@ digraph "Incremental-Processing-Engine" { SB_dns [[style=filled, shape=box, fillcolor=white, label="SB_dns"]]; dns_cache [[style=filled, shape=box, fillcolor=white, label="dns_cache"]]; SB_dns -> dns_cache [[label="dns_cache_sb_dns_handler"]]; - SB_sb_global [[style=filled, shape=box, fillcolor=white, label="SB_sb_global"]]; - northd_options [[style=filled, shape=box, fillcolor=white, label="northd_options"]]; - SB_sb_global -> northd_options [[label="en_northd_options_sb_sb_global_handler"]]; SB_dhcp_options [[style=filled, shape=box, fillcolor=white, label="SB_dhcp_options"]]; SB_dhcpv6_options [[style=filled, shape=box, fillcolor=white, label="SB_dhcpv6_options"]]; dhcp_options [[style=filled, shape=box, fillcolor=white, label="dhcp_options"]]; @@ -355,7 +352,6 @@ digraph "Incremental-Processing-Engine" { SB_fdb [[style=filled, shape=box, fillcolor=white, label="SB_fdb"]]; SB_meter [[style=filled, shape=box, fillcolor=white, label="SB_meter"]]; lflow_output [[style=filled, shape=box, fillcolor=white, label="lflow_output"]]; - northd_options -> lflow_output [[label=""]]; dhcp_options -> lflow_output [[label=""]]; addr_sets -> lflow_output [[label="lflow_output_addr_sets_handler"]]; port_groups -> lflow_output [[label="lflow_output_port_groups_handler"]]; @@ -375,6 +371,9 @@ digraph "Incremental-Processing-Engine" { lb_data -> lflow_output [[label="lflow_output_lb_data_handler"]]; SB_fdb -> lflow_output [[label="lflow_output_sb_fdb_handler"]]; SB_meter -> lflow_output [[label="lflow_output_sb_meter_handler"]]; + SB_sb_global [[style=filled, shape=box, fillcolor=white, label="SB_sb_global"]]; + northd_options [[style=filled, shape=box, fillcolor=white, label="northd_options"]]; + SB_sb_global -> northd_options [[label="en_northd_options_sb_sb_global_handler"]]; ct_zones [[style=filled, shape=box, fillcolor=white, label="ct_zones"]]; OVS_open_vswitch -> ct_zones [[label=""]]; OVS_bridge -> ct_zones [[label=""]]; diff --git a/tests/test-ovn.c b/tests/test-ovn.c index f88d44d3d..51471750b 100644 --- a/tests/test-ovn.c +++ b/tests/test-ovn.c @@ -1367,8 +1367,6 @@ test_parse_actions(struct ovs_cmdl_context *ctx OVS_UNUSED) .group_table = &group_table, .meter_table = &meter_table, .collector_ids = &collector_ids, - .explicit_arp_ns_output = true, - .register_consolidation = true, .pipeline = OVNACT_P_INGRESS, .ingress_ptable = OFTABLE_LOG_INGRESS_PIPELINE, -- 2.54.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
