Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_instru_nos.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2019 Broadcom.
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 openapi_instru_nos.h
28 *
29 * @purpose System Information
30 *
31 * @component OPEN
32 *
33 * @create 07/31/2014
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_INSTRU_NOS_H_INCLUDED
39 #define OPENAPI_INSTRU_NOS_H_INCLUDED
40 
41 #include "openapi_common.h"
42 #include "openapi_instru_bst.h"
43 #include "feature.h"
44 
45 typedef time_t OPEN_TIME_t;
46 
48 #define OPEN_INSTRU_MAX_PACKET_SIZE 1588
49 
50 /* Maximum length of interface list that can be specified in JSON */
51 #define OPEN_MAX_PORT_LIST_STR 256
52 
54 #define OPEN_MASK_BASE_UNIT unsigned int
55 #define OPEN_MASKWID 32
56 
58 #define OPEN_MASK_SIZE(_max) (((_max) + OPEN_MASKWID - 1) / OPEN_MASKWID)
59 
60 #define CONVERT_32_TO_64_INT(dest, src) \
61  do{ \
62  int i = 0; \
63  for (i = 0;i < (sizeof(src)/sizeof(uint32_t)); i++) \
64  { \
65  *(((uint64_t*)(&dest)) + i) = *(((uint32_t*)(&src)) + i); \
66  } \
67  }while(0);
68 
69 #define CONVERT_64_TO_32_INT(dest, src) \
70  do{ \
71  int i = 0; \
72  for (i=0;i < (sizeof(src)/sizeof(uint64_t)); i++) \
73  { \
74  *(((uint32_t*)&dest) + i) = *(((uint64_t*)&src) + i); \
75  } \
76  }while(0);
77 
78 typedef struct
79 {
81  int numPorts;
115  bool pbr;
117  bool dscp_pfc;
121  int num_cos;
123 
124 /* Interface storage */
125 typedef struct _open_port_mask_
126 {
127  OPEN_MASK_BASE_UNIT value[OPEN_MASK_SIZE(OPEN_ASIC_MAX_PORTS)];
128  uint8_t port_list_str[OPEN_MAX_PORT_LIST_STR];
129 
131 
132 #if L7_FEAT_IFA || L7_FEAT_FT
133 typedef struct _open_instru_ipv4_
134 {
135  uint32_t addr;
136  uint32_t mask;
137 } OPEN_INSTRU_IPV4_t;
138 
139 typedef struct _open_instru_ipv6_
140 {
141  open_in6_addr_t addr;
142  open_in6_addr_t mask;
143 } OPEN_INSTRU_IPV6_t;
144 
145 typedef struct _open_instru_ip_prefix_
146 {
147  unsigned short family;
148  union
149  {
150  OPEN_INSTRU_IPV4_t ip;
151  OPEN_INSTRU_IPV6_t ipv6;
152  } host;
153 } OPEN_INSTRU_IP_PREFIX_t;
154 
155 typedef struct _open_instru_ip_addr_
156 {
157  unsigned short family;
158  union
159  {
160  struct in_addr addr;
161  struct in6_addr addr6;
162  } ipaddr;
163 } OPEN_INSTRU_IP_ADDR_t;
164 #endif
165 
166 /*****************************************************************/
179 
180 /*****************************************************************/
193 open_error_t openapiTimeGet(openapiClientHandle_t *client_handle, int *second, int *nanosecond);
194 
195 /*****************************************************************/
208 
209 /*****************************************************************/
223  int *maxPhysPorts, int *maxHiGigPorts);
224 
225 /*****************************************************************/
240  int asic, int lag, open_buffdesc *dst);
241 
242 /*****************************************************************/
256  int asic, int *httpPort);
257 
258 /*********************************************************************/
276  int asic,
280  time_t *time);
281 
282 /*********************************************************************/
300  int asic,
301  open_buffdesc *compSnapshot,
302  time_t *time);
303 
304 /*****************************************************************/
325  int asic,
326  open_buffdesc *name,
327  int ClientId);
328 
329 /*****************************************************************/
348  int asic, OPEN_SYSTEM_COSQ_HWQ_MAP_t *cosq_hwq_map);
349 
350 /*****************************************************************/
368  int asic, int port, int cosq, int *hwQNum);
369 
370 /*****************************************************************/
388  int asic, int port, int cosq, int *hwQNum);
389 
390 /*****************************************************************/
408  int asic, int hwQNum, int *port, int *cosq);
409 
410 /*****************************************************************/
428  int asic, int hwQNum, int *port, int *cosq);
429 
430 /*****************************************************************/
444  int asic,
446 
447 /*****************************************************************/
463  int asic, OPEN_SYSTEM_COSQ_HWQ_MAP_V2_t *cosq_hwq_map);
464 #endif
465 
bool lossless_class
support for lossless class
Structure of cosq H/W queue map version 2.
int numMulticastQueues
Number of multicast queues.
bool isolated_buffers
support for isolated buffers
int numCommonPools
Number of common pools.
open_error_t openapiSystemHwqUCosqMapGet(openapiClientHandle_t *client_handle, int asic, int hwQNum, int *port, int *cosq)
Get the port and cos queue number of a unicast HW queue.
int cellToByteConv
MMU Cell to BYTE conversion.
int numPriorityGroups
Number of priority groups.
open_error_t
OPEN uses these enumerators to indicate the error codes.
int numRqeQueuePools
Number of RQE queue pools.
open_error_t openapiHttpPortGet(openapiClientHandle_t *client_handle, int asic, int *httpPort)
Get HTTP listening port.
bool lossy_class
support for lossy class
open_error_t openapiSystemHwqMCosqMapGet(openapiClientHandle_t *client_handle, int asic, int hwQNum, int *port, int *cosq)
Get the port and cos queue number of a multicast HW queue.
A Complete Data set for a 'snapshot'.
open_error_t openapiLagTranslateToNotation(openapiClientHandle_t *client_handle, int asic, int lag, open_buffdesc *dst)
Get LAG string from SDK lag number.
open_error_t openapiMacAddrGet(openapiClientHandle_t *client_handle, open_buffdesc *mac)
Get System MAC Address.
bool strg_proto_identification
support for storage protocol identification
int num_cos
number of cos per port
Structure of cosq H/W queue map.
int numUnicastQueues
Number of unicast queues.
int numCpuQueues
Number of CPU queues.
open_error_t openapiSystemUCosqHwqMapGet(openapiClientHandle_t *client_handle, int asic, int port, int cosq, int *hwQNum)
Get the HW queue number of a unicast cosq.
int numRqeQueues
Number of RQE queues.
bool dscp_pfc
support for dscp to pfc
bool support1588
can this ASIC provide accurate time ?
int numServicePools
Number of service pools.
#define OPEN_MASK_SIZE(_max)
(internal) Number of BVIEW_MASK_BASE_UNITs needed to contain _max bits
open_error_t openapiAsicCapabilityGet(openapiClientHandle_t *clientHandle, int asic, OPEN_ASIC_CAPABILITIES_ALL_t *asicCap)
Asic capabilities get function.
open_error_t openapiTimeGet(openapiClientHandle_t *client_handle, int *second, int *nanosecond)
Get System Time.
open_error_t openapiBstMaxSnapshotCompressedGet(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *compSnapshot, time_t *time)
Obtain compressed complete ASIC Statistics Report of maximum buffer values.
int numUnicastQueueGroups
Number of unicast queue groups.
open_error_t openapiSystemCosqHwqFullMapGetV2(openapiClientHandle_t *client_handle, int asic, OPEN_SYSTEM_COSQ_HWQ_MAP_V2_t *cosq_hwq_map)
Get HW queue map of cosqs in the system.
open_error_t openapiChipFamilyNameGet(openapiClientHandle_t *client_handle, open_buffdesc *buf)
Get Chip Family name.
open_error_t openapiHwMaxPortsGet(openapiClientHandle_t *client_handle, int *maxPhysPorts, int *maxHiGigPorts)
Get Chip Max Ports.
open_error_t openapiSystemCosqHwqFullMapGet(openapiClientHandle_t *client_handle, int asic, OPEN_SYSTEM_COSQ_HWQ_MAP_t *cosq_hwq_map)
Get HW queue map of cosqs in the system.
open_error_t openapiSystemPacketTcamRegister(openapiClientHandle_t *clientHandle, int asic, open_buffdesc *name, int ClientId)
Register with System for TCAM packets.
Buffer Count for Egress Unicast Queues.
open_error_t openapiBstMaxSnapshotGet(openapiClientHandle_t *clientHandle, int asic, OPEN_BST_ASIC_SNAPSHOT_DATA_t *data1, OPEN_BST_EGRESS_UC_QUEUE_DATA_t *data2, OPEN_BST_EGRESS_MC_QUEUE_DATA_t *data3, time_t *time)
Obtain Complete ASIC Statistics Report of maximum buffer values.
#define OPEN_MASK_BASE_UNIT
Base type for declarations.
bool dscp_tc_mark
support for dscp to tc mark
int numPorts
Number of ports of Asic.
open_error_t openapiSystemMCosqHwqMapGet(openapiClientHandle_t *client_handle, int asic, int port, int cosq, int *hwQNum)
Get the HW queue number of a multicast cosq.
Buffer Count for Egress Multicast Queues.
Hash Mode names.
int numTrafficClasses
Number of Traffic classes.