From patchwork Mon Dec 23 15:17:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Rosbrook X-Patchwork-Id: 11308447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E9E0513B6 for ; Mon, 23 Dec 2019 15:19:17 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BC89C206CB for ; Mon, 23 Dec 2019 15:19:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fXkJHDRe" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC89C206CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ijPSt-0006Ji-Mo; Mon, 23 Dec 2019 15:17:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ijPSs-0006Jd-JE for xen-devel@lists.xenproject.org; Mon, 23 Dec 2019 15:17:46 +0000 X-Inumbo-ID: 5f3fea82-2597-11ea-88e7-bc764e2007e4 Received: from mail-qk1-x743.google.com (unknown [2607:f8b0:4864:20::743]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5f3fea82-2597-11ea-88e7-bc764e2007e4; Mon, 23 Dec 2019 15:17:45 +0000 (UTC) Received: by mail-qk1-x743.google.com with SMTP id k6so13766252qki.5 for ; Mon, 23 Dec 2019 07:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=gAnetQU4RSrfq5iAn4o+j+f/18rYLLK9d/q1e52laW0=; b=fXkJHDRezfvXU5EjHd8QGO6+UjUqvi+gsoFW2Hzxs9zjoDM7yCO6VgWAaXfpCft+zz 4BjW04IAyxrVEra9zAzybNDAlBGO8a4j7B+nbIaMaAvl0hoyc/z+6Erl8d/xqQt+lMEl qaeU1+/rIYxRaGCAcRRDG3oEM/IfgXImlKAYQHZYZz8cagwGWm6NGU40IOW2XsSnPpwT 2vCWjpMYBwFuuxefL475rfZCGrHQ9/Mg6G8pjJ50cw/mfzfd1od8/XBzSkJZX0H8mf8b UBtTtxUtAOvwlzf/D5yi6MOhu8auIWjIL3fCWCDjfJFkCFeGVx0vM60t5T8rG3z3D3ow 6AhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gAnetQU4RSrfq5iAn4o+j+f/18rYLLK9d/q1e52laW0=; b=kuNtjJnuA1jccPYEGM+jG6Gv4UdPafGSJbosdGsOmX2KHgIyOA8p2+JPEA6GhGOpU8 LWFJKLBi/6nmX09S5F9yK8HaJSiehw0EGfQe8yJQgaY4RvORumol6ao4hbcRWzTJyG2J HJAyN5mHHEDdhoazDWP7g4esOR6cYdNwufBI0x8vGbzoH9mY0STWVWOHq6UXGKoT+PN4 fDZi7DpC4JMp/qDtozuuS4KCXruAsgFYWn/AKUZ3uUYbHO+NuJMINBH3hk1sAa9/TJWc Ydu1hIkIry00pERO61K/S329pIhbv+7LBPQTFjMvspxPNtBO5EgNWVshK5EOkCws4jS5 BTNQ== X-Gm-Message-State: APjAAAVDa+oCA2zut11bVl42lSj+qx1uxO4HqRUaBvKDg1pPdp4YJEdi m5iGycLrvKDWgbfbgfN6zO9rIRQP X-Google-Smtp-Source: APXvYqxWTVJPLW6M/gvD2xtaosF0NHrvsbDMsHjVhMQDnpDe9Dkme1hl/cr9t+HKgch59Upr+o44jQ== X-Received: by 2002:a37:6716:: with SMTP id b22mr25902859qkc.109.1577114264985; Mon, 23 Dec 2019 07:17:44 -0800 (PST) Received: from four.lan (cpe-67-241-56-252.twcny.res.rr.com. [67.241.56.252]) by smtp.gmail.com with ESMTPSA id u15sm5823907qku.67.2019.12.23.07.17.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Dec 2019 07:17:44 -0800 (PST) From: Nick Rosbrook X-Google-Original-From: Nick Rosbrook To: xen-devel@lists.xenproject.org Date: Mon, 23 Dec 2019 10:17:01 -0500 Message-Id: X-Mailer: git-send-email 2.17.1 Subject: [Xen-devel] [PATCH v4 0/6] generated Go libxl bindings using IDL X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Nick Rosbrook , Ian Jackson , kerriganb@ainfosec.com, George Dunlap , Wei Liu MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" After Xen summit, we started the discussion in this[1] RFC thread to figure out how to generate Go bindings for libxl. This series implements that Go code generation using the existing IDL, and updates the existing hand-written code in xenlight.go to use the generated code. The goal of this series is to provide a good foundation for continued development of the Go package. The v1 series can be found on my GitHub branch[2]. Changes in v2: - GitHub branch for v2 [3]. - Drop patch 01/24 from v1 since was committed as a bug fix for 4.13. - The Makefile changes in 24/24 from v1 have been moved to the patches where the build changes are introduced. Changes in v3: - GitHub branch for v3 [4]. - Simplify a pattern for iterating over builtin types in their fromC functions. - Try not to duplicate as much code in gengotypes.py, and use consistent style in generated code when calling fromC. Changes in v4: - GitHub branch for v4 [5]. - The first 16 patches were commited after v3. [1] https://lists.xenproject.org/archives/html/xen-devel/2019-07/msg02259.html [2] https://github.com/enr0n/xen/tree/golang-patches-v1 [3] https://github.com/enr0n/xen/tree/golang-patches-v2 [4] https://github.com/enr0n/xen/tree/golang-patches-v3 [5] https://github.com/enr0n/xen/tree/golang-patches-v4 Nick Rosbrook (6): golang/xenlight: implement array C to Go marshaling golang/xenlight: begin Go to C type marshaling golang/xenlight: implement keyed union Go to C marshaling golang/xenlight: implement array Go to C marshaling golang/xenlight: revise use of Context type golang/xenlight: add error return type to Context.Cpupoolinfo tools/golang/xenlight/gengotypes.py | 232 ++- tools/golang/xenlight/helpers.gen.go | 1945 ++++++++++++++++++++++++++ tools/golang/xenlight/xenlight.go | 222 +-- 3 files changed, 2212 insertions(+), 187 deletions(-)