[ovs-dev] [PATCH ovn v2 3/3] northd: Precompute load balancer IP sets.

Dumitru Ceara dceara at redhat.com
Wed Jun 16 08:08:47 UTC 2021


On 6/15/21 7:42 PM, Numan Siddique wrote:
> On Thu, Jun 10, 2021 at 8:48 AM Dumitru Ceara <dceara at redhat.com> wrote:
>> There's no need to parse the IP sets every time we iterate through them.
>> It's enough to parse them once for every main loop iteration.
>>
>> Reported-at: https://bugzilla.redhat.com/1962338
>> Signed-off-by: Dumitru Ceara <dceara at redhat.com>
> Thanks for the series.
> 
> I pushed all the 3 patches of the series to the main branch with below
> small changes in patch 3.
> 
> ----
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 17ed550755..aae7314c89 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -6554,8 +6554,7 @@ build_lswitch_rport_arp_req_flows(struct ovn_port *op,
>      struct ds ips_v6_match = DS_EMPTY_INITIALIZER;
> 
>      const char *ip_addr;
> -    const char *ip_addr_next;
> -    SSET_FOR_EACH_SAFE (ip_addr, ip_addr_next, &op->od->lb_ips_v4) {
> +    SSET_FOR_EACH (ip_addr, &op->od->lb_ips_v4) {
>          ovs_be32 ipv4_addr;
> 
>          /* Check if the ovn port has a network configured on which we could
> @@ -6566,7 +6565,7 @@ build_lswitch_rport_arp_req_flows(struct ovn_port *op,
>              ds_put_format(&ips_v4_match, "%s, ", ip_addr);
>          }
>      }
> -    SSET_FOR_EACH_SAFE (ip_addr, ip_addr_next, &op->od->lb_ips_v6) {
> +    SSET_FOR_EACH (ip_addr, &op->od->lb_ips_v6) {
>          struct in6_addr ipv6_addr;
> 
>          /* Check if the ovn port has a network configured on which we could
> -------
> 

LGTM, thanks for fixing this up!

Regards,
Dumitru



More information about the dev mailing list