Skip to content

Commit fef8717

Browse files
authored
Add support for experimental attributes (opencomputeproject#807)
* Add supporf for experimental attributes * Fix comments * Remove example fpga extensions
1 parent 3626591 commit fef8717

13 files changed

+443
-61
lines changed

experimental/saiextensions.h

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/**
2+
* Copyright (c) 2018 Microsoft Open Technologies, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use this file except in compliance with the License. You may obtain
6+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
9+
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
10+
* LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
11+
* FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
12+
*
13+
* See the Apache Version 2.0 License for specific language governing
14+
* permissions and limitations under the License.
15+
*
16+
* Microsoft would like to thank the following companies for their review and
17+
* assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
18+
* Dell Products, L.P., Facebook, Inc., Marvell International Ltd.
19+
*
20+
* @file saiextensions.h
21+
*
22+
* @brief This module defines extensions of the Switch Abstraction Interface (SAI)
23+
*/
24+
25+
#ifndef __SAIEXTENSIONS_H_
26+
#define __SAIEXTENSIONS_H_
27+
28+
#include <saitypes.h>
29+
30+
/* existing enum extensions */
31+
#include "saitypesextensions.h"
32+
#include "saiswitchextensions.h"
33+
34+
/* new experimental object type includes */
35+
36+
/**
37+
* @brief Extensions to SAI APIs
38+
*
39+
* @flags
40+
*/
41+
typedef enum _sai_api_extensions_t
42+
{
43+
SAI_API_EXTENSIONS_RANGE_START = SAI_API_MAX,
44+
45+
/* Add new experimental APIs above this line */
46+
47+
SAI_API_EXTENSIONS_RANGE_START_END
48+
49+
} sai_api_extensions_t;
50+
51+
#endif /* __SAIEXTENSIONS_H_ */

experimental/saiswitchextensions.h

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* Copyright (c) 2018 Microsoft Open Technologies, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use this file except in compliance with the License. You may obtain
6+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
9+
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
10+
* LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
11+
* FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
12+
*
13+
* See the Apache Version 2.0 License for specific language governing
14+
* permissions and limitations under the License.
15+
*
16+
* Microsoft would like to thank the following companies for their review and
17+
* assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
18+
* Dell Products, L.P., Facebook, Inc., Marvell International Ltd.
19+
*
20+
* @file saiswitchextensions.h
21+
*
22+
* @brief This module defines switch extensions of the Switch Abstraction Interface (SAI)
23+
*/
24+
25+
#ifndef __SAISWITCHEXTENSIONS_H_
26+
#define __SAISWITCHEXTENSIONS_H_
27+
28+
#include <saitypes.h>
29+
30+
/**
31+
* @brief SAI switch attribute extensions.
32+
*
33+
* @flags
34+
*/
35+
typedef enum _sai_switch_attr_extensions_t
36+
{
37+
SAI_SWITCH_ATTR_EXTENSIONS_RANGE_START = SAI_SWITCH_ATTR_END,
38+
39+
SAI_SWITCH_ATTR_EXTENSIONS_RANGE_END
40+
41+
} sai_switch_attr_extensions_t;
42+
43+
#endif /* __SAISWITCHEXTENSIONS_H_ */

experimental/saitypesextensions.h

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/**
2+
* Copyright (c) 2018 Microsoft Open Technologies, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
5+
* not use this file except in compliance with the License. You may obtain
6+
* a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
9+
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
10+
* LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
11+
* FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NON-INFRINGEMENT.
12+
*
13+
* See the Apache Version 2.0 License for specific language governing
14+
* permissions and limitations under the License.
15+
*
16+
* Microsoft would like to thank the following companies for their review and
17+
* assistance with these files: Intel Corporation, Mellanox Technologies Ltd,
18+
* Dell Products, L.P., Facebook, Inc., Marvell International Ltd.
19+
*
20+
* @file saitypesextensions.h
21+
*
22+
* @brief This module defines type extensions of the Switch Abstraction Interface (SAI)
23+
*/
24+
25+
#ifndef __SAITYPESEXTENSIONS_H_
26+
#define __SAITYPESEXTENSIONS_H_
27+
28+
#include <saitypes.h>
29+
30+
/**
31+
* @brief SAI object type extensions
32+
*
33+
* @flags
34+
*/
35+
typedef enum _sai_object_type_extensions_t
36+
{
37+
SAI_OBJECT_TYPE_EXTENSIONS_RANGE_START = SAI_OBJECT_TYPE_MAX,
38+
39+
/* Add new experimental object types above this line */
40+
41+
SAI_OBJECT_TYPE_EXTENSIONS_RANGE_END
42+
43+
} sai_object_type_extensions_t;
44+
45+
#endif /* __SAITYPESEXTENSIONS_H_ */
46+

meta/Doxyfile

+1
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,7 @@ WARN_LOGFILE =
745745
# Note: If this tag is empty the current directory is searched.
746746

747747
INPUT = ../inc/
748+
INPUT += ../experimental/
748749
INPUT += saimetadatatypes.h
749750
INPUT += saimetadatautils.h
750751
INPUT += saimetadatalogger.h

meta/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ WARNINGS = \
6363
-Wvariadic-macros \
6464
-Wwrite-strings
6565

66-
CFLAGS += -I../inc $(WARNINGS)
66+
CFLAGS += -I../inc -I../experimental $(WARNINGS)
6767

68-
DEPS = $(wildcard ../inc/*.h)
68+
DEPS = $(wildcard ../inc/*.h) $(wildcard ../experimental/*.h)
6969
XMLDEPS = $(wildcard xml/*.xml)
7070

7171
OBJ = saimetadata.o saimetadatautils.o saiserialize.o

meta/acronyms.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ DLDR - Dead Lock Detection and Recovery
1919
DLL - Dynamic Link Library
2020
DLR - Dead Lock Recovery
2121
DSCP - Differentiated Services Code Point
22+
DTEL - Data Plane Telemetry
2223
ECMP - Equal Cost Multi-Path
2324
ECN - Explicit Congestion Notification
2425
ECT - ECN Capable Transport
@@ -28,11 +29,13 @@ FCS - Frame Check Sequence
2829
FD - File Descriptor
2930
FDB - Forwarding Data Base
3031
FEC - Forward Error Correction
32+
FPGA - Field Programmable Gate Array
3133
GRE - Generic Routing Encapsulation
3234
HW - Hardware
3335
I2C - Inter Integrated Circuit
3436
ICMP - Internet Control Message Protocol
3537
IEEE - Institute of Electrical and Electronics Engineers
38+
IGMP - Internet Group Management Protocol
3639
IP - Internet Protocol
3740
IP2ME - IP packets to local router IP
3841
IPMC - Intelligent Platform Management Controller
@@ -45,6 +48,7 @@ MPLS - Multi Protocol Label Switching
4548
MTU - Maximum Transmission Unit
4649
NHLFE - Next Hop Label Forwarding Entry
4750
NPU - Numeric Processing Unit
51+
OAM - Operations Administration and Maintenance
4852
OUI - Organizationally Unique Identifier
4953
PBS - Peak Burst Size
5054
PCI - Peripheral Component Interconnect
@@ -81,6 +85,3 @@ WWW - World Wide Web
8185
XG - (*,G) Any-source Multicast
8286
XOFF - Transmitter Off
8387
XON - Transmitter On
84-
IGMP - Internet Group Management Protocol
85-
OAM - Operations Administration and Maintenance
86-
DTEL - Data Plane Telemetry

meta/aspell.en.pws

+8-6
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@ Dst
88
Enum
99
EtherType
1010
FC
11+
FPGAs
1112
Facebook
1213
HQOS
1314
HQoS
1415
Hostif
15-
Inservice
1616
InSegment
17+
Inservice
1718
LAGs
1819
Linux
1920
Loopback
20-
Marvell
2121
MCAST
2222
MERCHANTABILITY
23+
Marvell
2324
Mbps
2425
Mellanox
2526
Metadata
2627
Microburst
2728
Microbursts
2829
Multicast
30+
NPUs
2931
Netdevice
3032
OID
3133
OIDs
@@ -80,14 +82,14 @@ lookup
8082
lookups
8183
loopback
8284
lossless
85+
mUI
86+
mV
8387
mcast
8488
metadata
8589
microburst
8690
millivolts
87-
mUI
8891
multi
8992
multicast
90-
mV
9193
netdev
9294
netdevs
9395
nexthop
@@ -109,6 +111,7 @@ struct
109111
sublayer
110112
subnet
111113
subnets
114+
timestamp
112115
tx
113116
uBurst
114117
uBursts
@@ -119,7 +122,6 @@ validonly
119122
versa
120123
vlan
121124
warmboot
125+
watchlist
122126
wildcard
123127
www
124-
timestamp
125-
watchlist

0 commit comments

Comments
 (0)