[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.10.1710061044270.3073@sstabellini-ThinkPad-X260>
Date: Fri, 6 Oct 2017 10:44:37 -0700 (PDT)
From: Stefano Stabellini <sstabellini@...nel.org>
To: Boris Ostrovsky <boris.ostrovsky@...cle.com>
cc: Stefano Stabellini <sstabellini@...nel.org>,
xen-devel@...ts.xen.org, linux-kernel@...r.kernel.org,
jgross@...e.com, Stefano Stabellini <stefano@...reto.com>
Subject: Re: [PATCH v4 05/13] xen/pvcalls: implement connect command
On Thu, 21 Sep 2017, Boris Ostrovsky wrote:
> On 09/15/2017 07:00 PM, Stefano Stabellini wrote:
> > Send PVCALLS_CONNECT to the backend. Allocate a new ring and evtchn for
> > the active socket.
> >
> > Introduce fields in struct sock_mapping to keep track of active sockets.
> > Introduce a waitqueue to allow the frontend to wait on data coming from
> > the backend on the active socket (recvmsg command).
> >
> > Two mutexes (one of reads and one for writes) will be used to protect
> > the active socket in and out rings from concurrent accesses.
> >
> > Signed-off-by: Stefano Stabellini <stefano@...reto.com>
>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@...cle.com>
>
> with a couple of nits below and comments from previous patch applicable here.
>
>
> > + bytes = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
> > + PVCALLS_RING_ORDER);
>
> I don't think the cast is needed.
>
>
> > + map = (struct sock_mapping *) sock->sk->sk_send_head;
>
> Space between cast and variable.
>
> > + req = RING_GET_REQUEST(&bedata->ring, req_id);
> > + req->req_id = req_id;
> > + req->cmd = PVCALLS_CONNECT;
> > + req->u.connect.id = (uint64_t)map;
> > + memcpy(req->u.connect.addr, addr, sizeof(*addr));
>
> Move this down (I don't think there are any dependencies)
All done, thanks!
> > + req->u.connect.len = addr_len;
> > + req->u.connect.flags = flags;
> > + req->u.connect.ref = map->active.ref;
> > + req->u.connect.evtchn = evtchn;
> > +
Powered by blists - more mailing lists