From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S943833AbdEZPyr (ORCPT ); Fri, 26 May 2017 11:54:47 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:37261 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934666AbdEZPyo (ORCPT ); Fri, 26 May 2017 11:54:44 -0400 Subject: Re: [PATCH v2 07/18] xen/pvcalls: implement socket command To: Stefano Stabellini , xen-devel@lists.xen.org References: <1495236179-27776-1-git-send-email-sstabellini@kernel.org> <1495236179-27776-7-git-send-email-sstabellini@kernel.org> Cc: linux-kernel@vger.kernel.org, jgross@suse.com, Stefano Stabellini From: Boris Ostrovsky Message-ID: <399535eb-ad9c-08f4-2fd7-bb44c0e11c0a@oracle.com> Date: Fri, 26 May 2017 11:53:28 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1495236179-27776-7-git-send-email-sstabellini@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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