OpenFlow Data Plane Abstraction (OF-DPA) API Guide and Reference Manual
Welcome
OF-DPA Documentation
API Reference
Files
File List
Globals
api
include
ofdpa_datatypes.h
Go to the documentation of this file.
1
9
/*********************************************************************
10
*
11
* (C) Copyright Broadcom Corporation 2003-2014
12
*
13
* Licensed under the Apache License, Version 2.0 (the "License");
14
* you may not use this file except in compliance with the License.
15
* You may obtain a copy of the License at
16
*
17
* http://www.apache.org/licenses/LICENSE-2.0
18
*
19
* Unless required by applicable law or agreed to in writing, software
20
* distributed under the License is distributed on an "AS IS" BASIS,
21
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
* See the License for the specific language governing permissions and
23
* limitations under the License.
24
*
25
**********************************************************************
26
*
27
* @filename ofdpa_datatypes.h
28
*
29
* @purpose OF-DPA datatypes header
30
*
31
* @component OF-DPA
32
*
33
* @note none
34
*
35
* @create 27 June 2013
36
*
37
* @end
38
*
39
**********************************************************************/
40
#ifndef INCLUDE_OFDPA_DATATYPES_H
41
#define INCLUDE_OFDPA_DATATYPES_H
42
43
#include <stdint.h>
44
#include <sys/time.h>
45
#include <netinet/in.h>
46
48
typedef
enum
49
{
51
OFDPA_E_NONE
= 0,
53
OFDPA_E_RPC
= -20,
55
OFDPA_E_INTERNAL
= -21,
57
OFDPA_E_PARAM
= -22,
59
OFDPA_E_ERROR
= -23,
61
OFDPA_E_FULL
= -24,
63
OFDPA_E_EXISTS
= -25,
65
OFDPA_E_TIMEOUT
= -26,
67
OFDPA_E_FAIL
= -27,
69
OFDPA_E_DISABLED
= -28,
71
OFDPA_E_UNAVAIL
= -29,
73
OFDPA_E_NOT_FOUND
= -30,
75
OFDPA_E_EMPTY
= -31,
76
}
OFDPA_ERROR_t
;
77
79
#define OFDPA_MAC_ADDR_LEN 6
80
82
#define OFDPA_MAC_ADDR_IS_NULL(mac) \
83
((mac[0] == 0) && (mac[1] == 0) && (mac[2] == 0) && \
84
(mac[3] == 0) && (mac[4] == 0) && (mac[5] == 0))
85
87
#define OFDPA_PORT_CONTROLLER 0xfffffffdu
88
90
#define OFDPA_VID_FIELD_MASK 0x0000
91
92
#define OFDPA_VID_EXACT_MASK 0x0fff
93
95
#define OFDPA_VID_NONE 0x0000
96
97
#define OFDPA_VID_PRESENT 0x1000
98
99
typedef
enum
100
{
102
OFDPA_PORT_TYPE_PHYSICAL
= 0,
104
OFDPA_PORT_TYPE_LOGICAL_TUNNEL
= 1
105
}
OFDPA_PORT_TYPE_t
;
106
108
typedef
struct
ofdpaMacAddr_s
109
{
111
uint8_t
addr
[
OFDPA_MAC_ADDR_LEN
];
112
}
ofdpaMacAddr_t
;
113
114
128
typedef
struct
129
{
131
uint32_t
size
;
133
char
*
pstart
;
134
}
ofdpa_buffdesc
;
135
136
/*
137
* Debugging and Logging definitions
138
*/
139
141
typedef
enum
142
{
144
OFDPA_DISABLE
,
145
147
OFDPA_ENABLE
,
148
149
}
OFDPA_CONTROL_t
;
150
152
typedef
enum
153
{
155
OFDPA_COMPONENT_FIRST
= 1,
157
OFDPA_COMPONENT_API
=
OFDPA_COMPONENT_FIRST
,
159
OFDPA_COMPONENT_MAPPING
,
161
OFDPA_COMPONENT_RPC
,
163
OFDPA_COMPONENT_OFDB
,
165
OFDPA_COMPONENT_DATAPATH
,
166
168
OFDPA_COMPONENT_MAX
169
}
ofdpaComponentIds_t
;
170
172
typedef
enum
173
{
175
OFDPA_DEBUG_ALWAYS
= 0,
177
OFDPA_DEBUG_BASIC
,
179
OFDPA_DEBUG_VERBOSE
,
181
OFDPA_DEBUG_VERY_VERBOSE
,
183
OFDPA_DEBUG_TOO_VERBOSE
,
184
186
OFDPA_DEBUG_MAX
187
}
ofdpaDebugLevels_t
;
188
190
#define OFDPA_INPORT_EXACT_MASK 0xffffffffu
191
192
#define OFDPA_INPORT_FIELD_MASK 0x00000000u
193
194
#define OFDPA_INPORT_INDEX_MASK 0x0000ffffu
195
196
#define OFDPA_INPORT_TYPE_MASK 0xffff0000u
197
199
#define OFDPA_IPV4_ADDR_EXACT_MASK 0xffffffffu
200
201
#define OFDPA_IPV4_ADDR_FIELD_MASK 0x00000000u
202
203
/* Flow Tables.
204
*/
205
207
typedef
enum
208
{
209
OFDPA_FLOW_TABLE_ID_INGRESS_PORT
= 0,
210
OFDPA_FLOW_TABLE_ID_VLAN
= 10,
211
OFDPA_FLOW_TABLE_ID_TERMINATION_MAC
= 20,
212
OFDPA_FLOW_TABLE_ID_UNICAST_ROUTING
= 30,
213
OFDPA_FLOW_TABLE_ID_MULTICAST_ROUTING
= 40,
214
OFDPA_FLOW_TABLE_ID_BRIDGING
= 50,
215
OFDPA_FLOW_TABLE_ID_ACL_POLICY
= 60,
217
}
OFDPA_FLOW_TABLE_ID_t
;
218
220
#define OFDPA_FLOW_TABLE_ID_SA_LOOKUP 254
221
223
typedef
struct
ofdpaIngressPortFlowMatch_s
224
{
226
uint32_t
inPort
;
228
uint32_t
inPortMask
;
229
}
ofdpaIngressPortFlowMatch_t
;
230
232
typedef
struct
ofdpaIngressPortFlowEntry_s
233
{
235
ofdpaIngressPortFlowMatch_t
match_criteria
;
236
237
/* flow instructions */
240
OFDPA_FLOW_TABLE_ID_t
gotoTableId
;
241
242
}
ofdpaIngressPortFlowEntry_t
;
243
244
/*------------------------------------------------------------------------------------*/
245
247
typedef
struct
ofdpaVlanFlowMatch_s
248
{
250
uint32_t
inPort
;
251
252
uint16_t vlanId;
253
uint16_t vlanIdMask;
254
255
}
ofdpaVlanFlowMatch_t
;
256
258
typedef
struct
ofdpaVlanFlowEntry_s
259
{
261
ofdpaVlanFlowMatch_t
match_criteria
;
262
263
/* flow instructions */
264
267
OFDPA_FLOW_TABLE_ID_t
gotoTableId
;
268
271
uint16_t
newVlanId
;
272
273
}
ofdpaVlanFlowEntry_t
;
274
275
/*------------------------------------------------------------------------------------*/
277
typedef
struct
ofdpaTerminationMacFlowMatch_s
278
{
280
uint32_t
inPort
;
281
283
uint32_t
inPortMask
;
284
286
uint16_t
etherType
;
287
289
ofdpaMacAddr_t
destMac
;
290
292
ofdpaMacAddr_t
destMacMask
;
293
295
uint16_t
vlanId
;
297
uint16_t
vlanIdMask
;
298
299
}
ofdpaTerminationMacFlowMatch_t
;
300
302
typedef
struct
ofdpaTerminationMacFlowEntry_s
303
{
305
ofdpaTerminationMacFlowMatch_t
match_criteria
;
306
307
/* flow instructions */
308
312
OFDPA_FLOW_TABLE_ID_t
gotoTableId
;
313
315
/* If specified, must be CONTROLLER, set to 0 otherwise */
316
317
uint32_t
outputPort
;
318
319
}
ofdpaTerminationMacFlowEntry_t
;
320
321
/*------------------------------------------------------------------------------------*/
322
324
typedef
struct
ofdpaBridgingFlowMatch_s
325
{
326
uint16_t vlanId;
327
uint16_t tunnelId;
328
330
ofdpaMacAddr_t
destMac
;
332
ofdpaMacAddr_t
destMacMask
;
333
334
}
ofdpaBridgingFlowMatch_t
;
335
337
typedef
struct
ofdpaBridgingFlowEntry_s
338
{
340
ofdpaBridgingFlowMatch_t
match_criteria
;
341
342
/* flow instructions */
347
OFDPA_FLOW_TABLE_ID_t
gotoTableId
;
348
352
uint32_t
groupID
;
354
uint32_t
tunnelLogicalPort
;
355
359
uint32_t
outputPort
;
360
361
}
ofdpaBridgingFlowEntry_t
;
362
363
/*------------------------------------------------------------------------------------*/
364
366
typedef
struct
ofdpaUnicastRoutingFlowMatch_s
367
{
369
uint16_t
etherType
;
370
372
in_addr_t
dstIp4
;
373
375
in_addr_t
dstIp4Mask
;
376
378
struct
in6_addr
dstIp6
;
379
381
struct
in6_addr
dstIp6Mask
;
382
383
}
ofdpaUnicastRoutingFlowMatch_t
;
384
386
typedef
struct
ofdpaUnicastRoutingFlowEntry_s
387
{
389
ofdpaUnicastRoutingFlowMatch_t
match_criteria
;
390
391
/* flow instructions */
395
OFDPA_FLOW_TABLE_ID_t
gotoTableId
;
396
400
uint32_t
groupID
;
401
402
}
ofdpaUnicastRoutingFlowEntry_t
;
403
404
/*------------------------------------------------------------------------------------*/
405
407
typedef
struct
ofdpaMulticastRoutingFlowMatch_s
408
{
410
uint16_t
etherType
;
411
413
uint16_t
vlanId
;
414
416
in_addr_t
srcIp4
;
417
419
in_addr_t
srcIp4Mask
;
420
422
in_addr_t
dstIp4
;
423
425
struct
in6_addr
srcIp6
;
426
428
struct
in6_addr
srcIp6Mask
;
429
431
struct
in6_addr
dstIp6
;
432
433
}
ofdpaMulticastRoutingFlowMatch_t
;
434
436
typedef
struct
ofdpaMulticastRoutingFlowEntry_s
437
{
439
ofdpaMulticastRoutingFlowMatch_t
match_criteria
;
440
441
/* flow instructions */
445
OFDPA_FLOW_TABLE_ID_t
gotoTableId
;
446
449
uint32_t
groupID
;
450
451
}
ofdpaMulticastRoutingFlowEntry_t
;
452
453
/*------------------------------------------------------------------------------------*/
454
456
typedef
struct
ofdpaPolicyAclFlowMatch_s
457
{
459
uint32_t
inPort
;
460
462
uint32_t
inPortMask
;
463
465
ofdpaMacAddr_t
srcMac
;
466
468
ofdpaMacAddr_t
srcMacMask
;
469
471
ofdpaMacAddr_t
destMac
;
472
474
ofdpaMacAddr_t
destMacMask
;
475
478
uint16_t
etherType
;
479
481
uint16_t
vlanId
;
482
484
uint16_t
vlanIdMask
;
485
487
uint16_t
vlanPcp
;
488
490
uint16_t
vlanPcpMask
;
491
493
uint32_t
tunnelId
;
494
496
in_addr_t
sourceIp4
;
497
499
in_addr_t
sourceIp4Mask
;
500
502
in_addr_t
destIp4
;
503
505
in_addr_t
destIp4Mask
;
506
508
struct
in6_addr
sourceIp6
;
509
511
struct
in6_addr
sourceIp6Mask
;
512
514
struct
in6_addr
destIp6
;
515
517
struct
in6_addr
destIp6Mask
;
518
520
uint32_t
ipv4ArpSpa
;
521
523
uint32_t
ipv4ArpSpaMask
;
524
526
uint16_t
ipProto
;
527
529
uint16_t
ipProtoMask
;
530
532
uint16_t
dscp
;
533
535
uint16_t
dscpMask
;
536
538
uint16_t
ecn
;
539
541
uint16_t
ecnMask
;
542
544
uint32_t
srcL4Port
;
545
547
uint32_t
srcL4PortMask
;
548
550
uint32_t
destL4Port
;
551
553
uint32_t
destL4PortMask
;
554
556
uint8_t
icmpType
;
557
559
uint8_t
icmpTypeMask
;
560
562
uint8_t
icmpCode
;
563
565
uint8_t
icmpCodeMask
;
566
568
uint32_t
ipv6FlowLabel
;
569
571
uint32_t
ipv6FlowLabelMask
;
572
573
}
ofdpaPolicyAclFlowMatch_t
;
574
575
/* NOTE: ACL Flow Table entries are indexed by the priority value.
576
* This indexing establishes the rule precedence in the TCAM.
577
*/
578
580
typedef
struct
ofdpaPolicyAclFlowEntry_s
581
{
583
ofdpaPolicyAclFlowMatch_t
match_criteria
;
584
585
/* flow instructions */
586
590
uint32_t
groupID
;
591
593
uint8_t
queueIDAction
;
594
596
uint8_t
queueID
;
597
599
uint8_t
vlanPcpAction
;
600
602
uint8_t
vlanPcp
;
603
605
uint8_t
dscpAction
;
606
608
uint8_t
dscp
;
609
611
uint32_t
outputTunnelPort
;
612
616
uint32_t
outputPort
;
617
620
uint32_t
clearActions
;
621
622
}
ofdpaPolicyAclFlowEntry_t
;
623
624
627
typedef
struct
ofdpaFlowEntry_s
628
{
630
OFDPA_FLOW_TABLE_ID_t
tableId
;
631
633
uint32_t
priority
;
634
635
union
636
{
638
ofdpaIngressPortFlowEntry_t
ingressPortFlowEntry
;
639
641
ofdpaVlanFlowEntry_t
vlanFlowEntry
;
642
644
ofdpaTerminationMacFlowEntry_t
terminationMacFlowEntry
;
645
647
ofdpaBridgingFlowEntry_t
bridgingFlowEntry
;
648
650
ofdpaUnicastRoutingFlowEntry_t
unicastRoutingFlowEntry
;
651
653
ofdpaMulticastRoutingFlowEntry_t
multicastRoutingFlowEntry
;
654
656
ofdpaPolicyAclFlowEntry_t
policyAclFlowEntry
;
657
} flowData;
658
660
uint32_t
hard_time
;
661
663
uint32_t
idle_time
;
664
666
uint64_t
cookie
;
667
668
}
ofdpaFlowEntry_t
;
669
671
typedef
struct
ofdpaFlowEntryStats_s
672
{
674
uint32_t
durationSec
;
675
678
uint64_t
receivedPackets
;
679
682
uint64_t
receivedBytes
;
683
684
}
ofdpaFlowEntryStats_t
;
685
686
/*------------------------------------------------------------------------------------*/
687
/* group table APIs */
688
690
typedef
enum
691
{
693
OFDPA_GROUP_ENTRY_TYPE_L2_INTERFACE
= 0,
695
OFDPA_GROUP_ENTRY_TYPE_L2_REWRITE
= 1,
697
OFDPA_GROUP_ENTRY_TYPE_L3_UNICAST
= 2,
699
OFDPA_GROUP_ENTRY_TYPE_L2_MULTICAST
= 3,
701
OFDPA_GROUP_ENTRY_TYPE_L2_FLOOD
= 4,
703
OFDPA_GROUP_ENTRY_TYPE_L3_INTERFACE
= 5,
705
OFDPA_GROUP_ENTRY_TYPE_L3_MULTICAST
= 6,
707
OFDPA_GROUP_ENTRY_TYPE_L3_ECMP
= 7,
709
OFDPA_GROUP_ENTRY_TYPE_L2_OVERLAY
= 8,
710
712
OFDPA_GROUP_ENTRY_TYPE_LAST
713
}
OFDPA_GROUP_ENTRY_TYPE_t
;
714
716
typedef
enum
717
{
719
OFDPA_L2_OVERLAY_FLOOD_UNICAST_TUNNEL
= 0,
721
OFDPA_L2_OVERLAY_FLOOD_MULTICAST_TUNNEL
= 1,
723
OFDPA_L2_OVERLAY_MULTICAST_UNICAST_TUNNEL
= 2,
725
OFDPA_L2_OVERLAY_MULTICAST_MULTICAST_TUNNEL
= 3
726
727
}
OFDPA_L2_OVERLAY_SUBTYPE_t
;
728
751
typedef
struct
ofdpaGroupEntry_s
752
{
754
uint32_t
groupId
;
755
756
}
ofdpaGroupEntry_t
;
757
759
typedef
struct
ofdpaGroupEntryStats_s
760
{
762
uint32_t
refCount
;
763
765
uint32_t
duration
;
766
768
uint32_t
bucketCount
;
769
}
ofdpaGroupEntryStats_t
;
770
771
/*
772
Group Table entries contain one or more Action Buckets depending on their type.
773
The Group Bucket Table stores these references. It is indexed by groupId and referenceGroupId. The presence
774
of an entry in this table creates a referral by the Group Table entry specified in groupId to the Group Table
775
entry specified in referenceGroupId. Restrictions on the number of references and the allowable type of the
776
referenced Group Table entries varies by entry type.
777
*/
778
780
typedef
struct
ofdpaL2InterfaceGroupBucketData_s
781
{
786
uint32_t
outputPort
;
787
792
uint32_t
popVlanTag
;
793
794
}
ofdpaL2InterfaceGroupBucketData_t
;
795
797
typedef
struct
ofdpaL3InterfaceGroupBucketData_s
798
{
802
uint32_t
vlanId
;
803
ofdpaMacAddr_t
srcMac;
804
805
}
ofdpaL3InterfaceGroupBucketData_t
;
806
808
typedef
struct
ofdpaL3UnicastGroupBucketData_s
809
{
813
ofdpaMacAddr_t
srcMac
;
814
ofdpaMacAddr_t
dstMac;
815
uint32_t vlanId;
816
817
}
ofdpaL3UnicastGroupBucketData_t
;
818
819
typedef
struct
820
{
821
/* bucket action set */
822
uint32_t outputPort;
/* controller responsible for assuring data in outputPort
823
and the port identifier data encoded in the groupId are equal */
824
/* only Access and Tunnel Endpoint Logical ports are accepted */
825
}
ofdpaL2OverlayGroupBucketData_t
;
826
827
829
typedef
struct
ofdpaL2RewriteGroupBucketData_s
830
{
834
ofdpaMacAddr_t
srcMac
;
835
ofdpaMacAddr_t
dstMac;
836
uint32_t vlanId;
837
838
}
ofdpaL2RewriteGroupBucketData_t
;
839
841
typedef
struct
ofdpaGroupBucketEntry_s
842
{
844
uint32_t
groupId
;
845
847
uint32_t
bucketIndex
;
848
852
uint32_t
referenceGroupId
;
853
854
union
855
{
857
ofdpaL2InterfaceGroupBucketData_t
l2Interface
;
859
ofdpaL3InterfaceGroupBucketData_t
l3Interface
;
861
ofdpaL3UnicastGroupBucketData_t
l3Unicast
;
863
ofdpaL2RewriteGroupBucketData_t
l2Rewrite
;
865
ofdpaL2OverlayGroupBucketData_t
l2Overlay
;
866
} bucketData;
867
868
}
ofdpaGroupBucketEntry_t
;
869
871
typedef
struct
ofdpaGroupTableInfo_s
872
{
874
uint32_t
numGroupEntries
;
875
877
uint32_t
maxGroupEntries
;
878
880
uint32_t
maxBucketEntries
;
881
882
}
ofdpaGroupTableInfo_t
;
883
884
885
/*------------------------------------------------------------------------------------*/
886
/* Port Table */
887
889
#define OFDPA_PORT_NAME_STRING_SIZE 16
890
895
typedef
enum
896
{
898
OFDPA_PORT_CONFIG_DOWN
= 1 << 0,
899
}
OFDPA_PORT_CONFIG_t
;
900
904
typedef
enum
905
{
907
OFDPA_PORT_STATE_LINK_DOWN
= 1 << 0,
908
}
OFDPA_PORT_STATE_t
;
909
911
typedef
enum
912
{
914
OFDPA_PORT_FEAT_10MB_HD
= 1 << 0,
915
917
OFDPA_PORT_FEAT_10MB_FD
= 1 << 1,
918
920
OFDPA_PORT_FEAT_100MB_HD
= 1 << 2,
921
923
OFDPA_PORT_FEAT_100MB_FD
= 1 << 3,
924
926
OFDPA_PORT_FEAT_1GB_HD
= 1 << 4,
927
929
OFDPA_PORT_FEAT_1GB_FD
= 1 << 5,
930
932
OFDPA_PORT_FEAT_10GB_FD
= 1 << 6,
933
935
OFDPA_PORT_FEAT_40GB_FD
= 1 << 7,
936
938
OFDPA_PORT_FEAT_100GB_FD
= 1 << 8,
939
941
OFDPA_PORT_FEAT_1TB_FD
= 1 << 9,
942
944
OFDPA_PORT_FEAT_OTHER
= 1 << 10,
945
947
OFDPA_PORT_FEAT_COPPER
= 1 << 11,
948
950
OFDPA_PORT_FEAT_FIBER
= 1 << 12,
951
953
OFDPA_PORT_FEAT_AUTONEG
= 1 << 13,
954
956
OFDPA_PORT_FEAT_PAUSE
= 1 << 14,
957
959
OFDPA_PORT_FEAT_PAUSE_ASYM
= 1 << 15
960
}
OFDPA_PORT_FEATURE_t
;
961
964
typedef
struct
ofdpaPortFeature_s
965
{
967
OFDPA_PORT_FEATURE_t
curr
;
968
970
OFDPA_PORT_FEATURE_t
advertised
;
971
973
OFDPA_PORT_FEATURE_t
supported
;
974
976
OFDPA_PORT_FEATURE_t
peer
;
977
}
ofdpaPortFeature_t
;
978
980
typedef
struct
ofdpaPortStats_s
981
{
983
uint64_t
rx_packets
;
984
986
uint64_t
tx_packets
;
987
989
uint64_t
rx_bytes
;
990
992
uint64_t
tx_bytes
;
993
995
uint64_t
rx_errors
;
996
998
uint64_t
tx_errors
;
999
1001
uint64_t
rx_drops
;
1002
1004
uint64_t
tx_drops
;
1005
1007
uint64_t
rx_frame_err
;
1008
1010
uint64_t
rx_over_err
;
1011
1013
uint64_t
rx_crc_err
;
1014
1016
uint64_t
collisions
;
1017
1019
uint32_t
duration_seconds
;
1020
}
ofdpaPortStats_t
;
1021
1023
#define OFDPA_PKT_LOOKUP 1
1024
1026
typedef
enum
1027
{
1029
OFDPA_PACKET_IN_REASON_NO_MATCH
= 0,
1031
OFDPA_PACKET_IN_REASON_ACTION
,
1033
OFDPA_PACKET_IN_REASON_INVALID_TTL
1034
1035
}
OFDPA_PACKET_IN_REASON_t
;
1036
1038
typedef
struct
ofdpaPacket_s
1039
{
1041
OFDPA_PACKET_IN_REASON_t
reason
;
1042
1044
OFDPA_FLOW_TABLE_ID_t
tableId
;
1045
1047
uint32_t
inPortNum
;
1048
1050
ofdpa_buffdesc
pktData
;
1051
}
ofdpaPacket_t
;
1052
1053
/* Asynchronous Control Events */
1054
1056
typedef
enum
1057
{
1059
OFDPA_EVENT_PORT_CREATE
= 1 << 0,
1060
1062
OFDPA_EVENT_PORT_DELETE
= 1 << 1,
1063
1065
OFDPA_EVENT_PORT_STATE
= 1 << 2,
1066
1067
}
OFDPA_PORT_EVENT_MASK_t
;
1068
1070
typedef
struct
ofdpaPortEvent_s
1071
{
1073
OFDPA_PORT_EVENT_MASK_t
eventMask
;
1074
1076
uint32_t
portNum
;
1077
1079
OFDPA_PORT_STATE_t
state
;
1080
}
ofdpaPortEvent_t
;
1081
1083
typedef
enum
1084
{
1086
OFDPA_FLOW_EVENT_IDLE_TIMEOUT
= 1 << 0,
1087
1089
OFDPA_FLOW_EVENT_HARD_TIMEOUT
= 1 << 1
1090
1091
}
OFDPA_FLOW_EVENT_MASK_t
;
1092
1094
typedef
struct
ofdpaFlowEvent_s
1095
{
1097
OFDPA_FLOW_EVENT_MASK_t
eventMask
;
1098
1100
ofdpaFlowEntry_t
flowMatch
;
1101
1102
}
ofdpaFlowEvent_t
;
1103
1104
/*------------------------------------------------------------------------------------*/
1105
/* Tunnel Logical Port APIs */
1106
1107
typedef
enum
1108
{
1110
OFDPA_TUNNEL_PORT_TYPE_ENDPOINT
= 1,
1112
OFDPA_TUNNEL_PORT_TYPE_ACCESS
1113
1114
}
OFDPA_TUNNEL_PORT_TYPE_t
;
1115
1116
typedef
enum
1117
{
1119
OFDPA_TUNNEL_PROTO_VXLAN
= 1,
1121
OFDPA_TUNNEL_PROTO_NVGRE
1122
1123
}
OFDPA_TUNNEL_PROTO_t
;
1124
1125
typedef
struct
1126
{
1128
uint16_t
terminatorUdpDstPort
;
1129
uint16_t initiatorUdpDstPort;
1130
1131
uint16_t udpSrcPortIfNoEntropy;
1132
uint16_t useEntropy;
1133
1134
}
ofdpaVxlanProtoInfo_t
;
1135
1136
typedef
struct
1137
{
1138
uint16_t useEntropyInKey;
1139
1140
}
ofdpaNvgreProtoInfo_t
;
1141
1142
typedef
struct
1143
{
1144
uint32_t physicalPortNum;
1145
uint16_t vlanId;
1146
uint16_t etag;
1147
uint16_t untagged;
1148
uint16_t useEtag;
1149
1150
}
ofdpaAccessPortConfig_t
;
1151
1152
typedef
struct
1153
{
1154
in_addr_t remoteEndpoint;
1155
in_addr_t localEndpoint;
1156
uint32_t ttl;
1157
uint32_t ecmp;
1158
1159
uint32_t nextHopId;
1160
1161
union
1162
{
1163
ofdpaVxlanProtoInfo_t
vxlan;
1164
ofdpaNvgreProtoInfo_t
nvgre;
1165
} protocolInfo;
1166
1167
}
ofdpaEndpointConfig_t
;
1168
1169
typedef
struct
1170
{
1171
OFDPA_TUNNEL_PORT_TYPE_t
type;
1172
OFDPA_TUNNEL_PROTO_t
tunnelProtocol;
1173
1174
union
1175
{
1176
ofdpaAccessPortConfig_t
access;
1177
ofdpaEndpointConfig_t
endpoint;
1178
} configData;
1179
}
ofdpaTunnelPortConfig_t
;
1180
1181
typedef
struct
1182
{
1183
uint32_t refCount;
1184
uint32_t tenantCount;
1185
1186
}
ofdpaTunnelPortStatus_t
;
1187
1188
typedef
struct
1189
{
1190
uint32_t refCount;
1191
1192
}
ofdpaTunnelPortTenantStatus_t
;
1193
1194
typedef
struct
1195
{
1196
OFDPA_TUNNEL_PROTO_t
protocol;
1197
uint32_t virtualNetworkId;
1198
1199
in_addr_t mcastIp;
1200
uint32_t mcastNextHopId;
1201
1202
}
ofdpaTunnelTenantConfig_t
;
1203
1204
typedef
struct
1205
{
1206
uint32_t refCount;
1207
1208
}
ofdpaTunnelTenantStatus_t
;
1209
1210
typedef
struct
1211
{
1212
OFDPA_TUNNEL_PROTO_t
protocol;
1213
ofdpaMacAddr_t
srcAddr;
1214
ofdpaMacAddr_t
dstAddr;
1215
uint32_t physicalPortNum;
1216
uint16_t vlanId;
1217
1218
}
ofdpaTunnelNextHopConfig_t
;
1219
1220
typedef
struct
1221
{
1222
uint32_t refCount;
1223
1224
}
ofdpaTunnelNextHopStatus_t
;
1225
1226
typedef
struct
1227
{
1228
OFDPA_TUNNEL_PROTO_t
protocol;
1229
1230
}
ofdpaTunnelEcmpNextHopGroupConfig_t
;
1231
1232
typedef
struct
1233
{
1234
uint32_t refCount;
1235
uint32_t memberCount;
1236
1237
}
ofdpaTunnelEcmpNextHopGroupStatus_t
;
1238
1239
/*------------------------------------------------------------------------------------*/
1240
/* Table APIs */
1241
1243
#define OFDPA_TABLE_NAME_LEN 32
1244
1246
typedef
struct
ofdpaFlowTableInfo_s
1247
{
1249
uint32_t
numEntries
;
1250
1252
uint32_t
maxEntries
;
1253
1254
/* Not supporting any features etc as they will be well documented in programmers
1255
guide
1256
*/
1257
}
ofdpaFlowTableInfo_t
;
1258
1259
/*------------------------------------------------------------------------------------*/
1260
/* Queue APIs */
1261
1263
typedef
struct
ofdpaPortQueueStats_s
1264
{
1266
uint64_t
txBytes
;
1267
1269
uint64_t
txPkts
;
1270
1272
uint32_t
duration_seconds
;
1273
1274
}
ofdpaPortQueueStats_t
;
1275
1276
/*------------------------------------------------------------------------------------*/
1277
/* Vendor Extension APIs */
1278
1280
typedef
struct
ofdpaSrcMacLearnModeCfg_s
1281
{
1284
uint32_t
destPortNum
;
1285
}
1286
ofdpaSrcMacLearnModeCfg_t
;
1287
1288
#endif
/* INCLUDE_OFDPA_DATATYPES_H */
1289
Generated on Fri Jun 6 2014 21:30:23 for OpenFlow Data Plane Abstraction (OF-DPA) API Guide and Reference Manual by
1.8.2