appl_ref_sand.h (2222B)
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 * \file appl_ref_sand.h 8 */ 9 10 #ifndef _APPL_REF_SAND_H_ 11 #define _APPL_REF_SAND_H_ 12 13 /************* 14 * INCLUDES * 15 */ 16 #include <shared/shrextend/shrextend_debug.h> 17 18 /************* 19 * TYPE DEFS * 20 */ 21 22 /** 23 * \brief - Default number of queue/connectors per connection 24 */ 25 #define APPL_SAND_E2E_SCHEME_COS (8) 26 27 /************* 28 * STRUCTURES * 29 */ 30 31 /************* 32 * FUNCTIONS * 33 */ 34 35 /** 36 * \brief - Convert device and logical port to system port id. 37 * 38 * \param [in] unit - Unit ID 39 * \param [in] device_idx - Index of device (aligned to 0) 40 * \param [in] nof_sys_ports_per_device - number of system ports per device 41 * \param [in] port - logical port 42 * \param [Out] sysport - Returned system port index 43 * 44 * \return 45 * int 46 * 47 * \remark 48 * * None 49 * \see 50 * * None 51 */ 52 int appl_sand_device_to_sysport_convert( 53 int unit, 54 int device_idx, 55 int nof_sys_ports_per_device, 56 int port, 57 int *sysport); 58 59 /** 60 * \brief - Convert sysport id to vase voq id 61 * 62 * \param [in] unit - Unit ID 63 * \param [in] sysport - system port ID 64 * \param [Out] base_voq - returned base voq ID 65 * 66 * \return 67 * shr_error_e 68 * 69 * \remark 70 * * None 71 * \see 72 * * None 73 */ 74 shr_error_e appl_sand_sysport_id_to_base_voq_id_convert( 75 int unit, 76 int sysport, 77 int *base_voq); 78 79 /** 80 * \brief - Convert modid index and logical port to base voq connector 81 * 82 * \param [in] unit - Unit ID 83 * \param [in] local_port - Logical port 84 * \param [in] remote_core_id - Core of remote voq 85 * \param [in] ingress_device_idx - Ingress (remote device) device index 86 * \param [in] nof_devices - nof devices in the system 87 * \param [out] base_voq_connector - Returned base voq connector 88 * 89 * \return 90 * shr_error_e 91 * 92 * \remark 93 * * None 94 * \see 95 * * None 96 */ 97 shr_error_e appl_sand_device_to_base_voq_connector_id_convert( 98 int unit, 99 int local_port, 100 int remote_core_id, 101 int ingress_device_idx, 102 int nof_devices, 103 int *base_voq_connector); 104 105 #endif /*_APPL_REF_SAND_H_ */