Skip to content

Commit

Permalink
northd: Generate logical router's LB and NAT flows using lr_lbnat_data.
Browse files Browse the repository at this point in the history
Previous commits added new engine nodes to store logical router's lb
and NAT data.  Make use of the data stored by these engine nodes
to generate logical flows related to router's LBs and NATs.

Signed-off-by: Numan Siddique <numans@ovn.org>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
numansiddique authored and ovsrobot committed Oct 24, 2023
1 parent 4d6a75f commit b0031e2
Show file tree
Hide file tree
Showing 5 changed files with 495 additions and 265 deletions.
3 changes: 0 additions & 3 deletions northd/en-lflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ lflow_get_input_data(struct engine_node *node,
engine_get_input_data("port_group", node);
struct sync_meters_data *sync_meters_data =
engine_get_input_data("sync_meters", node);
struct ed_type_lr_nat_data *lr_nat_data =
engine_get_input_data("lr_nat", node);
struct ed_type_lr_lb_nat_data *lr_lb_nat_data =
engine_get_input_data("lr_lb_nat_data", node);

Expand All @@ -68,7 +66,6 @@ lflow_get_input_data(struct engine_node *node,
lflow_input->ls_ports = &northd_data->ls_ports;
lflow_input->lr_ports = &northd_data->lr_ports;
lflow_input->ls_port_groups = &pg_data->ls_port_groups;
lflow_input->lr_nats = &lr_nat_data->lr_nats;
lflow_input->lr_lbnats = &lr_lb_nat_data->lr_lbnats;
lflow_input->meter_groups = &sync_meters_data->meter_groups;
lflow_input->lb_datapaths_map = &northd_data->lb_datapaths_map;
Expand Down
4 changes: 4 additions & 0 deletions northd/en-lr-lb-nat-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ struct lr_lb_nat_data_table {
#define LR_LB_NAT_DATA_TABLE_FOR_EACH(LR_LB_NAT_REC, TABLE) \
HMAP_FOR_EACH (LR_LB_NAT_REC, key_node, &(TABLE)->entries)

#define LR_LB_NAT_DATA_TABLE_FOR_EACH_IN_P(LR_LB_NAT_REC, JOBID, TABLE) \
HMAP_FOR_EACH_IN_PARALLEL (LR_LB_NAT_REC, key_node, JOBID, \
&(TABLE)->entries)

struct lr_lb_nat_data_tracked_data {
/* Created or updated logical router with LB data. */
struct hmapx crupdated; /* Stores 'struct lr_lb_nat_data_record'. */
Expand Down
1 change: 0 additions & 1 deletion northd/inc-proc-northd.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ void inc_proc_northd_init(struct ovsdb_idl_loop *nb,
engine_add_input(&en_lflow, &en_sb_igmp_group, NULL);
engine_add_input(&en_lflow, &en_northd, lflow_northd_handler);
engine_add_input(&en_lflow, &en_port_group, lflow_port_group_handler);
engine_add_input(&en_lflow, &en_lr_nat, NULL);
engine_add_input(&en_lflow, &en_lr_lb_nat_data, NULL);

engine_add_input(&en_sync_to_sb_addr_set, &en_nb_address_set,
Expand Down
Loading

0 comments on commit b0031e2

Please sign in to comment.