[ovs-dev] [OVN Patch v13 2/4] Fix BFD Calling conventions

Numan Siddique numans at ovn.org
Wed Feb 10 18:06:13 UTC 2021


On Fri, Jan 29, 2021 at 4:52 PM <anton.ivanov at cambridgegreys.com> wrote:
>
> 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>

I applied this patch to master.

Thanks
Numan

> ---
>  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 b2eb93835..f36640061 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -11393,6 +11393,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;
> @@ -11400,12 +11401,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,
> @@ -11426,7 +11429,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);
> @@ -11509,6 +11512,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,
> @@ -11518,7 +11522,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