diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2018-02-15 10:49:36 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-16 16:04:17 -0500 |
commit | 0cebaccef3acbdfbc2d85880a2efb765d2f4e2e3 (patch) | |
tree | a8e355ad69ddb3de228816062631f9e4d356b8cc /include/uapi/linux/rds.h | |
parent | 01883eda72bd3f0a6c81447e4f223de14033fd9d (diff) | |
download | linux-0cebaccef3acbdfbc2d85880a2efb765d2f4e2e3.tar.gz linux-0cebaccef3acbdfbc2d85880a2efb765d2f4e2e3.tar.bz2 linux-0cebaccef3acbdfbc2d85880a2efb765d2f4e2e3.zip |
rds: zerocopy Tx support.
If the MSG_ZEROCOPY flag is specified with rds_sendmsg(), and,
if the SO_ZEROCOPY socket option has been set on the PF_RDS socket,
application pages sent down with rds_sendmsg() are pinned.
The pinning uses the accounting infrastructure added by
Commit a91dbff551a6 ("sock: ulimit on MSG_ZEROCOPY pages")
The payload bytes in the message may not be modified for the
duration that the message has been pinned. A multi-threaded
application using this infrastructure may thus need to be notified
about send-completion so that it can free/reuse the buffers
passed to rds_sendmsg(). Notification of send-completion will
identify each message-buffer by a cookie that the application
must specify as ancillary data to rds_sendmsg().
The ancillary data in this case has cmsg_level == SOL_RDS
and cmsg_type == RDS_CMSG_ZCOPY_COOKIE.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/rds.h')
-rw-r--r-- | include/uapi/linux/rds.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/rds.h b/include/uapi/linux/rds.h index e71d4491f225..12e3bca32cad 100644 --- a/include/uapi/linux/rds.h +++ b/include/uapi/linux/rds.h @@ -103,6 +103,7 @@ #define RDS_CMSG_MASKED_ATOMIC_FADD 8 #define RDS_CMSG_MASKED_ATOMIC_CSWP 9 #define RDS_CMSG_RXPATH_LATENCY 11 +#define RDS_CMSG_ZCOPY_COOKIE 12 #define RDS_INFO_FIRST 10000 #define RDS_INFO_COUNTERS 10000 |