]> git.ipfire.org Git - thirdparty/samba.git/commit
smb2_server: use sendmsg/recvmsg instead of writev/readv
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Aug 2018 11:02:50 +0000 (13:02 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 6 Feb 2020 14:57:42 +0000 (14:57 +0000)
commit76e1206717e76dadc212f3363d3faeb66b18c7e7
treea3392f7374cbfeb7088a5a474ea79ece62ae96c7
parent7d1b560804b46fd6de83fa1b478d180a4184b5d3
smb2_server: use sendmsg/recvmsg instead of writev/readv

This avoids a few function calls inside the kernel
in order to reach sock_sendmsg() quicker:

    entry_SYSCALL_64_after_hwframe
       do_syscall_64
          __x64_sys_writev
             do_writev
                vfs_writev
                   do_iter_write
                      do_iter_readv_writev
                         sock_write_iter
                            sock_sendmsg

    entry_SYSCALL_64_after_hwframe
       do_syscall_64
          __x64_sys_sendmsg
             __sys_sendmsg
                ___sys_sendmsg
                   sock_sendmsg

As a side effect it will be useful for SMB-Direct invalidation
messages via msg->msg_control and CMSG_*.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/smbd/smb2_server.c