zijianzhang@ wrote:
From: Zijian Zhang <redacted>
The MSG_ZEROCOPY flag enables copy avoidance for socket send calls.
However, zerocopy is not a free lunch. Apart from the management of user
pages, the combination of poll + recvmsg to receive notifications incurs
unignorable overhead in the applications. We try to mitigate this overhead
with a new notification mechanism based on msg_control. Leveraging the
general framework to copy cmsgs to the user space, we copy zerocopy
notifications to the user upon returning of sendmsgs.
May want to
- Explicitly state that receiving notifications on sendmsg is
optional and existing recvmsg MSG_ERRQUEUE continues to work
- Include a very brief example of how this interface is used.
Probably pseudo-code, as msghdr setup and CMSG processing are
verbose operations
Btw patchwork shows red for patch 1/3 due to a new error or warning.
Not sure if it's a false positive, but take a look.
Signed-off-by: Zijian Zhang <redacted>
Signed-off-by: Xiaochun Lu <redacted>
+/*
+ * zc_info is the struct used for the SCM_ZC_NOTIFICATION control message.
+ */
+struct zc_info {
+ __u32 size; /* size of the zc_info_elem arr */
Size is ambiguous, could mean byte size. Perhaps length, or number of
elements in arr[].
+ struct zc_info_elem arr[];
+};