|
3 | 3 |
|
4 | 4 | // object id
|
5 | 5 |
|
6 |
| -#define REDIS_CREATE(OBJECT_TYPE,object_type) \ |
7 |
| - sai_status_t redis_create_ ## object_type( \ |
8 |
| - _Out_ sai_object_id_t *object_type ##_id, \ |
9 |
| - _In_ sai_object_id_t switch_id, \ |
10 |
| - _In_ uint32_t attr_count, \ |
11 |
| - _In_ const sai_attribute_t *attr_list) \ |
12 |
| - { \ |
13 |
| - MUTEX(); \ |
14 |
| - SWSS_LOG_ENTER(); \ |
15 |
| - return meta_sai_create_oid( \ |
16 |
| - SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
17 |
| - object_type ## _id, \ |
18 |
| - switch_id, \ |
19 |
| - attr_count, \ |
20 |
| - attr_list, \ |
21 |
| - &redis_generic_create); \ |
| 6 | +#define REDIS_CREATE(OBJECT_TYPE,object_type) \ |
| 7 | + sai_status_t redis_create_ ## object_type( \ |
| 8 | + _Out_ sai_object_id_t *object_type ##_id, \ |
| 9 | + _In_ sai_object_id_t switch_id, \ |
| 10 | + _In_ uint32_t attr_count, \ |
| 11 | + _In_ const sai_attribute_t *attr_list) \ |
| 12 | + { \ |
| 13 | + MUTEX(); \ |
| 14 | + SWSS_LOG_ENTER(); \ |
| 15 | + return meta_sai_create_oid( \ |
| 16 | + (sai_object_type_t)SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
| 17 | + object_type ## _id, \ |
| 18 | + switch_id, \ |
| 19 | + attr_count, \ |
| 20 | + attr_list, \ |
| 21 | + &redis_generic_create); \ |
22 | 22 | }
|
23 | 23 |
|
24 |
| -#define REDIS_REMOVE(OBJECT_TYPE,object_type) \ |
25 |
| - sai_status_t redis_remove_ ## object_type( \ |
26 |
| - _In_ sai_object_id_t object_type ## _id) \ |
27 |
| - { \ |
28 |
| - MUTEX(); \ |
29 |
| - SWSS_LOG_ENTER(); \ |
30 |
| - return meta_sai_remove_oid( \ |
31 |
| - SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
32 |
| - object_type ## _id, \ |
33 |
| - &redis_generic_remove); \ |
| 24 | +#define REDIS_REMOVE(OBJECT_TYPE,object_type) \ |
| 25 | + sai_status_t redis_remove_ ## object_type( \ |
| 26 | + _In_ sai_object_id_t object_type ## _id) \ |
| 27 | + { \ |
| 28 | + MUTEX(); \ |
| 29 | + SWSS_LOG_ENTER(); \ |
| 30 | + return meta_sai_remove_oid( \ |
| 31 | + (sai_object_type_t)SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
| 32 | + object_type ## _id, \ |
| 33 | + &redis_generic_remove); \ |
34 | 34 | }
|
35 | 35 |
|
36 |
| -#define REDIS_SET(OBJECT_TYPE,object_type) \ |
37 |
| - sai_status_t redis_set_ ##object_type ## _attribute(\ |
38 |
| - _In_ sai_object_id_t object_type ## _id, \ |
39 |
| - _In_ const sai_attribute_t *attr) \ |
40 |
| - { \ |
41 |
| - MUTEX(); \ |
42 |
| - SWSS_LOG_ENTER(); \ |
43 |
| - return meta_sai_set_oid( \ |
44 |
| - SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
45 |
| - object_type ## _id, \ |
46 |
| - attr, \ |
47 |
| - &redis_generic_set); \ |
| 36 | +#define REDIS_SET(OBJECT_TYPE,object_type) \ |
| 37 | + sai_status_t redis_set_ ##object_type ## _attribute( \ |
| 38 | + _In_ sai_object_id_t object_type ## _id, \ |
| 39 | + _In_ const sai_attribute_t *attr) \ |
| 40 | + { \ |
| 41 | + MUTEX(); \ |
| 42 | + SWSS_LOG_ENTER(); \ |
| 43 | + return meta_sai_set_oid( \ |
| 44 | + (sai_object_type_t)SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
| 45 | + object_type ## _id, \ |
| 46 | + attr, \ |
| 47 | + &redis_generic_set); \ |
48 | 48 | }
|
49 | 49 |
|
50 |
| -#define REDIS_GET(OBJECT_TYPE,object_type) \ |
51 |
| - sai_status_t redis_get_ ##object_type ## _attribute(\ |
52 |
| - _In_ sai_object_id_t object_type ## _id, \ |
53 |
| - _In_ uint32_t attr_count, \ |
54 |
| - _Inout_ sai_attribute_t *attr_list) \ |
55 |
| - { \ |
56 |
| - MUTEX(); \ |
57 |
| - SWSS_LOG_ENTER(); \ |
58 |
| - return meta_sai_get_oid( \ |
59 |
| - SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
60 |
| - object_type ## _id, \ |
61 |
| - attr_count, \ |
62 |
| - attr_list, \ |
63 |
| - &redis_generic_get); \ |
| 50 | +#define REDIS_GET(OBJECT_TYPE,object_type) \ |
| 51 | + sai_status_t redis_get_ ##object_type ## _attribute( \ |
| 52 | + _In_ sai_object_id_t object_type ## _id, \ |
| 53 | + _In_ uint32_t attr_count, \ |
| 54 | + _Inout_ sai_attribute_t *attr_list) \ |
| 55 | + { \ |
| 56 | + MUTEX(); \ |
| 57 | + SWSS_LOG_ENTER(); \ |
| 58 | + return meta_sai_get_oid( \ |
| 59 | + (sai_object_type_t)SAI_OBJECT_TYPE_ ## OBJECT_TYPE, \ |
| 60 | + object_type ## _id, \ |
| 61 | + attr_count, \ |
| 62 | + attr_list, \ |
| 63 | + &redis_generic_get); \ |
64 | 64 | }
|
65 | 65 |
|
66 | 66 | #define REDIS_GENERIC_QUAD(OT,ot) \
|
|
145 | 145 | sai_status_t redis_get_ ## object_type ## _stats( \
|
146 | 146 | _In_ sai_object_id_t object_type ## _id, \
|
147 | 147 | _In_ uint32_t number_of_counters, \
|
148 |
| - _In_ const sai_ ## object_type ## _stat_t *counter_ids, \ |
| 148 | + _In_ const sai_stat_id_t *counter_ids, \ |
149 | 149 | _Out_ uint64_t *counters) \
|
150 | 150 | { \
|
151 | 151 | MUTEX(); \
|
|
164 | 164 | sai_status_t redis_get_ ## object_type ## _stats_ext( \
|
165 | 165 | _In_ sai_object_id_t object_type ## _id, \
|
166 | 166 | _In_ uint32_t number_of_counters, \
|
167 |
| - _In_ const sai_ ## object_type ## _stat_t *counter_ids, \ |
| 167 | + _In_ const sai_stat_id_t *counter_ids, \ |
168 | 168 | _In_ sai_stats_mode_t mode, \
|
169 | 169 | _Out_ uint64_t *counters) \
|
170 | 170 | { \
|
|
184 | 184 | sai_status_t redis_clear_ ## object_type ## _stats( \
|
185 | 185 | _In_ sai_object_id_t object_type ## _id, \
|
186 | 186 | _In_ uint32_t number_of_counters, \
|
187 |
| - _In_ const sai_ ## object_type ## _stat_t *counter_ids) \ |
| 187 | + _In_ const sai_stat_id_t *counter_ids) \ |
188 | 188 | { \
|
189 | 189 | MUTEX(); \
|
190 | 190 | SWSS_LOG_ENTER(); \
|
|
0 commit comments