Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Dec 2015 07:35:44 -0800
From:      Randall Stewart <rrs@netflix.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        "Alexander V. Chernikov" <melifaro@freebsd.org>, Adrian Chadd <adrian@freebsd.org>, freebsd-net <freebsd-net@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: panic in arptimer in r289937
Message-ID:  <0D974796-6166-48DB-BB66-72236E0B50AF@netflix.com>
In-Reply-To: <56699BAD.9090208@selasky.org>
References:  <CAJ-VmonvVyTNuYv_as41yPCFdfR5T3FE45DP9MKAc-eyzXzPUg@mail.gmail.com> <2739461446298483@web2h.yandex.ru> <CAJ-Vmo=JjHonDqOYK%2BJDaf9581dRU5_KoaSTnY27JnzQm0v56w@mail.gmail.com> <1733241446303675@web19h.yandex.ru> <5661EAAF.1010906@selasky.org> <5661EF10.8060300@selasky.org> <96B619F6-489C-4931-B306-1E1DE03F09B4@netflix.com> <56699BAD.9090208@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
If you did that it would change the KPI a bit meaning lots
of thrashing in the code.

And on top of that you now would no longer return 0..

You would get 1 it was restarted or -1 it was not running but is now =
started.

Makes no sense to me sorry..

R
On Dec 10, 2015, at 7:35 AM, Hans Petter Selasky <hps@selasky.org> =
wrote:

> On 12/10/15 16:25, Randall Stewart wrote:
>> For callout_stop/drain you get
>>=20
>> -1 =3D=3D Callout as already gone off or is not running (usually the =
latter) else the caller iks
>>           not using locking properly or did not lock and check the =
active() value (which would have returned not active so no stop
>>           would have been needed);
>> 0 =3D=3D we could not stop the callout, it was in process..
>> 1 =3D=3D it was stopped successfully
>>=20
>>=20
>> For callout_reset() you get
>>=20
>> 0 =3D=3D it was started
>> 1 =3D=3D it was restarted.
>>=20
>> There is no -1 since it is either started or restarted never left in =
a not-running state...
>>=20
>=20
> Hi,
>=20
> Correct, though if the return values would be the same, it might =
simplify the callout API and manual page a bit:
>=20
> /* return values for all callout_xxx() functions */
> #define CALLOUT_RET_DRAINING    0 /* callout cannot be stopped, need =
drain */
> #define CALLOUT_RET_CANCELLED   1 /* callout was successfully stopped =
*/
> #define CALLOUT_RET_STOPPED     -1 /* callout was already stopped */
>=20
> Then callout_reset() would return -1, if it was started from the =
stopped state.
>=20
> --HPS

--------
Randall Stewart
rrs@netflix.com
803-317-4952








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0D974796-6166-48DB-BB66-72236E0B50AF>