Re: [Xen-devel] [PATCH v5 10/13] xen/pvcalls: implement recvmsg

2017-10-20 Thread Boris Ostrovsky
On 10/19/2017 09:38 PM, Stefano Stabellini wrote: > On Tue, 17 Oct 2017, Boris Ostrovsky wrote: >>> + >>> +int pvcalls_front_recvmsg(struct socket *sock, struct msghdr *msg, size_t >>> len, >>> +int flags) >>> +{ >>> + struct pvcalls_bedata *bedata; >>> + int ret; >>> +

Re: [Xen-devel] [PATCH v5 10/13] xen/pvcalls: implement recvmsg

2017-10-19 Thread Stefano Stabellini
On Tue, 17 Oct 2017, Boris Ostrovsky wrote: > > + > > +int pvcalls_front_recvmsg(struct socket *sock, struct msghdr *msg, size_t > > len, > > +int flags) > > +{ > > + struct pvcalls_bedata *bedata; > > + int ret; > > + struct sock_mapping *map; > > + > > + if (flags &

Re: [Xen-devel] [PATCH v5 10/13] xen/pvcalls: implement recvmsg

2017-10-17 Thread Boris Ostrovsky
> + > +int pvcalls_front_recvmsg(struct socket *sock, struct msghdr *msg, size_t > len, > + int flags) > +{ > + struct pvcalls_bedata *bedata; > + int ret; > + struct sock_mapping *map; > + > + if (flags & (MSG_CMSG_CLOEXEC|MSG_ERRQUEUE|MSG_OOB|MSG_TRUNC)) > +

[Xen-devel] [PATCH v5 10/13] xen/pvcalls: implement recvmsg

2017-10-06 Thread Stefano Stabellini
Implement recvmsg by copying data from the "in" ring. If not enough data is available and the recvmsg call is blocking, then wait on the inflight_conn_req waitqueue. Take the active socket in_mutex so that only one function can access the ring at any given time. Signed-off-by: Stefano Stabellini