[netmp] socket accesses

Aggelos Economopoulos aoiko at cc.ece.ntua.gr
Sun Aug 17 15:39:00 PDT 2008

On Saturday 09 August 2008, Matthew Dillon wrote:
>     Ok, here are my suggestions:
> 	* Set by both sides.  Should be ok as long as any races are resolved.
> 	  In the case of userland, it could set CANTRCVMORE and send an
> 	  async message to the protocol stack.
> 	  In the case of the protocol stack, it could set CANTRCVMORE and
> 	  then drain any wait-style messages (such as sent by soreceive()
> 	  when it blocks via ssb_wait(), using the new idea for ssb_wait()).


>     The so_state flags themselves would have to be set and cleared with
>     atomic ops.  Any situation which requires notifying the protocol stack,
>     such as when userland sets CANTRCVMORE, can be done with a 'checkstate'
>     style message to the protocol stack.  The message would not contain the
>     flag, userland would simply set the flag and then tell the protocol
>     stack to check its flags state and do whatever needs to be done.

I'm not sure what the protocol thread would have to do in this case. Isn't it
enough to just have it set the relevant flag in response to the message?


More information about the Kernel mailing list