From patchwork Wed Mar 15 19:23:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9626477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F0A31604A9 for ; Wed, 15 Mar 2017 19:26:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2831285A1 for ; Wed, 15 Mar 2017 19:26:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D776528635; Wed, 15 Mar 2017 19:26:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7408B28670 for ; Wed, 15 Mar 2017 19:26:14 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coEWV-00051f-W6; Wed, 15 Mar 2017 19:23:51 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1coEWU-00051U-Vk for xen-devel@lists.xenproject.org; Wed, 15 Mar 2017 19:23:51 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id D9/39-19998-6C499C85; Wed, 15 Mar 2017 19:23:50 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFLMWRWlGSWpSXmKPExsVybKJsh+7RKSc jDNY0qFp83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBnX5vEUvBOoONQ8gbWBcRNfFyMXh5DAVEaJ CRO+s0I4B5kkFrzYxtTFyMnBJmAo8ffJJjYQW0RASeLeqslMIEXMAnsZJe6+vgOWEBaIkng9b xYziM0ioCrx9dhmxi5GDg5eATeJK9fCQcISAnISJ49NZgWxOQXcJTbsXMIGsayNUWLFvjOMEE UZEvN65rBC2F4Si25cgrLVJK6e28Q8gZFvASPDKkb14tSistQiXSO9pKLM9IyS3MTMHF1DA2O 93NTi4sT01JzEpGK95PzcTYzAMKlnYGDcwXiq2fkQoyQHk5Ior4rgiQghvqT8lMqMxOKM+KLS nNTiQ4wyHBxKEryRWUA5waLU9NSKtMwcYMDCpCU4eJREeONA0rzFBYm5xZnpEKlTjIpS4ryBI AkBkERGaR5cGyxKLjHKSgnzMjIwMAjxFKQW5WaWoMq/YhTnYFQS5lUGmcKTmVcCN/0V0GImoM WJP4+ALC5JREhJNTDWbQram1irc+qF5L+JU1bwLNTQLtO0Xybv+Wr96n3tuSzNjPy58QUaO5j nO1zpt1pw5iHre96JRTNLb2c9PCVz79hT+8ecpVrbzIK4ylf/v/GeZ3pI8D6J1JUHUtYvPru1 /Y83u1aL1IlPyyr9aqRKGwPOeG2UrOKI/Nt9w70nTEKY50FtabUSS3FGoqEWc1FxIgA2HtbDj QIAAA== X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-15.tower-31.messagelabs.com!1489605828!86407248!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests=UPPERCASE_25_50 X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 44330 invoked from network); 15 Mar 2017 19:23:49 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 15 Mar 2017 19:23:49 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C08CC203DC; Wed, 15 Mar 2017 19:23:46 +0000 (UTC) Received: from sstabellini-ThinkPad-X260.hsd1.ca.comcast.net (96-82-76-110-static.hfc.comcastbusiness.net [96.82.76.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91D2120450; Wed, 15 Mar 2017 19:23:44 +0000 (UTC) From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Wed, 15 Mar 2017 12:23:36 -0700 Message-Id: <1489605821-29649-2-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489605821-29649-1-git-send-email-sstabellini@kernel.org> References: <1489605821-29649-1-git-send-email-sstabellini@kernel.org> X-Virus-Scanned: ClamAV using ClamSMTP Cc: jgross@suse.com, sstabellini@kernel.org, linux-kernel@vger.kernel.org, groug@kaod.org, Stefano Stabellini , boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v4 2/7] xen: introduce the header file for the Xen 9pfs transport protocol X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP It uses the new ring.h macros to declare rings and interfaces. Signed-off-by: Stefano Stabellini CC: konrad.wilk@oracle.com CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: groug@kaod.org --- include/xen/interface/io/9pfs.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/xen/interface/io/9pfs.h diff --git a/include/xen/interface/io/9pfs.h b/include/xen/interface/io/9pfs.h new file mode 100644 index 0000000..276eda4 --- /dev/null +++ b/include/xen/interface/io/9pfs.h @@ -0,0 +1,40 @@ +/* + * 9pfs.h -- Xen 9PFS transport + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Copyright (C) 2017 Stefano Stabellini + */ + +#ifndef __XEN_PUBLIC_IO_9PFS_H__ +#define __XEN_PUBLIC_IO_9PFS_H__ + +#include "xen/interface/io/ring.h" + +struct xen_9pfs_header { + uint32_t size; + uint8_t id; + uint16_t tag; +} __attribute__((packed)); + +#define XEN_9PFS_RING_ORDER 6 +#define XEN_9PFS_RING_SIZE XEN_FLEX_RING_SIZE(XEN_9PFS_RING_ORDER) +DEFINE_XEN_FLEX_RING_AND_INTF(xen_9pfs); + +#endif