From owner-cvs-src@FreeBSD.ORG Tue Jul 5 17:54:21 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38C6616A41F for ; Tue, 5 Jul 2005 17:54:21 +0000 (GMT) (envelope-from maksim.yevmenkin@gmail.com) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 987DD43D55 for ; Tue, 5 Jul 2005 17:54:20 +0000 (GMT) (envelope-from maksim.yevmenkin@gmail.com) Received: by rproxy.gmail.com with SMTP id i8so916838rne for ; Tue, 05 Jul 2005 10:54:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KKBuJqhxR/kOGcxqAEzg+Jk936ioJdG3rBqdwS/x3bBG8ZnUBzziKTOw9CefR8qbAwXFpnq0mpFMeOwH99pJtMHwytX4kXL5kWr7jYFT8sBAhhA7j0JD5I3jHWLCovRhY63o9S6iNNRXqWxbMM4RRCJDGXGLDdAaRyK7PSjZQbY= Received: by 10.38.89.66 with SMTP id m66mr4155941rnb; Tue, 05 Jul 2005 10:54:18 -0700 (PDT) Received: by 10.38.208.5 with HTTP; Tue, 5 Jul 2005 10:54:18 -0700 (PDT) Message-ID: Date: Tue, 5 Jul 2005 10:54:18 -0700 From: Maksim Yevmenkin To: Gleb Smirnoff In-Reply-To: <200507051735.j65HZK06019006@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200507051735.j65HZK06019006@repoman.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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maksim Yevmenkin List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2005 17:54:21 -0000 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 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 >