sonic-buildimage/platform/barefoot/saithrift-patches/0001-Replace-unions-with-structs-in-thrift.patch
2022-02-18 01:44:42 -08:00

71 lines
1.8 KiB
Diff

From 6f0188ad82845ac56729d3db621b2d10bea94ddd Mon Sep 17 00:00:00 2001
From: Myron Sosyak <myronx.sosyak@intel.com>
Date: Thu, 27 Jan 2022 17:25:42 +0000
Subject: [PATCH 1/4] Replace unions with structs in thrift
---
test/saithrift/src/switch_sai.thrift | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/saithrift/src/switch_sai.thrift b/test/saithrift/src/switch_sai.thrift
index a9e1d28..0c24b71 100644
--- a/test/saithrift/src/switch_sai.thrift
+++ b/test/saithrift/src/switch_sai.thrift
@@ -48,7 +48,7 @@ struct sai_thrift_vlan_port_t {
2: sai_thrift_vlan_tagging_mode_t tagging_mode;
}
-union sai_thrift_ip_t {
+struct sai_thrift_ip_t {
1: sai_thrift_ip4_t ip4;
2: sai_thrift_ip6_t ip6;
}
@@ -79,7 +79,7 @@ struct sai_thrift_s32_list_t {
2: list<i32> s32list;
}
-union sai_thrift_acl_mask_t {
+struct sai_thrift_acl_mask_t {
1: byte u8;
2: byte s8;
3: i16 u16;
@@ -91,7 +91,7 @@ union sai_thrift_acl_mask_t {
9: sai_thrift_ip6_t ip6;
}
-union sai_thrift_acl_data_t {
+struct sai_thrift_acl_data_t {
1: byte u8;
2: byte s8;
3: i16 u16;
@@ -112,7 +112,7 @@ struct sai_thrift_acl_field_data_t
3: sai_thrift_acl_data_t data;
}
-union sai_thrift_acl_parameter_t {
+struct sai_thrift_acl_parameter_t {
1: byte u8;
2: byte s8;
3: i16 u16;
@@ -161,7 +161,7 @@ struct sai_thrift_fdb_values_t {
2: sai_thrift_fdb_entry_t thrift_fdb_entry;
}
-union sai_thrift_attribute_value_t {
+struct sai_thrift_attribute_value_t {
1: bool booldata;
2: string chardata;
3: byte u8;
@@ -207,7 +207,7 @@ struct sai_thrift_attribute_list_t {
2: i32 attr_count; // redundant
}
-union sai_thrift_result_data_t {
+struct sai_thrift_result_data_t {
1: sai_thrift_object_list_t objlist;
2: sai_thrift_object_id_t oid;
3: i16 u16;
--
2.20.1