gsa_framework.h (2236B)
1 /* 2 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 * 4 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 5 */ 6 7 #ifndef __GSA_FRAMEWORK_H_INCLUDED__ 8 /* { */ 9 #define __GSA_FRAMEWORK_H_INCLUDED__ 10 11 /************* 12 * INCLUDES * 13 */ 14 /* { */ 15 #include <soc/dpp/SAND/Utils/sand_header.h> 16 17 #include <soc/dpp/SAND/Utils/sand_framework.h> 18 #include <soc/dpp/SAND/Utils/sand_os_interface.h> 19 #include <soc/dpp/SAND/Management/sand_error_code.h> 20 /* } */ 21 /************* 22 * DEFINES * 23 */ 24 /* { */ 25 26 27 /* 28 * Reserved error numbers 29 */ 30 31 #define GSA_MAX_NOF_DEVICES 10 32 #define GSA_MAX_NOF_SYS_PORTS (GSA_MAX_NOF_DEVICES * SOC_PETRA_NOF_FAP_PORTS) 33 34 /* } */ 35 36 /************* 37 * MACROS * 38 */ 39 /* { */ 40 41 /************************************************************************/ 42 /* Sys Device Defs */ 43 /************************************************************************/ 44 45 46 47 48 49 50 /************************************************************************/ 51 /* Error Handling and Printing */ 52 /************************************************************************/ 53 #define GSA_DEBUG 1 54 55 #if GSA_DEBUG 56 #define GSA_DBG_ID "**DEBUG--> " 57 #define GSA_DBG \ 58 { \ 59 soc_sand_os_printf("\n%sFile : %s \n%sFunction: %s line %u\n", GSA_DBG_ID, __FILE__, GSA_DBG_ID, FUNCTION_NAME(), __LINE__);\ 60 } 61 #else 62 #define GSA_DBG 63 #endif 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 /* 81 * Macro to handle procedure call which returns standard soc_sand 82 * error code and, in case of error, sets error code, performs an exit function and quits. 83 * Assumes local variables: ret, error_id, soc_sand_err 84 * Assumes label: exit 85 */ 86 87 88 89 90 91 92 /* } */ 93 94 /************* 95 * TYPE DEFS * 96 */ 97 /* { */ 98 99 /* } */ 100 101 /************* 102 * GLOBALS * 103 */ 104 /* { */ 105 106 /* } */ 107 108 /************* 109 * FUNCTIONS * 110 */ 111 /* { */ 112 113 uint32 114 gsa_sys_port2local_port_translate( 115 SOC_SAND_IN int unit, 116 SOC_SAND_IN uint32 sys_prt_ndx, 117 SOC_SAND_OUT uint32 *loc_dev_ndx, 118 SOC_SAND_OUT uint32 *loc_prt_ndx 119 ); 120 121 /* } */ 122 123 #include <soc/dpp/SAND/Utils/sand_footer.h> 124 125 #endif /* __GSA_FRAMEWORK_H_INCLUDED__ */ 126 127 128