-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathofdpa.proto
437 lines (362 loc) · 10.3 KB
/
ofdpa.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
syntax = "proto3";
package ofdpa;
message OfdpaStatus {
enum OfdpaStatusCode {
OFDPA_E_NONE = 0;
/** Error in RPC. */
OFDPA_E_RPC = -20;
/** Internal error. */
OFDPA_E_INTERNAL = -21;
/** Invalid parameter. */
OFDPA_E_PARAM = -22;
/** Parameter constraint violated. */
OFDPA_E_ERROR = -23;
/** Maximum count is already reached or table full. */
OFDPA_E_FULL = -24;
/** Already exists. */
OFDPA_E_EXISTS = -25;
/** Operation Timeout. */
OFDPA_E_TIMEOUT = -26;
/** Operation Fail. */
OFDPA_E_FAIL = -27;
/** Disabled. */
OFDPA_E_DISABLED = -28;
/** Parameter/feature is not supported. */
OFDPA_E_UNAVAIL = -29;
/** Parameter not found. */
OFDPA_E_NOT_FOUND = -30;
/** Nothing to report or table is empty. */
OFDPA_E_EMPTY = -31;
/** Request denied. */
OFDPA_E_REQUEST_DENIED = -32;
/** Not implemented. */
OFDPA_NOT_IMPLEMENTED_YET = -33;
}
OfdpaStatusCode status = 1;
}
service OfdpaRpc {
rpc ofdpaTunnelReset(Empty) returns (OfdpaStatus) {}
rpc ofdpaTunnelTenantCreate(TunnelTenantCreate) returns (OfdpaStatus) {}
rpc ofdpaTunnelTenantDelete(TunnelId) returns (OfdpaStatus) {}
rpc ofdpaTunnelPortCreate(TunnelPortCreate) returns (OfdpaStatus) {}
rpc ofdpaTunnelPortDelete(PortNum) returns (OfdpaStatus) {}
rpc ofdpaTunnelNextHopCreate(TunnelNextHopCreate) returns (OfdpaStatus) {}
rpc ofdpaTunnelNextHopDelete(NextHopId) returns (OfdpaStatus) {}
rpc ofdpaTunnelNextHopModify(TunnelNextHopCreate) returns (OfdpaStatus) {}
rpc ofdpaTunnelPortTenantAdd(TunnelPortTenantAdd) returns (OfdpaStatus) {}
rpc ofdpaTunnelPortTenantDelete(TunnelPortTenantAdd) returns (OfdpaStatus) {}
rpc ofdpaSourceMacLearningSet(SrcMacLearning) returns (OfdpaStatus) {}
rpc ofdpaSourceMacLearningGet(Empty) returns (SrcMacLearning) {}
rpc ofdpaPortSourceMacLearningSet(PortSrcMacLearning) returns (OfdpaStatus) {}
rpc ofdpaPortSourceMacLearningGet(PortNum) returns (PortSrcMacLearning) {}
rpc ofdpaPortSourceMacMoveLearningSet(PortSrcMacLearning) returns (OfdpaStatus) {}
rpc ofdpaPortSourceMacMoveLearningGet(PortNum) returns (PortSrcMacLearning) {}
rpc ofdpaMirrorSourcePortAdd(MirrorSourcePortAdd) returns (OfdpaStatus) {}
rpc ofdpaMirrorSourcePortDelete(MirrorSourcePortDelete) returns (OfdpaStatus) {}
rpc ofdpaMirrorPortCreate(PortNum) returns (OfdpaStatus) {}
rpc ofdpaMirrorPortDelete(PortNum) returns (OfdpaStatus) {}
rpc ofdpaFlowAdd(FlowEntry) returns (OfdpaStatus) {}
rpc ofdpaFlowDelete(FlowEntry) returns (OfdpaStatus) {}
rpc ofdpaGroupAdd(GroupEntry) returns (OfdpaStatus) {}
rpc ofdpaGroupDelete(GroupEntry) returns (OfdpaStatus) {}
rpc ofdpaGroupBucketEntryAdd(GroupBucketEntry) returns (OfdpaStatus) {}
rpc ofdpaGroupBucketEntryDelete(GroupBucketEntry) returns (OfdpaStatus) {}
rpc ofdpaStgReset(Empty) returns (OfdpaStatus) {}
rpc ofdpaStgCreate(StgId) returns (OfdpaStatus) {}
rpc ofdpaStgDestroy(StgId) returns (OfdpaStatus) {}
rpc ofdpaStgVlanAdd(StgVlan) returns (OfdpaStatus) {}
rpc ofdpaStgVlanRemove(StgVlan) returns (OfdpaStatus) {}
rpc ofdpaStgStatePortSet(StpInterfaceState) returns (OfdpaStatus) {}
rpc ofdpaTrunkCreate(TrunkCreate) returns (OfdpaStatus) {}
rpc ofdpaTrunkDelete(PortNum) returns (OfdpaStatus) {}
rpc ofdpaTrunkPortPSCSet(PSC) returns (OfdpaStatus) {}
rpc ofdpaPortTrunkGroupSet(TrunkGroupSet) returns (OfdpaStatus) {}
rpc ofdpaTrunkPortMemberActiveSet(PortMemberActiveSet) returns (OfdpaStatus) {}
}
message Empty {}
message SrcMacLearning {
bool enable = 1;
}
message PortSrcMacLearning {
enum SrcMacLearnMode {
SRC_MAC_LEARN_NONE = 0;
SRC_MAC_LEARN_ARL = 1;
SRC_MAC_LEARN_CPU = 2;
SRC_MAC_LEARN_FWD = 4;
SRC_MAC_LEARN_PENDING = 8;
}
uint32 port_num = 1;
uint32 l2_learn = 2;
}
message TunnelId {
uint32 tunnel_id = 1;
}
message PortNum {
uint32 port_num = 1;
}
message NextHopId {
uint32 next_hop_id = 1;
}
message TunnelTenantCreate {
uint32 tunnel_id = 1;
OfdpaTunnelTenantConfig config = 2;
}
enum OfdpaTunnelProto {
OFDPA_TUNNEL_PROTO_UNKNOWN = 0;
OFDPA_TUNNEL_PROTO_VXLAN = 1;
}
enum OfdpaTunnelPortType {
OFDPA_TUNNEL_PORT_TYPE_UNKNOWN = 0;
OFDPA_TUNNEL_PORT_TYPE_ENDPOINT = 1;
OFDPA_TUNNEL_PORT_TYPE_ACCESS = 2;
}
message OfdpaTunnelTenantConfig {
OfdpaTunnelProto proto = 1;
uint32 virtual_network_id = 2;
uint32 mcast_ipv4 = 3;
uint32 mcast_next_hop_id = 4;
}
message TunnelPortCreate {
uint32 port_num = 1;
string name = 2;
OfdpaTunnelPortConfig config = 3;
}
message OfdpaTunnelPortConfig {
OfdpaTunnelPortType type = 1;
OfdpaTunnelProto tunnel_proto = 2;
OfdpaTunnelPortConfigData config = 3;
}
message OfdpaTunnelPortConfigData {
oneof config {
OfdpaAccessPortConfig access_port_config = 1;
OfdpaEndpointConfig endpoint_config = 2;
}
}
message OfdpaAccessPortConfig {
uint32 pysical_port_num = 1;
uint32 vlan_id = 2; // actulally uint16
uint32 etag = 3; // actually uint16
bool untagged = 4; // actually uint16
bool use_etag = 5; // actually uint16
}
message OfdpaEndpointConfig {
uint32 remote_endpoint = 1;
uint32 local_endpoint = 2;
uint32 ttl = 3;
uint32 ecmp = 4;
uint32 next_hop_id = 5;
OfdpaProtoInfo info = 6;
}
message OfdpaProtoInfo {
oneof info {
OfdpaVxlanProtoInfo vxlan_info = 1;
}
}
message OfdpaVxlanProtoInfo {
uint32 terminator_udp_dst_port = 1; // actually uint16
uint32 initiator_udp_dst_port = 2; // actually uint16
uint32 udp_src_port_if_no_entropy = 3; // actually uint16
bool use_entropy = 4; // actually uint16
}
message TunnelNextHopCreate {
uint32 next_hop_id = 1;
OfdpaTunnelNextHopConfig config = 2;
}
message OfdpaTunnelNextHopConfig {
OfdpaTunnelProto protocol = 1;
uint64 src_mac_addr = 2;
uint64 dst_mac_addr = 3;
uint32 physical_port_num = 4;
uint32 vlan_id = 5;
}
message TunnelPortTenantAdd {
uint32 port_num = 1;
uint32 tunnel_id = 2;
}
message MirrorSourcePortAdd {
OfdpaMirrorSourcePortConfig config = 1;
PortNum mirror_dst_port_num = 2;
PortNum mirror_src_port_num = 3;
}
message OfdpaMirrorSourcePortConfig {
enum OfdpaMirrorPortType {
OFDPA_MIRROR_PORT_TYPE_INGRESS = 0;
OFDPA_MIRROR_PORT_TYPE_EGRESS = 1;
OFDPA_MIRROR_PORT_TYPE_INGRESS_EGRESS = 2;
}
OfdpaMirrorPortType ofdpa_mirror_port_type = 1;
}
message MirrorSourcePortDelete {
PortNum mirror_dst_port_num = 1;
PortNum mirror_src_port_num = 2;
}
message ofdpaIngressPortFlowMatch {
uint32 tunnel_id = 1;
}
message FlowEntryIngressPort {
ofdpaIngressPortFlowMatch match_criteria = 1;
uint32 goto_table_id = 2;
}
message ofdpaVlanFlowMatch {
uint32 in_port = 1;
uint32 vlan_id = 2;
uint32 vlan_id_mask = 3;
}
message FlowEntryVlan {
ofdpaVlanFlowMatch match_criteria = 1;
uint32 goto_table_id = 2;
uint32 set_vlan_id_action = 3;
uint32 new_vlan_id = 4;
uint32 pop_vlan_action = 5;
}
message ofdpaBridgingFlowMatch{
uint32 vlan_id = 1;
uint32 vlan_id_mask = 2;
uint32 tunnel_id = 3;
uint32 tunnel_id_mask = 4;
uint64 dst_mac = 5;
uint64 dst_mac_mask = 6;
}
message FlowEntryBridging {
ofdpaBridgingFlowMatch match_criteria = 1;
uint32 goto_table_id = 2;
uint32 group_id = 3;
uint32 tunnel_logical_port = 4;
uint32 output_port = 5;
}
message ofdpaTerminationMacFlowMatch{
uint32 in_port = 1;
uint32 in_port_mask = 2;
uint32 eth_type = 3;
uint64 dst_mac = 4;
uint64 dst_mac_mask = 5;
uint32 vlan_id = 6;
uint32 vlan_id_mask = 7;
}
message FlowEntryTerminationMac {
ofdpaTerminationMacFlowMatch match_criteria = 1;
uint32 goto_table_id = 2;
uint32 output_port = 4;
}
message ofdpaUnicastRoutingFlowMatch{
uint32 eth_type = 1;
uint32 dst_ip = 2;
uint32 dst_ip_mask = 3;
}
message FlowEntryUnicastRouting {
ofdpaUnicastRoutingFlowMatch match_criteria = 1;
uint32 goto_table_id = 2;
uint32 group_id = 3;
uint32 output_port = 4;
}
message FlowData {
oneof flowentry {
FlowEntryIngressPort flow_entry_ingress_port = 1;
FlowEntryVlan flow_entry_vlan = 2;
FlowEntryBridging flow_entry_bridging = 3;
FlowEntryTerminationMac flow_entry_termination_mac = 4;
FlowEntryUnicastRouting flow_entry_unicast_routing = 5;
}
}
message FlowEntry {
uint32 table_id = 1;
uint32 priority = 2;
FlowData flow_data = 3;
uint32 hard_time = 4;
uint32 idle_time = 5;
uint64 cookie = 6;
}
message FlowModAdd {
FlowEntry flow_entry = 1;
}
message FlowModDelete {
FlowEntry flow_entry = 1;
}
message GroupEntry {
uint32 group_id = 1;
}
message GroupModAdd {
GroupEntry group_entry = 1;
}
message GroupModDelete {
GroupEntry group_entry = 1;
}
message L2InterfaceGroupBucketData {
uint32 output_port = 1;
uint32 pop_vlan_tag = 2;
uint32 allow_vlan_translation = 3;
}
message L3UnicastGroupBucketData {
uint64 src_mac = 1;
uint64 dst_mac = 2;
uint32 vlan_id = 3;
}
message L2OverlayGroupBucketData {
uint32 output_port = 1;
}
message GroupBucketData {
oneof data {
L2InterfaceGroupBucketData l2_interface = 1;
L3UnicastGroupBucketData l3_unicast = 2;
L2OverlayGroupBucketData l2_overlay = 3;
}
}
message GroupBucketEntry {
uint32 group_id = 1;
uint32 bucket_index = 2;
uint32 reference_group_id = 3;
GroupBucketData bucket_data = 4;
uint32 type = 5;
}
message GroupBucketEntryAdd {
GroupBucketEntry group_bucket_entry = 1;
}
message GroupBucketEntryDelete {
uint32 group_id = 1;
uint32 group_bucket_index = 2;
}
enum LagType {
LagType_ROUNDROBIN = 0;
LagType_ACTIVEBACKUP = 1;
LagType_XOR = 2;
LagType_BROADCAST = 3;
LagType_8023AD = 4;
LagType_TLB = 5;
LagType_ALB = 6;
};
message TrunkCreate {
uint32 lag_id = 1;
uint32 port_num = 2;
string name = 3;
LagType lag_type = 4;
}
message PSC {
uint32 lag_id = 1;
LagType lag_type = 2;
}
message TrunkGroupSet {
uint32 lag_id = 1;
uint32 member = 2;
}
message PortMemberActiveSet {
uint32 lag_id = 1;
uint32 member = 2;
bool active = 3;
}
// Operational state data for per vlan STP on each interface
message StpInterfaceState {
string name = 1;
uint32 port_num = 2;
string port_state = 3;
StgId stg_id = 4;
}
message StgVlan {
StgId stg_id = 1;
VlanId vlan_id = 2;
}
message VlanId {
uint32 id = 1;
}
message StgId {
uint32 id = 1;
}