Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2005 10:54:18 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/netgraph netgraph.h ng_base.c ng_socket.c ng_socketvar.h
Message-ID:  <bb4a86c705070510541eb492b1@mail.gmail.com>
In-Reply-To: <200507051735.j65HZK06019006@repoman.freebsd.org>
References:  <200507051735.j65HZK06019006@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Gleb,

in your opinion, is this likely to affect other parts of netgraph?=20
(i.e. netgraph atm, netgraph bluetooth).

thanks,
max

On 7/5/05, Gleb Smirnoff <glebius@freebsd.org> wrote:
> glebius     2005-07-05 17:35:20 UTC
>=20
>   FreeBSD src repository
>=20
>   Modified files:
>     sys/netgraph         netgraph.h ng_base.c ng_socket.c
>                          ng_socketvar.h
>   Log:
>   In the splnet times, netgraph was functional and synchronous. Nowadays,
>   an item may be queued and processed later. While this is OK for mbufs,
>   this is a problem for control messages.
>=20
>   In the framework:
>   - Add optional callback function pointer to an item. When item gets
>     applied the callback is executed from ng_apply_item().
>   - Add new flag NG_PROGRESS. If this flag is supplied, then return
>     EINPROGRESS instead of 0 in case if item failed to deliver
>     synchronously and was queued.
>   - Honor NG_PROGRESS in ng_snd_item().
>=20
>   In ng_socket:
>   - When userland sends control message add callback to the item.
>   - If ng_snd_item() returns EINPROGRESS, then sleep.
>=20
>   This change fixes possible races in ngctl(8) scripts.
>=20
>   Reviewed by:    julian
>   Approved by:    re (scottl)
>=20
>   Revision  Changes    Path
>   1.55      +8 -0      src/sys/netgraph/netgraph.h
>   1.102     +28 -2     src/sys/netgraph/ng_base.c
>   1.67      +44 -1     src/sys/netgraph/ng_socket.c
>   1.10      +2 -0      src/sys/netgraph/ng_socketvar.h
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c705070510541eb492b1>