Skip to content

Commit 1b6387a

Browse files
committed
treewide: Remove old northd options.
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 <amusil@redhat.com>
1 parent 4a4c8eb commit 1b6387a

10 files changed

Lines changed: 23 additions & 172 deletions

File tree

controller/lflow.c

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ consider_logical_flow(const struct sbrec_logical_flow *lflow,
111111
static void
112112
consider_lb_hairpin_flows(const struct ovn_controller_lb *lb,
113113
const struct hmap *local_datapaths,
114-
struct ovn_desired_flow_table *flow_table,
115-
bool register_consolidation);
114+
struct ovn_desired_flow_table *flow_table);
116115

117116
static void add_port_sec_flows(const struct shash *binding_lports,
118117
const struct sbrec_chassis *,
@@ -926,8 +925,6 @@ add_matches_to_flow_table(const struct sbrec_logical_flow *lflow,
926925
.collector_ids = l_ctx_in->collector_ids,
927926
.lflow_uuid = lflow->header_.uuid,
928927
.dp_key = ldp->datapath->tunnel_key,
929-
.explicit_arp_ns_output = l_ctx_in->explicit_arp_ns_output,
930-
.register_consolidation = l_ctx_in->register_consolidation,
931928

932929
.pipeline = ingress ? OVNACT_P_INGRESS : OVNACT_P_EGRESS,
933930
.ingress_ptable = OFTABLE_LOG_INGRESS_PIPELINE,
@@ -1594,8 +1591,7 @@ static void
15941591
add_lb_vip_hairpin_flows(const struct ovn_controller_lb *lb,
15951592
struct ovn_lb_vip *lb_vip,
15961593
struct ovn_lb_backend *lb_backend,
1597-
struct ovn_desired_flow_table *flow_table,
1598-
bool register_consolidation)
1594+
struct ovn_desired_flow_table *flow_table)
15991595
{
16001596
uint64_t stub[1024 / 8];
16011597
struct ofpbuf ofpacts = OFPBUF_STUB_INITIALIZER(stub);
@@ -1613,10 +1609,8 @@ add_lb_vip_hairpin_flows(const struct ovn_controller_lb *lb,
16131609
match_set_dl_type(&hairpin_match, htons(ETH_TYPE_IP));
16141610
match_set_nw_src(&hairpin_match, bip4);
16151611
match_set_nw_dst(&hairpin_match, bip4);
1616-
enum mf_field_id id = register_consolidation
1617-
? MFF_LOG_LB_ORIG_DIP_IPV4
1618-
: MFF_LOG_LB_ORIG_DIP_IPV4_OLD;
1619-
match_set_reg(&hairpin_match, id - MFF_LOG_REG0, ntohl(vip4));
1612+
match_set_reg(&hairpin_match, MFF_LOG_LB_ORIG_DIP_IPV4 - MFF_LOG_REG0,
1613+
ntohl(vip4));
16201614

16211615
add_lb_vip_hairpin_reply_action(NULL, snat_vip4, lb->proto,
16221616
lb_backend->port,
@@ -1714,8 +1708,7 @@ static void
17141708
add_lb_ct_snat_hairpin_vip_flow(const struct ovn_controller_lb *lb,
17151709
const struct ovn_lb_vip *lb_vip,
17161710
const struct hmap *local_datapaths,
1717-
struct ovn_desired_flow_table *flow_table,
1718-
bool register_consolidation)
1711+
struct ovn_desired_flow_table *flow_table)
17191712
{
17201713
uint64_t stub[1024 / 8];
17211714
struct ofpbuf ofpacts = OFPBUF_STUB_INITIALIZER(stub);
@@ -1760,10 +1753,8 @@ add_lb_ct_snat_hairpin_vip_flow(const struct ovn_controller_lb *lb,
17601753
ovs_be32 vip4 = in6_addr_get_mapped_ipv4(&lb_vip->vip);
17611754

17621755
match_set_dl_type(&match, htons(ETH_TYPE_IP));
1763-
enum mf_field_id id = register_consolidation
1764-
? MFF_LOG_LB_ORIG_DIP_IPV4
1765-
: MFF_LOG_LB_ORIG_DIP_IPV4_OLD;
1766-
match_set_reg(&match, id - MFF_LOG_REG0, ntohl(vip4));
1756+
match_set_reg(&match, MFF_LOG_LB_ORIG_DIP_IPV4 - MFF_LOG_REG0,
1757+
ntohl(vip4));
17671758
} else {
17681759
match_set_dl_type(&match, htons(ETH_TYPE_IPV6));
17691760
ovs_be128 vip6_value;
@@ -1828,8 +1819,7 @@ add_lb_ct_snat_hairpin_vip_flow(const struct ovn_controller_lb *lb,
18281819
static void
18291820
add_lb_ct_snat_hairpin_flows(const struct ovn_controller_lb *lb,
18301821
const struct hmap *local_datapaths,
1831-
struct ovn_desired_flow_table *flow_table,
1832-
bool register_consolidation)
1822+
struct ovn_desired_flow_table *flow_table)
18331823
{
18341824
/* We must add a flow for each LB VIP. In the general case, this flow
18351825
is added to the OFTABLE_CT_SNAT_HAIRPIN table. If it matches, we
@@ -1863,42 +1853,37 @@ add_lb_ct_snat_hairpin_flows(const struct ovn_controller_lb *lb,
18631853

18641854
for (int i = 0; i < lb->n_vips; i++) {
18651855
add_lb_ct_snat_hairpin_vip_flow(lb, &lb->vips[i], local_datapaths,
1866-
flow_table, register_consolidation);
1856+
flow_table);
18671857
}
18681858
}
18691859

18701860
static void
18711861
consider_lb_hairpin_flows(const struct ovn_controller_lb *lb,
18721862
const struct hmap *local_datapaths,
1873-
struct ovn_desired_flow_table *flow_table,
1874-
bool register_consolidation)
1863+
struct ovn_desired_flow_table *flow_table)
18751864
{
18761865
for (size_t i = 0; i < lb->n_vips; i++) {
18771866
struct ovn_lb_vip *lb_vip = &lb->vips[i];
18781867

18791868
struct ovn_lb_backend *lb_backend;
18801869
VECTOR_FOR_EACH_PTR (&lb_vip->backends, lb_backend) {
1881-
add_lb_vip_hairpin_flows(lb, lb_vip, lb_backend, flow_table,
1882-
register_consolidation);
1870+
add_lb_vip_hairpin_flows(lb, lb_vip, lb_backend, flow_table);
18831871
}
18841872
}
18851873

1886-
add_lb_ct_snat_hairpin_flows(lb, local_datapaths, flow_table,
1887-
register_consolidation);
1874+
add_lb_ct_snat_hairpin_flows(lb, local_datapaths, flow_table);
18881875
}
18891876

18901877
/* Adds OpenFlow flows to flow tables for each Load balancer VIPs and
18911878
* backends to handle the load balanced hairpin traffic. */
18921879
static void
18931880
add_lb_hairpin_flows(const struct hmap *local_lbs,
18941881
const struct hmap *local_datapaths,
1895-
struct ovn_desired_flow_table *flow_table,
1896-
bool register_consolidation)
1882+
struct ovn_desired_flow_table *flow_table)
18971883
{
18981884
const struct ovn_controller_lb *lb;
18991885
HMAP_FOR_EACH (lb, hmap_node, local_lbs) {
1900-
consider_lb_hairpin_flows(lb, local_datapaths, flow_table,
1901-
register_consolidation);
1886+
consider_lb_hairpin_flows(lb, local_datapaths, flow_table);
19021887
}
19031888
}
19041889

@@ -2059,8 +2044,7 @@ lflow_run(struct lflow_ctx_in *l_ctx_in, struct lflow_ctx_out *l_ctx_out)
20592044
l_ctx_out->flow_table);
20602045
add_lb_hairpin_flows(l_ctx_in->local_lbs,
20612046
l_ctx_in->local_datapaths,
2062-
l_ctx_out->flow_table,
2063-
l_ctx_in->register_consolidation);
2047+
l_ctx_out->flow_table);
20642048
add_fdb_flows(l_ctx_in->fdb_table, l_ctx_in->local_datapaths,
20652049
l_ctx_out->flow_table,
20662050
l_ctx_in->sbrec_port_binding_by_key,
@@ -2319,8 +2303,7 @@ lflow_handle_changed_lbs(struct lflow_ctx_in *l_ctx_in,
23192303
UUID_FMT, UUID_ARGS(&uuid_node->uuid));
23202304
ofctrl_remove_flows(l_ctx_out->flow_table, &uuid_node->uuid);
23212305
consider_lb_hairpin_flows(lb, l_ctx_in->local_datapaths,
2322-
l_ctx_out->flow_table,
2323-
l_ctx_in->register_consolidation);
2306+
l_ctx_out->flow_table);
23242307
}
23252308

23262309
UUIDSET_FOR_EACH (uuid_node, new_lbs) {
@@ -2329,8 +2312,7 @@ lflow_handle_changed_lbs(struct lflow_ctx_in *l_ctx_in,
23292312
VLOG_DBG("Add load balancer hairpin flows for "UUID_FMT,
23302313
UUID_ARGS(&uuid_node->uuid));
23312314
consider_lb_hairpin_flows(lb, l_ctx_in->local_datapaths,
2332-
l_ctx_out->flow_table,
2333-
l_ctx_in->register_consolidation);
2315+
l_ctx_out->flow_table);
23342316
}
23352317

23362318
return true;

controller/lflow.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ struct lflow_ctx_in {
149149
const struct shash *lbinding_lports;
150150
bool localnet_learn_fdb;
151151
bool localnet_learn_fdb_changed;
152-
bool explicit_arp_ns_output;
153-
bool register_consolidation;
154152
};
155153

156154
struct lflow_ctx_out {

controller/ovn-controller.c

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3739,13 +3739,11 @@ non_vif_data_ovs_iface_handler(struct engine_node *node, void *data OVS_UNUSED)
37393739
}
37403740

37413741
struct ed_type_northd_options {
3742-
bool explicit_arp_ns_output;
37433742
bool always_tunnel; /* Indicates if the traffic to the
37443743
* logical port of a bridged logical
37453744
* switch (i.e with localnet port) should
37463745
* be tunnelled or sent via the localnet
37473746
* port. Default value is 'false'. */
3748-
bool register_consolidation;
37493747
bool enable_ch_nb_cfg_update;
37503748
};
37513749

@@ -3772,24 +3770,12 @@ en_northd_options_run(struct engine_node *node, void *data)
37723770
const struct sbrec_sb_global *sb_global =
37733771
sbrec_sb_global_table_first(sb_global_table);
37743772

3775-
n_opts->explicit_arp_ns_output =
3776-
sb_global
3777-
? smap_get_bool(&sb_global->options, "arp_ns_explicit_output",
3778-
false)
3779-
: false;
3780-
37813773
n_opts->always_tunnel =
37823774
sb_global
37833775
? smap_get_bool(&sb_global->options, "always_tunnel",
37843776
false)
37853777
: false;
37863778

3787-
n_opts->register_consolidation =
3788-
sb_global
3789-
? smap_get_bool(&sb_global->options, "register_consolidation",
3790-
false)
3791-
: false;
3792-
37933779
n_opts->enable_ch_nb_cfg_update =
37943780
sb_global
37953781
? 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)
38093795
sbrec_sb_global_table_first(sb_global_table);
38103796
enum engine_input_handler_result result = EN_HANDLED_UNCHANGED;
38113797

3812-
bool explicit_arp_ns_output =
3813-
sb_global
3814-
? smap_get_bool(&sb_global->options, "arp_ns_explicit_output",
3815-
false)
3816-
: false;
3817-
3818-
if (explicit_arp_ns_output != n_opts->explicit_arp_ns_output) {
3819-
n_opts->explicit_arp_ns_output = explicit_arp_ns_output;
3820-
result = EN_HANDLED_UPDATED;
3821-
}
3822-
38233798
bool always_tunnel =
38243799
sb_global
38253800
? 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)
38313806
result = EN_HANDLED_UPDATED;
38323807
}
38333808

