summaryrefslogtreecommitdiffstats
path: root/drivers/xen/pvcalls-front.h
diff options
context:
space:
mode:
authorStefano Stabellini2017-10-30 23:40:59 +0100
committerBoris Ostrovsky2017-10-31 14:05:53 +0100
commit45ddce214a797de65c0418bebf90c1b564c3ee3d (patch)
tree0052d1e964d166a212d461ffba2e020d8398a2e5 /drivers/xen/pvcalls-front.h
parentxen/pvcalls: implement accept command (diff)
downloadkernel-qcow2-linux-45ddce214a797de65c0418bebf90c1b564c3ee3d.tar.gz
kernel-qcow2-linux-45ddce214a797de65c0418bebf90c1b564c3ee3d.tar.xz
kernel-qcow2-linux-45ddce214a797de65c0418bebf90c1b564c3ee3d.zip
xen/pvcalls: implement sendmsg
Send data to an active socket by copying data to the "out" ring. Take the active socket out_mutex so that only one function can access the ring at any given time. If not enough room is available on the ring, rather than returning immediately or sleep-waiting, spin for up to 5000 cycles. This small optimization turns out to improve performance significantly. Signed-off-by: Stefano Stabellini <stefano@aporeto.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/xen/pvcalls-front.h')
-rw-r--r--drivers/xen/pvcalls-front.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/xen/pvcalls-front.h b/drivers/xen/pvcalls-front.h
index ab4f1dad3142..d937c24c90c3 100644
--- a/drivers/xen/pvcalls-front.h
+++ b/drivers/xen/pvcalls-front.h
@@ -13,5 +13,8 @@ int pvcalls_front_listen(struct socket *sock, int backlog);
int pvcalls_front_accept(struct socket *sock,
struct socket *newsock,
int flags);
+int pvcalls_front_sendmsg(struct socket *sock,
+ struct msghdr *msg,
+ size_t len);
#endif