diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2009-04-22 03:26:23 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-23 15:04:33 +0400 |
commit | b8942e3b6c4b35dda5e8ca75aec5e2f027fe39a9 (patch) | |
tree | 1d89b4fc4aa5d327c0c43feb4281b1a3aa6e0a23 /net/iucv/iucv.c | |
parent | 9d5c5d8f4105dc56ec10864b195dd1714f282c22 (diff) | |
download | linux-b8942e3b6c4b35dda5e8ca75aec5e2f027fe39a9.tar.xz |
af_iucv: Support data in IUCV msg parameter lists (IPRMDATA)
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: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/iucv/iucv.c')
-rw-r--r-- | net/iucv/iucv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index fcf404065f12..61e8038a55ee 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -1388,6 +1388,8 @@ static void iucv_path_complete(struct iucv_irq_data *data) struct iucv_path_complete *ipc = (void *) data; struct iucv_path *path = iucv_path_table[ipc->ippathid]; + if (path) + path->flags = ipc->ipflags1; if (path && path->handler && path->handler->path_complete) path->handler->path_complete(path, ipc->ipuser); } |