Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jul 1996 12:12:57 -0700 (PDT)
From:      Garrett Wollman <wollman>
To:        CVS-committers, cvs-all, cvs-sys
Subject:   cvs commit:  src/sys/sys protosw.h src/sys/kern uipc_domain.c uipc_socket2.c
Message-ID:  <199607091912.MAA29031@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

wollman     96/07/09 12:12:56

  Modified:    sys/sys   protosw.h
               sys/kern  uipc_domain.c uipc_socket2.c
  Log:
  This is a proposal-in-code for a substantial modification of the way
  the high kernel calls into a protocol stack to perform requests on the
  user's behalf.  We replace the pr_usrreq() entry in struct protosw with a
  pointer to a structure containing pointers to functions which implement
  the various reuqests; each function is declared with the correct type and
  number of arguments.  (This is unlike the current scheme in which a quarter
  of the requests take arguments of type other than (struct mbuf *) and the
  difference is papered over with casts.)  There are a few benefits to this
  new scheme:
  
  1) Arguments are passed with their correct types, and null-pointer dummies
     are no longer necessary.
  
  2) There should be slightly better caching effects from eliminating
     the prximity to extraneous code and th switch in pr_usrreq().
  
  3) It becomes much easier to change the types of the arguments to something
     other than `struct mbuf *' (e.g.,pushing the work of sosend() into
     the protocol as advocated by Van Jacobson).
  
  There is one principal drawback: existing protocol stacks need to
  be modified.  This is alleviated by compatibility code in
  uipc_socket2.c and uipc_domain.c which emulates the new interface
  in terms of the old and vice versa.
  
  This idea is not original to me.  I  read about what Jacobson did
  in one of his papers and have tried to implement  the first steps
  towards something like that here.  Much work remains to be done.
  
  Revision  Changes    Path
  1.10      +52 -1     src/sys/sys/protosw.h
  1.13      +10 -2     src/sys/kern/uipc_domain.c
  1.11      +219 -1    src/sys/kern/uipc_socket2.c



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