Hmm. This time the patch is littered with extra spaces all through the
email.

If you're able to use them, "git format-patch" and "git send-email" is a
good way to send your patches out reliably without mail clients interfering
with the presentation of the patch.

I took a look at the group deletion thing, it seems like that has a
separate lock, so it should be fine. It would just be preferable to move
that to the end of the function, outside the ofproto_mutex critical
section. This way you can drop the extra unlock and lock of the
ofproto_mutex between tables and meters. The comments are also unneeded,
the code is pretty obvious as to what it's flushing.

Thanks,
Joe

On 1 October 2014 22:17, Gur Stavi <[email protected]> wrote:

> In fail-open mode on disconnect from controller rules are flushed. It makes
>
> sense to flush groups and meters as well.
>
>
>
> Signed-off-by: Gur Stavi <[email protected]> <[email protected]>
>
> ---
>
> Original issue was discussed here:
>
> https://www.mail-archive.com/[email protected]/msg10930.html
>
> Resending to avoid email client auto signature.
>
>
>
> Index: ofproto/ofproto.c
>
> ===================================================================
>
> --- ofproto/ofproto.c
>
> +++ ofproto/ofproto.c
>
> @@ -1276,6 +1276,8 @@
>
>      ovs_mutex_unlock(&ofproto_mutex);
>
> }
>
>
>
> +static void delete_group(struct ofproto *ofproto, uint32_t group_id);
>
> +
>
> static void
>
> ofproto_flush__(struct ofproto *ofproto)
>
>      OVS_EXCLUDED(ofproto_mutex)
>
> @@ -1305,10 +1307,18 @@
>
>          }
>
>      }
>
>      ovs_mutex_unlock(&ofproto_mutex);
>
> +
>
> +    /* Flush groups */
>
> +      delete_group(ofproto, OFPG_ALL);
>
> +
>
> +    /* Flush meters */
>
> +    ovs_mutex_lock(&ofproto_mutex);
>
> +    if (ofproto->meters) {
>
> +        meter_delete(ofproto, 1, ofproto->meter_features.max_meters);
>
> +    }
>
> +    ovs_mutex_unlock(&ofproto_mutex);
>
> }
>
>
>
> -static void delete_group(struct ofproto *ofproto, uint32_t group_id);
>
> -
>
> static void
>
> ofproto_destroy__(struct ofproto *ofproto)
>
>      OVS_EXCLUDED(ofproto_mutex)
> _______________________________________________
> dev mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to