• Hendrik Brueckner's avatar
    af_iucv: Support data in IUCV msg parameter lists (IPRMDATA) · b8942e3b
    Hendrik Brueckner authored
    The patch allows to send and receive data in the parameter list of an
    iucv message.
    The parameter list is an arry of 8 bytes that are used by af_iucv as
    follows:
    	0..6  7 bytes for socket data and
    	   7  1 byte to store the data length.
    
    Instead of storing the data length directly, the difference
    between 0xFF and the data length is used.
    This convention does not interfere with the existing use of PRM
    messages for shutting down the send direction of an AF_IUCV socket
    (shutdown() operation).  Data lenghts greater than 7 (or PRM message
    byte 8 is less than 0xF8) denotes to special messages.
    Currently, the special SEND_SHUTDOWN message is supported only.
    
    To use IPRM messages, both communicators must set the IUCV_IPRMDATA
    flag during path negotiation, i.e. in iucv_connect() and
    path_pending().
    
    To be compatible to older af_iucv implementations, sending PRM
    messages is controlled by the socket option SO_IPRMDATA_MSG.
    Receiving PRM messages does not depend on the socket option (but
    requires the IUCV_IPRMDATA path flag to be set).
    
    Sending/Receiving data in the parameter list improves performance for
    small amounts of data by reducing message_completion() interrupts and
    memory copy operations.
    Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
    Signed-off-by: default avatarUrsula Braun <ursula.braun@de.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b8942e3b
iucv.c 46.1 KB