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


Groups > linux.kernel > #1651451 > unrolled thread

Re: [PATCH v2 07/18] xen/pvcalls: implement socket command

Started byBoris Ostrovsky <boris.ostrovsky@oracle.com>
First post2017-05-26 18:00 +0200
Last post2017-06-02 20:40 +0200
Articles 2 — 2 participants

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 v2 07/18] xen/pvcalls: implement socket command Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-05-26 18:00 +0200
    Re: [PATCH v2 07/18] xen/pvcalls: implement socket command Stefano Stabellini <sstabellini@kernel.org> - 2017-06-02 20:40 +0200

#1651451 — Re: [PATCH v2 07/18] xen/pvcalls: implement socket command

FromBoris Ostrovsky <boris.ostrovsky@oracle.com>
Date2017-05-26 18:00 +0200
SubjectRe: [PATCH v2 07/18] xen/pvcalls: implement socket command
Message-ID<tLpOG-7Ks-25@gated-at.bofh.it>
>  static int pvcalls_back_socket(struct xenbus_device *dev,
>  		struct xen_pvcalls_request *req)
>  {
> -	return 0;
> +	struct pvcalls_back_priv *priv;
> +	int ret;
> +	struct xen_pvcalls_response *rsp;
> +
> +	priv = dev_get_drvdata(&dev->dev);
> +
> +	if (req->u.socket.domain != AF_INET ||
> +	    req->u.socket.type != SOCK_STREAM ||
> +	    (req->u.socket.protocol != 0 &&
> +	     req->u.socket.protocol != AF_INET))

Shouldn't this be one of IPPROTO_* macros?

-boris

[toc] | [next] | [standalone]


#1656462

FromStefano Stabellini <sstabellini@kernel.org>
Date2017-06-02 20:40 +0200
Message-ID<tNZEm-4Mu-11@gated-at.bofh.it>
In reply to#1651451
On Fri, 26 May 2017, Boris Ostrovsky wrote:
> >  static int pvcalls_back_socket(struct xenbus_device *dev,
> >  		struct xen_pvcalls_request *req)
> >  {
> > -	return 0;
> > +	struct pvcalls_back_priv *priv;
> > +	int ret;
> > +	struct xen_pvcalls_response *rsp;
> > +
> > +	priv = dev_get_drvdata(&dev->dev);
> > +
> > +	if (req->u.socket.domain != AF_INET ||
> > +	    req->u.socket.type != SOCK_STREAM ||
> > +	    (req->u.socket.protocol != 0 &&
> > +	     req->u.socket.protocol != AF_INET))
> 
> Shouldn't this be one of IPPROTO_* macros?

Ah yes, I could use IPPROTO_IP instead of 0 here

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web