[ovs-dev] [OVN Patch v11 2/4] Fix BFD Calling conventions
Lorenzo Bianconi
lorenzo.bianconi at redhat.com
Thu Jan 14 18:34:29 UTC 2021
> From: Anton Ivanov <anton.ivanov at cambridgegreys.com>
>
> The calling convention for the per-od/per-op routines is that
> any data is passed as a part of the lsi struct. This way the
> functions can be used in both sequential and parallel builds.
>
> Signed-off-by: Anton Ivanov <anton.ivanov at cambridgegreys.com>
> ---
Tested-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>
> northd/ovn-northd.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 50507685b..dda033543 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -11581,6 +11581,7 @@ struct lswitch_flow_build_info {
> struct hmap *igmp_groups;
> struct shash *meter_groups;
> struct hmap *lbs;
> + struct hmap *bfd_connections;
> char *svc_check_match;
> struct ds match;
> struct ds actions;
> @@ -11588,12 +11589,14 @@ struct lswitch_flow_build_info {
>
> /* Helper function to combine all lflow generation which is iterated by
> * datapath.
> + *
> + * When extending the function new "work data" must be added to the lsi
> + * struct, not passed as an argument.
> */
>
> static void
> build_lswitch_and_lrouter_iterate_by_od(struct ovn_datapath *od,
> - struct lswitch_flow_build_info *lsi,
> - struct hmap *bfd_connections)
> + struct lswitch_flow_build_info *lsi)
> {
> /* Build Logical Switch Flows. */
> build_lswitch_lflows_pre_acl_and_acl(od, lsi->port_groups, lsi->lflows,
> @@ -11614,7 +11617,7 @@ build_lswitch_and_lrouter_iterate_by_od(struct ovn_datapath *od,
> &lsi->actions);
> build_ND_RA_flows_for_lrouter(od, lsi->lflows);
> build_static_route_flows_for_lrouter(od, lsi->lflows, lsi->ports,
> - bfd_connections);
> + lsi->bfd_connections);
> build_mcast_lookup_flows_for_lrouter(od, lsi->lflows, &lsi->match,
> &lsi->actions);
> build_ingress_policy_flows_for_lrouter(od, lsi->lflows, lsi->ports);
> @@ -11697,6 +11700,7 @@ build_lswitch_and_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
> .igmp_groups = igmp_groups,
> .meter_groups = meter_groups,
> .lbs = lbs,
> + .bfd_connections = bfd_connections,
> .svc_check_match = svc_check_match,
> .match = DS_EMPTY_INITIALIZER,
> .actions = DS_EMPTY_INITIALIZER,
> @@ -11706,7 +11710,7 @@ build_lswitch_and_lrouter_flows(struct hmap *datapaths, struct hmap *ports,
> * will move here and will be reogranized by iterator type.
> */
> HMAP_FOR_EACH (od, key_node, datapaths) {
> - build_lswitch_and_lrouter_iterate_by_od(od, &lsi, bfd_connections);
> + build_lswitch_and_lrouter_iterate_by_od(od, &lsi);
> }
> HMAP_FOR_EACH (op, key_node, ports) {
> build_lswitch_and_lrouter_iterate_by_op(op, &lsi);
> --
> 2.20.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
More information about the dev
mailing list