Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jul 2005 17:35:20 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/netgraph netgraph.h ng_base.c ng_socket.c ng_socketvar.h
Message-ID:  <200507051735.j65HZK06019006@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
glebius     2005-07-05 17:35:20 UTC

  FreeBSD src repository

  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.
  
  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().
  
  In ng_socket:
  - When userland sends control message add callback to the item.
  - If ng_snd_item() returns EINPROGRESS, then sleep.
  
  This change fixes possible races in ngctl(8) scripts.
  
  Reviewed by:    julian
  Approved by:    re (scottl)
  
  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?200507051735.j65HZK06019006>