On Tue, Mar 14, 2023 at 10:51:55AM +0000, Naveen Yerramneni wrote:
> Add OpenFlow extn to set conntrack entries limit per zone.
> 
> Signed-off-by: Naveen Yerramneni <[email protected]>

Hi Naveen,

There were 4 postings of this patchset yesterday, and one so far today.
Please consider allowing 24h between postings to give reviewers a chance to
look at things.

Overall this patch looks nice to me, I reviewed it with reference to:

2a7c4805a76d ("Add OpenFlow command to flush conntrack table entries.")

Some minor comments inline.

I will run some tests over it.
And respond further if that shows up anything of interest.

...

> diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
> index f87e27a8c..6797cebac 100644
> --- a/ofproto/ofproto-dpif.c
> +++ b/ofproto/ofproto-dpif.c
> @@ -5631,6 +5631,27 @@ ct_del_zone_timeout_policy(const char *datapath_type, 
> uint16_t zone_id)
>      }
>  }
>  
> +static void
> +ct_set_zone_limit(const struct ofproto *ofproto_, const uint16_t zone_id,
> +                  const uint32_t limit)
> +{
> +    struct ofproto_dpif *ofproto = ofproto_dpif_cast(ofproto_);
> +    struct ovs_list zone_limits = OVS_LIST_INITIALIZER(&zone_limits);
> +
> +    ct_dpif_push_zone_limit(&zone_limits, zone_id, limit, 0);
> +    int err = ct_dpif_set_limits(ofproto->backer->dpif, NULL, &zone_limits);
> +    if (err) {
> +        VLOG_ERR_RL(&rl, "failed to set zone limit id=%"PRIu16", "
> +                          "limit=%"PRIu32" (%s)", zone_id, limit,
> +                          ovs_strerror(err));
> +    } else {
> +        VLOG_DBG("configured zone limit for zone=%"PRIu16", limit=%"PRIu32"",
> +                zone_id, limit);
> +    }
> +  
> +    ct_dpif_free_zone_limits(&zone_limits); 

nit: the two lines line above have trailing whitespace.

> +}
> +

...
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to