lkml.org 
[lkml]   [2017]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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@aporeto.com>
    >
    > Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.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;
    > > +

    \
     
     \ /
      Last update: 2017-10-06 19:45    [W:2.360 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site