Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1664522 > unrolled thread

Re: [PATCH v3 10/18] xen/pvcalls: implement listen command

Started byJuergen Gross <jgross@suse.com>
First post2017-06-13 09:10 +0200
Last post2017-06-13 09:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 10/18] xen/pvcalls: implement listen command Juergen Gross <jgross@suse.com> - 2017-06-13 09:10 +0200

#1664522 — Re: [PATCH v3 10/18] xen/pvcalls: implement listen command

FromJuergen Gross <jgross@suse.com>
Date2017-06-13 09:10 +0200
SubjectRe: [PATCH v3 10/18] xen/pvcalls: implement listen command
Message-ID<tRO7E-4US-13@gated-at.bofh.it>
On 02/06/17 21:31, 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
> ---
>  drivers/xen/pvcalls-back.c | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c
> index 4a0cfa3..a75586e 100644
> --- a/drivers/xen/pvcalls-back.c
> +++ b/drivers/xen/pvcalls-back.c
> @@ -355,7 +355,26 @@ static int pvcalls_back_bind(struct xenbus_device *dev,
>  static int pvcalls_back_listen(struct xenbus_device *dev,
>  			       struct xen_pvcalls_request *req)
>  {
> -	return 0;
> +	struct pvcalls_fedata *priv;
> +	int ret = -EINVAL;
> +	struct sockpass_mapping *map;
> +	struct xen_pvcalls_response *rsp;
> +
> +	priv = dev_get_drvdata(&dev->dev);
> +
> +	map = radix_tree_lookup(&priv->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(&priv->ring, priv->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 ret;

return 0?


Juergen

>  }
>  
>  static int pvcalls_back_accept(struct xenbus_device *dev,
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web