@@ -84,74 +84,46 @@ extern sai_status_t meta_sai_get_stats_oid(
84
84
_Inout_ uint64_t *counter_list,
85
85
_In_ sai_get_generic_stats_fn<T> get);
86
86
87
- // META FDB
88
-
89
- extern sai_status_t meta_sai_create_fdb_entry (
90
- _In_ const sai_fdb_entry_t * fdb_entry,
91
- _In_ uint32_t attr_count,
92
- _In_ const sai_attribute_t *attr_list,
93
- _In_ sai_create_fdb_entry_fn create);
94
-
95
- extern sai_status_t meta_sai_remove_fdb_entry (
96
- _In_ const sai_fdb_entry_t * fdb_entry,
97
- _In_ sai_remove_fdb_entry_fn remove);
98
-
99
- extern sai_status_t meta_sai_set_fdb_entry (
100
- _In_ const sai_fdb_entry_t * fdb_entry,
101
- _In_ const sai_attribute_t *attr,
102
- _In_ sai_set_fdb_entry_attribute_fn set);
103
-
104
- extern sai_status_t meta_sai_get_fdb_entry (
105
- _In_ const sai_fdb_entry_t * fdb_entry,
106
- _In_ uint32_t attr_count,
107
- _Inout_ sai_attribute_t *attr_list,
108
- _In_ sai_get_fdb_entry_attribute_fn get);
109
-
110
- // META NEIGHBOR
111
-
112
- extern sai_status_t meta_sai_create_neighbor_entry (
113
- _In_ const sai_neighbor_entry_t * neighbor_entry,
114
- _In_ uint32_t attr_count,
115
- _In_ const sai_attribute_t *attr_list,
116
- _In_ sai_create_neighbor_entry_fn create);
117
-
118
- extern sai_status_t meta_sai_remove_neighbor_entry (
119
- _In_ const sai_neighbor_entry_t * neighbor_entry,
120
- _In_ sai_remove_neighbor_entry_fn remove);
121
-
122
- extern sai_status_t meta_sai_set_neighbor_entry (
123
- _In_ const sai_neighbor_entry_t * neighbor_entry,
124
- _In_ const sai_attribute_t *attr,
125
- _In_ sai_set_neighbor_entry_attribute_fn set);
126
-
127
- extern sai_status_t meta_sai_get_neighbor_entry (
128
- _In_ const sai_neighbor_entry_t * neighbor_entry,
129
- _In_ uint32_t attr_count,
130
- _Inout_ sai_attribute_t *attr_list,
131
- _In_ sai_get_neighbor_entry_attribute_fn get);
132
-
133
- // META ROUTE
134
-
135
- extern sai_status_t meta_sai_create_route_entry (
136
- _In_ const sai_route_entry_t * route_entry,
137
- _In_ uint32_t attr_count,
138
- _In_ const sai_attribute_t *attr_list,
139
- _In_ sai_create_route_entry_fn create);
140
-
141
- extern sai_status_t meta_sai_remove_route_entry (
142
- _In_ const sai_route_entry_t * route_entry,
143
- _In_ sai_remove_route_entry_fn remove);
144
-
145
- extern sai_status_t meta_sai_set_route_entry (
146
- _In_ const sai_route_entry_t * route_entry,
147
- _In_ const sai_attribute_t *attr,
148
- _In_ sai_set_route_entry_attribute_fn set);
149
-
150
- extern sai_status_t meta_sai_get_route_entry (
151
- _In_ const sai_route_entry_t * route_entry,
152
- _In_ uint32_t attr_count,
153
- _Inout_ sai_attribute_t *attr_list,
154
- _In_ sai_get_route_entry_attribute_fn get);
87
+ // META ENTRY QUAD
88
+
89
+ #define META_CREATE_ENTRY (ot ) \
90
+ extern sai_status_t meta_sai_create_ ## ot( \
91
+ _In_ const sai_ ## ot ## _t* ot, \
92
+ _In_ uint32_t attr_count, \
93
+ _In_ const sai_attribute_t *attr_list, \
94
+ _In_ sai_create_ ## ot ## _fn create);
95
+
96
+ #define META_REMOVE_ENTRY (ot ) \
97
+ extern sai_status_t meta_sai_remove_ ## ot( \
98
+ _In_ const sai_ ## ot ## _t* ot, \
99
+ _In_ sai_remove_ ## ot ##_fn remove);
100
+
101
+ #define META_SET_ENTRY (ot ) \
102
+ extern sai_status_t meta_sai_set_ ## ot( \
103
+ _In_ const sai_ ## ot ## _t* ot, \
104
+ _In_ const sai_attribute_t *attr, \
105
+ _In_ sai_set_ ## ot ## _attribute_fn set);
106
+
107
+ #define META_GET_ENTRY (ot ) \
108
+ extern sai_status_t meta_sai_get_ ## ot( \
109
+ _In_ const sai_ ## ot ## _t* ot, \
110
+ _In_ uint32_t attr_count, \
111
+ _Inout_ sai_attribute_t *attr_list, \
112
+ _In_ sai_get_ ## ot ## _attribute_fn get);
113
+
114
+ #define META_QUAD_ENTRY (ot ) \
115
+ META_CREATE_ENTRY (ot); \
116
+ META_REMOVE_ENTRY (ot); \
117
+ META_SET_ENTRY (ot); \
118
+ META_GET_ENTRY (ot)
119
+
120
+ META_QUAD_ENTRY(fdb_entry);
121
+ META_QUAD_ENTRY (inseg_entry);
122
+ META_QUAD_ENTRY (ipmc_entry);
123
+ META_QUAD_ENTRY (l2mc_entry);
124
+ META_QUAD_ENTRY (mcast_fdb_entry);
125
+ META_QUAD_ENTRY (neighbor_entry);
126
+ META_QUAD_ENTRY (route_entry);
155
127
156
128
// NOTIFICATIONS
157
129
0 commit comments