History

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.

Sowmini Varadhan committed 8 years ago

Commit 0cebacc1 parent 01883ed4 files · +91 −8Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/rds.h+1−0
@@ -103,6 +103,7 @@ · 102 unmodified lines
103103 #define RDS_CMSG_MASKED_ATOMIC_FADD 8
104104 #define RDS_CMSG_MASKED_ATOMIC_CSWP 9
105105 #define RDS_CMSG_RXPATH_LATENCY 11
106+#define RDS_CMSG_ZCOPY_COOKIE 12
106107
107108 #define RDS_INFO_FIRST 10000
108109 #define RDS_INFO_COUNTERS 10000