@@ -70,13 +70,21 @@ extern std::shared_ptr<swss::RedisClient> g_redisClient;
70
70
extern std::mutex g_apimutex;
71
71
72
72
extern const sai_acl_api_t redis_acl_api;
73
- extern const sai_buffer_api_t redis_buffer_api ;
73
+ extern const sai_bfd_api_t redis_bfd_api ;
74
74
extern const sai_bridge_api_t redis_bridge_api;
75
+ extern const sai_buffer_api_t redis_buffer_api;
76
+ extern const sai_dtel_api_t redis_dtel_api;
75
77
extern const sai_fdb_api_t redis_fdb_api;
76
78
extern const sai_hash_api_t redis_hash_api;
77
79
extern const sai_hostif_api_t redis_hostif_api;
80
+ extern const sai_ipmc_api_t redis_ipmc_api;
81
+ extern const sai_ipmc_group_api_t redis_ipmc_group_api;
82
+ extern const sai_l2mc_api_t redis_l2mc_api;
83
+ extern const sai_l2mc_group_api_t redis_l2mc_group_api;
78
84
extern const sai_lag_api_t redis_lag_api;
85
+ extern const sai_mcast_fdb_api_t redis_mcast_fdb_api;
79
86
extern const sai_mirror_api_t redis_mirror_api;
87
+ extern const sai_mpls_api_t redis_mpls_api;
80
88
extern const sai_neighbor_api_t redis_neighbor_api;
81
89
extern const sai_next_hop_api_t redis_next_hop_api;
82
90
extern const sai_next_hop_group_api_t redis_next_hop_group_api;
@@ -86,17 +94,20 @@ extern const sai_qos_map_api_t redis_qos_map_api;
86
94
extern const sai_queue_api_t redis_queue_api;
87
95
extern const sai_route_api_t redis_route_api;
88
96
extern const sai_router_interface_api_t redis_router_interface_api;
97
+ extern const sai_rpf_group_api_t redis_rpf_group_api;
89
98
extern const sai_samplepacket_api_t redis_samplepacket_api;
90
99
extern const sai_scheduler_api_t redis_scheduler_api;
91
100
extern const sai_scheduler_group_api_t redis_scheduler_group_api;
101
+ extern const sai_segmentroute_api_t redis_segmentroute_api;
92
102
extern const sai_stp_api_t redis_stp_api;
93
103
extern const sai_switch_api_t redis_switch_api;
104
+ extern const sai_tam_api_t redis_tam_api;
94
105
extern const sai_tunnel_api_t redis_tunnel_api;
106
+ extern const sai_uburst_api_t redis_uburst_api;
95
107
extern const sai_udf_api_t redis_udf_api;
96
108
extern const sai_virtual_router_api_t redis_virtual_router_api;
97
109
extern const sai_vlan_api_t redis_vlan_api;
98
110
extern const sai_wred_api_t redis_wred_api;
99
- extern const sai_dtel_api_t redis_dtel_api;
100
111
101
112
#define UNREFERENCED_PARAMETER (X )
102
113
@@ -118,29 +129,68 @@ void translate_rid_to_vid(
118
129
_In_ uint32_t attr_count,
119
130
_In_ sai_attribute_t *attr_list);
120
131
121
- // CREATE
132
+ // OID QUAD
122
133
123
134
sai_status_t redis_generic_create (
124
135
_In_ sai_object_type_t object_type,
125
- _Out_ sai_object_id_t * object_id,
136
+ _Out_ sai_object_id_t * object_id,
126
137
_In_ sai_object_id_t switch_id,
127
138
_In_ uint32_t attr_count,
128
139
_In_ const sai_attribute_t *attr_list);
129
140
130
- sai_status_t redis_generic_create_fdb_entry (
131
- _In_ const sai_fdb_entry_t *fdb_entry,
132
- _In_ uint32_t attr_count,
133
- _In_ const sai_attribute_t *attr_list);
141
+ sai_status_t redis_generic_remove (
142
+ _In_ sai_object_type_t object_type,
143
+ _In_ sai_object_id_t object_id);
134
144
135
- sai_status_t redis_generic_create_neighbor_entry (
136
- _In_ const sai_neighbor_entry_t * neighbor_entry ,
137
- _In_ uint32_t attr_count ,
138
- _In_ const sai_attribute_t *attr_list );
145
+ sai_status_t redis_generic_set (
146
+ _In_ sai_object_type_t object_type ,
147
+ _In_ sai_object_id_t object_id ,
148
+ _In_ const sai_attribute_t *attr );
139
149
140
- sai_status_t redis_generic_create_route_entry (
141
- _In_ const sai_route_entry_t * route_entry,
150
+ sai_status_t redis_generic_get (
151
+ _In_ sai_object_type_t object_type,
152
+ _In_ sai_object_id_t object_id,
142
153
_In_ uint32_t attr_count,
143
- _In_ const sai_attribute_t *attr_list);
154
+ _Out_ sai_attribute_t *attr_list);
155
+
156
+ // ENTRY QUAD
157
+
158
+ #define REDIS_CREATE_ENTRY_DEF (ot ) \
159
+ sai_status_t redis_generic_create_ ## ot( \
160
+ _In_ const sai_ ## ot ## _t * ot, \
161
+ _In_ uint32_t attr_count, \
162
+ _In_ const sai_attribute_t *attr_list);
163
+
164
+ #define REDIS_REMOVE_ENTRY_DEF (ot ) \
165
+ sai_status_t redis_generic_remove_ ## ot( \
166
+ _In_ const sai_ ## ot ## _t * ot);
167
+
168
+ #define REDIS_SET_ENTRY_DEF (ot ) \
169
+ sai_status_t redis_generic_set_ ## ot( \
170
+ _In_ const sai_ ## ot ## _t * ot, \
171
+ _In_ const sai_attribute_t *attr);
172
+
173
+ #define REDIS_GET_ENTRY_DEF (ot ) \
174
+ sai_status_t redis_generic_get_ ## ot( \
175
+ _In_ const sai_ ## ot ## _t * ot, \
176
+ _In_ uint32_t attr_count, \
177
+ _Out_ sai_attribute_t *attr_list);
178
+
179
+ #define REDIS_ENTRY_QUAD (ot ) \
180
+ REDIS_CREATE_ENTRY_DEF (ot) \
181
+ REDIS_REMOVE_ENTRY_DEF(ot) \
182
+ REDIS_SET_ENTRY_DEF(ot) \
183
+ REDIS_GET_ENTRY_DEF(ot)
184
+
185
+ REDIS_ENTRY_QUAD(fdb_entry);
186
+ REDIS_ENTRY_QUAD (inseg_entry);
187
+ REDIS_ENTRY_QUAD (ipmc_entry);
188
+ REDIS_ENTRY_QUAD (l2mc_entry);
189
+ REDIS_ENTRY_QUAD (mcast_fdb_entry);
190
+ REDIS_ENTRY_QUAD (neighbor_entry);
191
+ REDIS_ENTRY_QUAD (route_entry);
192
+
193
+ // BULK
144
194
145
195
sai_status_t redis_bulk_generic_create (
146
196
_In_ sai_object_type_t object_type,
@@ -149,29 +199,14 @@ sai_status_t redis_bulk_generic_create(
149
199
_In_ sai_object_id_t switch_id,
150
200
_In_ const uint32_t *attr_count, /* array */
151
201
_In_ const sai_attribute_t *const *attr_list, /* array */
152
- _Inout_ sai_status_t *object_statuses) /* array */ ;
202
+ _Inout_ sai_status_t *object_statuses); /* array */
153
203
154
204
sai_status_t internal_redis_bulk_generic_create (
155
205
_In_ sai_object_type_t object_type,
156
206
_In_ const std::vector<std::string> &serialized_object_ids,
157
207
_In_ const uint32_t *attr_count,
158
- _In_ const sai_attribute_t *const *attr_list,
159
- _Inout_ sai_status_t *object_statuses);
160
-
161
- // REMOVE
162
-
163
- sai_status_t redis_generic_remove (
164
- _In_ sai_object_type_t object_type,
165
- _In_ sai_object_id_t object_id);
166
-
167
- sai_status_t redis_generic_remove_fdb_entry (
168
- _In_ const sai_fdb_entry_t * fdb_entry);
169
-
170
- sai_status_t redis_generic_remove_neighbor_entry (
171
- _In_ const sai_neighbor_entry_t * neighbor_entry);
172
-
173
- sai_status_t redis_generic_remove_route_entry (
174
- _In_ const sai_route_entry_t * route_entry);
208
+ _In_ const sai_attribute_t *const *attr_list, /* array */
209
+ _Inout_ sai_status_t *object_statuses) /* array */ ;
175
210
176
211
sai_status_t redis_bulk_generic_remove (
177
212
_In_ sai_object_type_t object_type,
@@ -182,55 +217,13 @@ sai_status_t redis_bulk_generic_remove(
182
217
sai_status_t internal_redis_bulk_generic_remove (
183
218
_In_ sai_object_type_t object_type,
184
219
_In_ const std::vector<std::string> &serialized_object_ids,
185
- _Out_ sai_status_t *object_statuses) /* array */ ;
186
-
187
- // SET
188
-
189
- sai_status_t redis_generic_set (
190
- _In_ sai_object_type_t object_type,
191
- _In_ sai_object_id_t object_id,
192
- _In_ const sai_attribute_t *attr);
193
-
194
- sai_status_t redis_generic_set_fdb_entry (
195
- _In_ const sai_fdb_entry_t *fdb_entry,
196
- _In_ const sai_attribute_t *attr);
197
-
198
- sai_status_t redis_generic_set_neighbor_entry (
199
- _In_ const sai_neighbor_entry_t * neighbor_entry,
200
- _In_ const sai_attribute_t *attr);
201
-
202
- sai_status_t redis_generic_set_route_entry (
203
- _In_ const sai_route_entry_t * route_entry,
204
- _In_ const sai_attribute_t *attr);
220
+ _Out_ sai_status_t *object_statuses); /* array */
205
221
206
222
sai_status_t internal_redis_bulk_generic_set (
207
223
_In_ sai_object_type_t object_type,
208
224
_In_ const std::vector<std::string> &serialized_object_ids,
209
- _In_ const sai_attribute_t *attr_list,
210
- _In_ const sai_status_t *object_statuses);
211
-
212
- // GET
213
-
214
- sai_status_t redis_generic_get (
215
- _In_ sai_object_type_t object_type,
216
- _In_ sai_object_id_t object_id,
217
- _In_ uint32_t attr_count,
218
- _Out_ sai_attribute_t *attr_list);
219
-
220
- sai_status_t redis_generic_get_fdb_entry (
221
- _In_ const sai_fdb_entry_t *fdb_entry,
222
- _In_ uint32_t attr_count,
223
- _Out_ sai_attribute_t *attr_list);
224
-
225
- sai_status_t redis_generic_get_neighbor_entry (
226
- _In_ const sai_neighbor_entry_t * neighbor_entry,
227
- _In_ uint32_t attr_count,
228
- _Out_ sai_attribute_t *attr_list);
229
-
230
- sai_status_t redis_generic_get_route_entry (
231
- _In_ const sai_route_entry_t * route_entry,
232
- _In_ uint32_t attr_count,
233
- _Out_ sai_attribute_t *attr_list);
225
+ _In_ const sai_attribute_t *attr_list, /* array */
226
+ _In_ const sai_status_t *object_statuses); /* array */
234
227
235
228
// get_stats
236
229
@@ -249,4 +242,30 @@ void handle_notification(
249
242
_In_ const std::string &data,
250
243
_In_ const std::vector<swss::FieldValueTuple> &values);
251
244
245
+ // STATS
246
+
247
+ sai_status_t redis_generic_get_stats (
248
+ _In_ sai_object_type_t object_type,
249
+ _In_ sai_object_id_t object_id,
250
+ _In_ const sai_enum_metadata_t *enum_metadata,
251
+ _In_ uint32_t number_of_counters,
252
+ _In_ const int32_t *counter_ids,
253
+ _Out_ uint64_t *counters);
254
+
255
+ sai_status_t redis_generic_get_stats_ext (
256
+ _In_ sai_object_type_t object_type,
257
+ _In_ sai_object_id_t object_id,
258
+ _In_ const sai_enum_metadata_t *enum_metadata,
259
+ _In_ uint32_t number_of_counters,
260
+ _In_ const int32_t *counter_ids,
261
+ _In_ sai_stats_mode_t mode,
262
+ _Out_ uint64_t *counters);
263
+
264
+ sai_status_t redis_generic_clear_stats (
265
+ _In_ sai_object_type_t object_type,
266
+ _In_ sai_object_id_t object_id,
267
+ _In_ const sai_enum_metadata_t *enum_metadata,
268
+ _In_ uint32_t number_of_counters,
269
+ _In_ const int32_t *counter_ids);
270
+
252
271
#endif // __SAI_REDIS__
0 commit comments