From patchwork Mon Mar 6 20:01:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9607479 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 3E3D66046A for ; Mon, 6 Mar 2017 20:03:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21C9A28236 for ; Mon, 6 Mar 2017 20:03:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 168CE28249; Mon, 6 Mar 2017 20:03:43 +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 91DBE28236 for ; Mon, 6 Mar 2017 20:03:42 +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 1ckypD-0004GX-0x; Mon, 06 Mar 2017 20:01:43 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckypB-0004F5-5D for xen-devel@lists.xenproject.org; Mon, 06 Mar 2017 20:01:41 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id FD/B8-27751-420CDB85; Mon, 06 Mar 2017 20:01:40 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrLLMWRWlGSWpSXmKPExsVybKJsh678gb0 RBu0npS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oxbBw6zFNwWqNj1bQpLA+NCvi5GLg4hgamM EpvufmeFcA4ySfx89hvI4eRgEzCU+PtkExuILSKgJHFv1WQmkCJmgTWMEl/PvWUHSQgLhEtMv 3+IGcRmEVCVmLrkKVicV8BNYs+tDrBBEgJyEiePTQazOQXcJfq/TIPa1s4o0bWpmx2iKENiXs 8cqAYviUU3LkHZahJXz21insDIt4CRYRWjRnFqUVlqka6hsV5SUWZ6RkluYmaOrqGBmV5uanF xYnpqTmJSsV5yfu4mRmCwMADBDsYvywIOMUpyMCmJ8rot2xshxJeUn1KZkVicEV9UmpNafIhR hoNDSYLXaz9QTrAoNT21Ii0zBxi2MGkJDh4lEV5hkDRvcUFibnFmOkTqFKOilDivDUhCACSRU ZoH1waLlUuMslLCvIxAhwjxFKQW5WaWoMq/YhTnYFQS5g0BmcKTmVcCN/0V0GImoMXarmCLSx IRUlINjLoHp7yeyMfxPupvyPWJLPkvnJZmPfZd9vLnx98HN1Sv5r3uktIS33Lx3e6NPG3vxct zvWdOUp96IeSG8l+bo/tdC+Vs/+/6YL1jPd+3GPncksv8XRU1Tnc8ziruTedi363Fe+v4YfZf husDNSfOOOP+NTZtkt6WmAWqIh4PesP0vOddMPI4EajEUpyRaKjFXFScCAAtgIQFkAIAAA== X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-5.tower-21.messagelabs.com!1488830494!52946169!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 41989 invoked from network); 6 Mar 2017 20:01:35 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-5.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 6 Mar 2017 20:01:35 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE8D220149; Mon, 6 Mar 2017 20:01:32 +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 986042013A; Mon, 6 Mar 2017 20:01:31 +0000 (UTC) From: Stefano Stabellini To: xen-devel@lists.xenproject.org Date: Mon, 6 Mar 2017 12:01:23 -0800 Message-Id: <1488830488-18506-2-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1488830488-18506-1-git-send-email-sstabellini@kernel.org> References: <1488830488-18506-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, Stefano Stabellini , boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH 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 --- 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