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

[PATCH] tools/golang: Add missing golang bindings for vlan


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Mon, 20 May 2024 16:21:45 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UbqrXnoQt1tDj70V69JT90VeEkTrc+nsLeY+/Ia23sc=; b=nvGt2SkNCGctfcdfTq5zn+GeK/cAQSL7UlURPCT2brL305KUGDQ0khMRjs8dHT2h1nRSZyUnuesdJGrnO3XdTBXK6tQczHSOQ/H/lz9lbttKVLNQGgFqPnZlZZgz3fGwZMIN8wyAeu+RWPXbkpKPMk02emw8jJmkL44ctjuiPYwYjPAQcZuFvKrucZpeKTRle7PiWYBlehSAZyDnQoEAYwLYPo3buV4x7UtSVFg9Y3tzgQXDfX54oGByEzM7gzPctkdapfA+2PGRuS1sEAnXonCc3lEcx5V6yORtz5fZlQNc3iE74TCzrI+Azh6O+GiZ7vQ7yjPRErPYlmWHuakJXA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KckXvErkpYY9uKTniKW7Mva3zDb5luNOrBf3gN4UuwaLqE089usYYWB3MtIwimbvCsE64yo/DqzL6azrzwYA0s3zREuzfVBmeBH2BDWZ8Ekr/s0INqNfKneAobTpDZfRHxOvC6/JBNaZpG/hW3kEYaI6Wmf46eqtlpJB/S9BF0Ev8XQO4b+JzBqjiWPdAZfkalbzA7ppExGU5W7kw6pyzjSknvCf8SGpLOoquOJabZif39LUsXE7sE4pxKbX3Cz6fbehsMWBExxXsQsiHI/qo3cSc0YrTJmCKnve54eoMnYm6gofDskoQoh9dQRLKtiWbdSEphIComVa6xjCtSYcsw==
  • Cc: Henry Wang <xin.wang2@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Leigh Brown <leigh@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 20 May 2024 08:22:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

It is noticed that commit:
3bc14e4fa4b9 ("tools/libs/light: Add vlan field to libxl_device_nic")
introduces a new "vlan" string field to libxl_device_nic. But the
golang bindings are missing. Add it in this patch.

Fixes: 3bc14e4fa4b9 ("tools/libs/light: Add vlan field to libxl_device_nic")
Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
---
The code is automatically generated by:
```
./configure
make tools
```
---
 tools/golang/xenlight/helpers.gen.go | 3 +++
 tools/golang/xenlight/types.gen.go   | 1 +
 2 files changed, 4 insertions(+)

diff --git a/tools/golang/xenlight/helpers.gen.go 
b/tools/golang/xenlight/helpers.gen.go
index 78bdb08b15..b9cb5b33c7 100644
--- a/tools/golang/xenlight/helpers.gen.go
+++ b/tools/golang/xenlight/helpers.gen.go
@@ -1963,6 +1963,7 @@ func (x *DeviceNic) fromC(xc *C.libxl_device_nic) error {
 x.BackendDomname = C.GoString(xc.backend_domname)
 x.Devid = Devid(xc.devid)
 x.Mtu = int(xc.mtu)
+x.Vlan = C.GoString(xc.vlan)
 x.Model = C.GoString(xc.model)
 if err := x.Mac.fromC(&xc.mac);err != nil {
 return fmt.Errorf("converting field Mac: %v", err)
@@ -2040,6 +2041,8 @@ if x.BackendDomname != "" {
 xc.backend_domname = C.CString(x.BackendDomname)}
 xc.devid = C.libxl_devid(x.Devid)
 xc.mtu = C.int(x.Mtu)
+if x.Vlan != "" {
+xc.vlan = C.CString(x.Vlan)}
 if x.Model != "" {
 xc.model = C.CString(x.Model)}
 if err := x.Mac.toC(&xc.mac); err != nil {
diff --git a/tools/golang/xenlight/types.gen.go 
b/tools/golang/xenlight/types.gen.go
index ccfe18019e..5b293755d7 100644
--- a/tools/golang/xenlight/types.gen.go
+++ b/tools/golang/xenlight/types.gen.go
@@ -756,6 +756,7 @@ BackendDomid Domid
 BackendDomname string
 Devid Devid
 Mtu int
+Vlan string
 Model string
 Mac Mac
 Ip string
-- 
2.34.1




 


Rackspace

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