[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 6/9] plat/xen/drivers/9p: Register 9P transport


  • To: "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: Vlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@xxxxxxxxxxxxxxx>
  • Date: Sat, 7 Sep 2019 10:21:58 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=stud.acs.upb.ro; dmarc=pass action=none header.from=stud.acs.upb.ro; dkim=pass header.d=stud.acs.upb.ro; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G4LwodXLjR2P7PdhKeW1/E+yJZD6z1slV91dYoIX7Pc=; b=mPHa/phQemXuzbcIAcyR5mjK+Jo/zXGVt7ACkdUPBGcRmuNZ4/pEAf8xi4O/qV9lA8bV0hK0tSb7zzSCum/jKE9fSNwuib5L1A/JCG2kvTepRCMs5csFOgA2JmCRgxQ8l1+v6mXAjd+7ijWHQccTwBxg5eGL7NA7WWzXE37Z4Guf6ZA93lf3P2nDQ1kABJeJfUfhycjRBZf1I3rVrrKByFf9DH+1GjKlKz3dee4UjcjGhorGsK594vbift9WX4RFvmuOmPB8jB8IYvlC542T9IloWkpG7FtA/pksp57yUjvDIcEg4S8DBqBKxhj495ia6oYtn9HAp+Q8j0kgmzUSMA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fZU4e0iKxDvsxnyFXJtjoybGymuwnUhIRWGJtee1YHeNzzJwyJhUuPKX52S3fJWailUcKSd1DxGGY38CjXE/4LsCT576+a4LLOHFMMvZznIY7pdQSloucpXIqKWs5TpXEw4/spjRmiAn+dgViVTxguWN+n+iUJ5X//g+BP209lwt/9CbU4Zi32XFobcpBIA+Wus03O1CiOEo3qYrOSORIzkSwycL15+clM+2XmtU64TRyffm5LgvWHTonfTrQtEgYL6z7YBV6/cZY1e8iZ2pu0bT9KbedNE7nUHoa/AiV7lO1/ubWdxZ6Y4XD6mcMKXF2yx4u+DZnZcGNroW81PkQw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=vlad_andrei.badoiu@xxxxxxxxxxxxxxx;
  • Cc: "costin.lupu@xxxxxxxxx" <costin.lupu@xxxxxxxxx>, Cristian Banu <cristb@xxxxxxxxx>
  • Delivery-date: Sat, 07 Sep 2019 10:22:25 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Thread-index: AQHVZWYUhiDteg2QhE20ejY1kQdYKw==
  • Thread-topic: [UNIKRAFT PATCH 6/9] plat/xen/drivers/9p: Register 9P transport

From: Cristian Banu <cristb@xxxxxxxxx>

This patch adds stubs for the callbacks required by the transport layer
and registers the transport with the 9P API.

Signed-off-by: Cristian Banu <cristb@xxxxxxxxx>
---
 plat/xen/drivers/9p/9pfront.c | 37 ++++++++++++++++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/plat/xen/drivers/9p/9pfront.c b/plat/xen/drivers/9p/9pfront.c
index 3898cb85..12591d07 100644
--- a/plat/xen/drivers/9p/9pfront.c
+++ b/plat/xen/drivers/9p/9pfront.c
@@ -38,6 +38,9 @@
 #include <uk/assert.h>
 #include <uk/essentials.h>
 #include <uk/list.h>
+#include <uk/9pdev.h>
+#include <uk/9preq.h>
+#include <uk/9pdev_trans.h>
 #include <uk/plat/spinlock.h>
 #include <xen-x86/mm.h>
 #include <xen-x86/irq.h>
@@ -187,14 +190,46 @@ out:
        return rc;
 }
 
+static int p9front_connect(struct uk_9pdev *p9dev __unused,
+                          const char *device_identifier __unused,
+                          const char *mount_args __unused)
+{
+       return 0;
+}
+
+static int p9front_disconnect(struct uk_9pdev *p9dev __unused)
+{
+       return 0;
+}
+
+static int p9front_request(struct uk_9pdev *p9dev __unused,
+                          struct uk_9preq *req __unused)
+{
+       return 0;
+}
+
+static const struct uk_9pdev_trans_ops p9front_trans_ops = {
+       .connect        = p9front_connect,
+       .disconnect     = p9front_disconnect,
+       .request        = p9front_request
+};
+
+static struct uk_9pdev_trans p9front_trans = {
+       .name           = "xen",
+       .ops            = &p9front_trans_ops,
+       .a              = NULL /* Set below. */
+};
+
+
 static int p9front_drv_init(struct uk_alloc *drv_allocator)
 {
        if (!drv_allocator)
                return -EINVAL;
 
        a = drv_allocator;
+       p9front_trans.a = a;
 
-       return 0;
+       return uk_9pdev_trans_register(&p9front_trans);
 }
 
 static int p9front_add_dev(struct xenbus_device *xendev)
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.