[netmp] socket accesses

Matthew Dillon dillon at apollo.backplane.com
Sun Aug 17 15:34:14 PDT 2008


:What do you picture the protocol side doing in response to this message?
:Currently, the process side will be woken up when e.g. new data arrives or
:the connection state changes etc. But to decide if anything changed since
:the message was sent, the protocol essentially needs to know what the process
:side "knew" when it sent the message. So we need to send a message which
:includes a pointer to, say:
:
:struct socksnap {
:	int state;
:	int rcvdata;
:};
:
:Is that what you had in mind?
:
:Aggelos

    I think almost all such messages could simply use a specific callback
    that checks for a specific set of conditions.  For example, if the
    reader blocks it is simply waiting for an unblocking condition such
    as data present in the sockbuf or an EOF/disconnect condition.

    The most complex case might be something used by the atomic record
    code or the HTTP filter code, where data is present in the sockbuf but
    the reader wants to wait for more.  In that case a single field could
    be supplied, aka the disred wbytes target.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Kernel mailing list