On Thu, Nov 14, 2024 at 8:58 AM Xavier Simonart <[email protected]> wrote:
>
> Signed-off-by: Xavier Simonart <[email protected]>
> ---
>  controller/physical.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/controller/physical.c b/controller/physical.c
> index 8d5065098..6b93696fa 100644
> --- a/controller/physical.c
> +++ b/controller/physical.c
> @@ -2194,15 +2194,15 @@ consider_mc_group(struct ovsdb_idl_index 
> *sbrec_port_binding_by_name,
>          }
>
>          int zone_id = ct_zone_find_zone(ct_zones, port->logical_port);
> -        if (zone_id) {
> -            put_load(zone_id, MFF_LOG_CT_ZONE, 0, 16, &ofpacts);
> -        }

Hi Xavier,

I'm a little confused with this patch.  Can you please explain what is
the improvement here ?

Also can you please update the commit message with more details ?

From what I understand prior to this patch,  for all the port bindings
in a multicast group,
zone id of the pb (if present) is loaded to the ct_zone register.

How is this patch avoiding setting the same register again ?

Thanks
Numan

>
>          const char *lport_name = (port->parent_port && *port->parent_port) ?
>                                    port->parent_port : port->logical_port;
>
>          if (!strcmp(port->type, "patch")) {
>              if (ldp->is_transit_switch) {
> +                if (zone_id) {
> +                    put_load(zone_id, MFF_LOG_CT_ZONE, 0, 16, &ofpacts);
> +                }
>                  local_output_pb(port->tunnel_key, &ofpacts);
>              } else {
>                  remote_ramp_ports = true;
> @@ -2218,8 +2218,14 @@ consider_mc_group(struct ovsdb_idl_index 
> *sbrec_port_binding_by_name,
>                      || is_additional_chassis(port, chassis))
>                     && (local_binding_get_primary_pb(local_bindings, 
> lport_name)
>                         || !strcmp(port->type, "l3gateway"))) {
> +            if (zone_id) {
> +                put_load(zone_id, MFF_LOG_CT_ZONE, 0, 16, &ofpacts);
> +            }
>              local_output_pb(port->tunnel_key, &ofpacts);
>          } else if (simap_contains(patch_ofports, port->logical_port)) {
> +            if (zone_id) {
> +                put_load(zone_id, MFF_LOG_CT_ZONE, 0, 16, &ofpacts);
> +            }
>              local_output_pb(port->tunnel_key, &ofpacts);
>          } else if (!strcmp(port->type, "chassisredirect")
>                     && port->chassis == chassis) {
> @@ -2231,6 +2237,9 @@ consider_mc_group(struct ovsdb_idl_index 
> *sbrec_port_binding_by_name,
>                                             distributed_port);
>                  if (distributed_binding
>                      && port->datapath == distributed_binding->datapath) {
> +                    if (zone_id) {
> +                        put_load(zone_id, MFF_LOG_CT_ZONE, 0, 16, &ofpacts);
> +                    }
>                      local_output_pb(distributed_binding->tunnel_key, 
> &ofpacts);
>                  }
>              }
> --
> 2.31.1
>
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to