Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jan 2006 19:14:40 +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/lib/libnetgraph msg.c src/sys/netgraph ng_message.h
Message-ID:  <200601121914.k0CJEeEJ031208@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
glebius     2006-01-12 19:14:40 UTC

  FreeBSD src repository

  Modified files:
    lib/libnetgraph      msg.c 
    sys/netgraph         ng_message.h 
  Log:
  In the splnet(9) times netgraph(4) was synchronous and if a message
  had been replied, the reply was always delivered to the originator
  synchronously.
  
  With introduction of netgraph item callbacks and a wait channel with
  mutex in ng_socket(4), we have fixed the problem with ngctl(8) returning
  earlier than the command has been proceeded by target node. But still
  ngctl(8) can return prior to the reply has arrived to its node.
  
  To fix this:
   - Introduce a new flag for netgraph(4) messages - NGM_HASREPLY.
     This flag is or'ed with message like NGM_READONLY.
   - In netgraph userland library if we have sent a message with
     NGM_HASREPLY flag, then select(2) until reply comes.
   - Mark appropriate generic commands with NGM_HASREPLY flag,
     gathering them into one enum {}. Bump generic cookie.
  
  Revision  Changes    Path
  1.12      +16 -0     src/lib/libnetgraph/msg.c
  1.28      +31 -17    src/sys/netgraph/ng_message.h



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