3834-
bool register_consolidation =
3835-
sb_global
3836-
? smap_get_bool(&sb_global->options, "register_consolidation",
3837-
false)
3838-
: false;
3839-
3840-
if (register_consolidation != n_opts->register_consolidation) {
3841-
n_opts->register_consolidation = register_consolidation;
3842-
result = EN_HANDLED_UPDATED;
3843-
}
3844-
38453809
bool enable_ch_nb_cfg_update =
38463810
sb_global
38473811
? smap_get_bool(&sb_global->options, "enable_chassis_nb_cfg_update",
@@ -4040,9 +4004,6 @@ init_lflow_ctx(struct engine_node *node,
40404004
engine_get_input_data("port_groups", node);
40414005
struct shash *port_groups = &pg_data->port_groups_cs_local;
40424006

4043-
struct ed_type_northd_options *n_opts =
4044-
engine_get_input_data("northd_options", node);
4045-
40464007
struct ed_type_dhcp_options *dhcp_opts =
40474008
engine_get_input_data("dhcp_options", node);
40484009

@@ -4081,8 +4042,6 @@ init_lflow_ctx(struct engine_node *node,
40814042
l_ctx_in->localnet_learn_fdb = rt_data->localnet_learn_fdb;
40824043
l_ctx_in->localnet_learn_fdb_changed = rt_data->localnet_learn_fdb_changed;
40834044
l_ctx_in->chassis_tunnels = &non_vif_data->chassis_tunnels;
4084-
l_ctx_in->explicit_arp_ns_output = n_opts->explicit_arp_ns_output;
4085-
l_ctx_in->register_consolidation = n_opts->register_consolidation;
40864045
l_ctx_in->nd_ra_opts = &fo->nd_ra_opts;
40874046
l_ctx_in->dhcp_opts = &dhcp_opts->v4_opts;
40884047
l_ctx_in->dhcpv6_opts = &dhcp_opts->v6_opts;
@@ -4926,6 +4885,7 @@ pflow_output_if_status_mgr_handler(struct engine_node *node,
49264885
engine_get_input_data("if_status_mgr", node);
49274886

49284887
struct physical_ctx p_ctx;
4888+
49294889
init_physical_ctx(node, pfo, rt_data, non_vif_data, &p_ctx);
49304890

49314891
const struct ovsrec_interface *iface;
@@ -7128,7 +7088,6 @@ inc_proc_ovn_controller_init(
71287088
engine_add_input(&en_dhcp_options, &en_sb_dhcp_options, NULL);
71297089
engine_add_input(&en_dhcp_options, &en_sb_dhcpv6_options, NULL);
71307090

7131-
engine_add_input(&en_lflow_output, &en_northd_options, NULL);
71327091
engine_add_input(&en_lflow_output, &en_dhcp_options, NULL);
71337092

71347093
/* Keep en_addr_sets before en_runtime_data because

include/ovn/actions.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -934,12 +934,6 @@ struct ovnact_encode_params {
934934
/* The datapath key. */
935935
uint32_t dp_key;
936936

937-
/* Indication if we should add explicit output after arp/nd_ns action. */
938-
bool explicit_arp_ns_output;
939-
940-
/* Indication if we should use the "old" version of registers. */
941-
bool register_consolidation;
942-
943937
/* OVN maps each logical flow table (ltable), one-to-one, onto a physical
944938
* OpenFlow flow table (ptable). A number of parameters describe this
945939
* mapping and data related to flow tables:

include/ovn/logical-fields.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,6 @@ CHECK_REG(CT_SAVED_STATE);
106106
* port (32 bits). */
107107
CHECK_REG(REMOTE_OUTPORT);
108108

109-
/* Logical registers that are needed for backwards
110-
* compatibility with older northd versions.
111-
* XXX: All of them can be removed in 26.09. */
112-
#define MFF_LOG_LB_ORIG_DIP_IPV4_OLD MFF_REG1
113-
CHECK_REG(LB_ORIG_DIP_IPV4_OLD);
114-
#define MFF_LOG_LB_AFF_MATCH_PORT_OLD MFF_REG8
115-
CHECK_REG(LB_AFF_MATCH_PORT_OLD);
116-
#define MFF_LOG_LB_AFF_MATCH_LS_IP6_ADDR_OLD MFF_XXREG0
117-
CHECK_XXREG(LB_AFF_MATCH_LS_IP6_ADDR_OLD);
118-
119109
/* Maximum number of networks supported by 4-bit flags.network_id. */
120110
#define OVN_MAX_NETWORK_ID \
121111
((1 << (MLF_NETWORK_ID_END_BIT - MLF_NETWORK_ID_START_BIT + 1)) - 1)

lib/actions.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,9 +2061,6 @@ encode_ARP(const struct ovnact_nest *on,
20612061
struct ofpbuf *ofpacts)
20622062
{
20632063
encode_nested_actions(on, ep, ACTION_OPCODE_ARP, ofpacts);
2064-
if (!ep->explicit_arp_ns_output) {
2065-
emit_resubmit(ofpacts, ep->output_ptable);
2066-
}
20672064
}
20682065

20692066
static void
@@ -2152,9 +2149,6 @@ encode_ND_NS(const struct ovnact_nest *on,
21522149
struct ofpbuf *ofpacts)
21532150
{
21542151
encode_nested_actions(on, ep, ACTION_OPCODE_ND_NS, ofpacts);
2155-
if (!ep->explicit_arp_ns_output) {
2156-
emit_resubmit(ofpacts, ep->output_ptable);
2157-
}
21582152
}
21592153

21602154
static void
@@ -5520,10 +5514,7 @@ encode_COMMIT_LB_AFF(const struct ovnact_commit_lb_aff *lb_aff,
55205514
imm_backend_ip = (union mf_value) {
55215515
.ipv6 = lb_aff->backend,
55225516
};
5523-
enum mf_field_id id = !ep->register_consolidation && ep->is_switch
5524-
? MFF_LOG_LB_AFF_MATCH_LS_IP6_ADDR_OLD
5525-
: MFF_LOG_LB_AFF_MATCH_IP6_ADDR;
5526-
ol_spec->dst.field = mf_from_id(id);
5517+
ol_spec->dst.field = mf_from_id(MFF_LOG_LB_AFF_MATCH_IP6_ADDR);
55275518
} else {
55285519
ovs_be32 ip4 = in6_addr_get_mapped_ipv4(&lb_aff->backend);
55295520
imm_backend_ip = (union mf_value) {
@@ -5551,10 +5542,7 @@ encode_COMMIT_LB_AFF(const struct ovnact_commit_lb_aff *lb_aff,
55515542
.be16 = htons(lb_aff->backend_port),
55525543
};
55535544

5554-
enum mf_field_id id = !ep->register_consolidation
5555-
? MFF_LOG_LB_AFF_MATCH_PORT_OLD
5556-
: MFF_LOG_LB_AFF_MATCH_PORT;
5557-
ol_spec->dst.field = mf_from_id(id);
5545+
ol_spec->dst.field = mf_from_id(MFF_LOG_LB_AFF_MATCH_PORT);
55585546
ol_spec->dst_type = NX_LEARN_DST_LOAD;
55595547
ol_spec->src_type = NX_LEARN_SRC_IMMEDIATE;
55605548
ol_spec->dst.ofs = 0;

northd/en-global-config.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -714,14 +714,6 @@ update_sb_config_options_to_sbrec(struct ed_type_global_config *config_data,
714714
smap_replace(options, "sbctl_probe_interval", sip);
715715
}
716716

717-
/* Adds indication that northd is handling explicit output after
718-
* arp/nd_ns action. */
719-
smap_add(options, "arp_ns_explicit_output", "true");
720-
721-
/* Adds indication that northd has code with consolidated
722-
* register usage. */
723-
smap_add(options, "register_consolidation", "true");
724-
725717
if (!smap_equal(&sb->options, options)) {
726718
sbrec_sb_global_set_options(sb, options);
727719
}

0 commit comments

Comments
 (0)