Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670905
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 10/18] xen/pvcalls: implement listen command |
| Date | 2017-06-20 18:00 +0200 |
| Message-ID | <tUtJo-27o-17@gated-at.bofh.it> (permalink) |
| References | <tSIjv-6s6-3@gated-at.bofh.it> <tSItb-6vK-3@gated-at.bofh.it> <tSItc-6vK-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/15/2017 03:09 PM, Stefano Stabellini wrote:
> Call inet_listen to implement the listen command.
>
> Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
> CC: boris.ostrovsky@oracle.com
> CC: jgross@suse.com
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
> drivers/xen/pvcalls-back.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c
> index c17d970..e5c535d 100644
> --- a/drivers/xen/pvcalls-back.c
> +++ b/drivers/xen/pvcalls-back.c
> @@ -358,6 +358,25 @@ static int pvcalls_back_bind(struct xenbus_device *dev,
> static int pvcalls_back_listen(struct xenbus_device *dev,
> struct xen_pvcalls_request *req)
> {
> + struct pvcalls_fedata *fedata;
> + int ret = -EINVAL;
> + struct sockpass_mapping *map;
> + struct xen_pvcalls_response *rsp;
> +
> + fedata = dev_get_drvdata(&dev->dev);
> +
> + map = radix_tree_lookup(&fedata->socketpass_mappings, req->u.listen.id);
> + if (map == NULL)
> + goto out;
> +
> + ret = inet_listen(map->sock, req->u.listen.backlog);
> +
> +out:
> + rsp = RING_GET_RESPONSE(&fedata->ring, fedata->ring.rsp_prod_pvt++);
> + rsp->req_id = req->req_id;
> + rsp->cmd = req->cmd;
> + rsp->u.listen.id = req->u.listen.id;
> + rsp->ret = ret;
> return 0;
newline before return would be useful (if you respin this)
> }
>
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v4 10/18] xen/pvcalls: implement listen command Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-20 18:00 +0200
csiph-web