Hi Eelco,

thanks for the feedback. I updated it and send a v3.

On Fri, Dec 01, 2023 at 10:38:16AM +0100, Eelco Chaudron wrote:
>
>
> On 8 Nov 2023, at 11:07, Felix Huettner via dev wrote:
>
> > this exposes the old constants regarding min backoff, max backoff and
>
> This
>

sorry, i missed that one, so its still wrong. But if there is a v4 it
will be included.

> >
> > +/* Returns the default min_backoff value for reconnect. It uses the 
> > environment
> > + * variable OVS_RECONNECT_MIN_BACKOFF if set and valid or otherwise 
> > defaults
> > + * to 1 second. The return value is in ms. */
> > +unsigned int reconnect_default_min_backoff(void) {
> > +    static unsigned int default_min_backoff = 0;
> > +    if (default_min_backoff == 0) {
> > +        char *env = getenv("OVS_RECONNECT_MIN_BACKOFF");
> > +        if (env && env[0]) {
> > +            str_to_uint(env, 10, &default_min_backoff);
> > +        }
> > +        if (default_min_backoff == 0) {
>
> I think we should define some sane minimum value. Or are we ok with 1ms? Some 
> for all the others.

I now defined 1000ms as minimum for the min_backoff and probe_interval
and used 2000ms for max_backoff. Let me know if you find other values
more reasonable.

>
> > +            default_min_backoff = 1000;
>
> I think we should keep the default definitions, and use them here rather than 
> the hard-coded numbers.
> So this will become:
>
>       default_min_backoff = RECONNECT_DEFAULT_MIN_BACKOFF
>

Yes i readded them as defines at the top of the file (so they migrate
from reconnect.h to reconnect.c)

Thanks
Felix
Diese E Mail enthält möglicherweise vertrauliche Inhalte und ist nur für die 
Verwertung durch den vorgesehenen Empfänger bestimmt.
Sollten Sie nicht der vorgesehene Empfänger sein, setzen Sie den Absender bitte 
unverzüglich in Kenntnis und löschen diese E Mail.

Hinweise zum Datenschutz finden Sie hier<https://www.datenschutz.schwarz>.


This e-mail may contain confidential content and is intended only for the 
specified recipient/s.
If you are not the intended recipient, please inform the sender immediately and 
delete this e-mail.

Information on data protection can be found 
here<https://www.datenschutz.schwarz>.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to