trunk.c (2630B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 */ 7 8 #include <sal/types.h> 9 10 #include <soc/mem.h> 11 #include <soc/debug.h> 12 #include <soc/drv.h> 13 14 #include <bcm/error.h> 15 #include <bcm/vlan.h> 16 #include <bcm/mcast.h> 17 #include <bcm/l2.h> 18 #include <bcm/stack.h> 19 #include <bcm/port.h> 20 #include <bcm/trunk.h> 21 #include <bcm/switch.h> 22 23 #include <bcm_int/common/trunk.h> 24 25 /* 26 * Function: 27 * bcm_trunk_info_t_init 28 * Purpose: 29 * Initialize the bcm_trunk_info_t structure 30 * Parameters: 31 * trunk_info - Pointer to structure which should be initialized 32 * Returns: 33 * NONE 34 */ 35 void 36 bcm_trunk_info_t_init(bcm_trunk_info_t *trunk_info) 37 { 38 if (NULL != trunk_info) { 39 sal_memset(trunk_info, 0, sizeof (*trunk_info)); 40 } 41 return; 42 } 43 44 /* 45 * Function: 46 * bcm_trunk_add_info_t_init 47 * Purpose: 48 * Initialize the bcm_trunk_add_info_t structure 49 * Parameters: 50 * add_info - Pointer to structure which should be initialized 51 * Returns: 52 * NONE 53 */ 54 void 55 bcm_trunk_add_info_t_init(bcm_trunk_add_info_t *add_info) 56 { 57 if (NULL != add_info) { 58 sal_memset(add_info, 0, sizeof (*add_info)); 59 } 60 return; 61 } 62 63 /* 64 * Function: 65 * bcm_trunk_chip_info_t_init 66 * Purpose: 67 * Initialize the bcm_trunk_chip_info_t structure 68 * Parameters: 69 * trunk_chip_info - Pointer to trunk chip info structure 70 * Returns: 71 * NONE 72 */ 73 void 74 bcm_trunk_chip_info_t_init(bcm_trunk_chip_info_t *trunk_chip_info) 75 { 76 if (trunk_chip_info != NULL) { 77 sal_memset(trunk_chip_info, 0, sizeof (*trunk_chip_info)); 78 } 79 return; 80 } 81 82 /* 83 * Function: 84 * bcm_trunk_member_t_init 85 * Purpose: 86 * Initialize the bcm_trunk_member_t structure 87 * Parameters: 88 * trunk_member - Pointer to structure which should be initialized 89 * Returns: 90 * NONE 91 */ 92 void 93 bcm_trunk_member_t_init(bcm_trunk_member_t *trunk_member) 94 { 95 if (NULL != trunk_member) { 96 sal_memset(trunk_member, 0, sizeof (*trunk_member)); 97 } 98 return; 99 } 100 101 /* 102 * Function: 103 * bcm_trunk_pp_port_allocation_info_t_init 104 * Purpose: 105 * Initialize the bcm_trunk_pp_port_allocation_info_t_init structure 106 * Parameters: 107 * trunk_member - Pointer to structure which should be initialized 108 * Returns: 109 * NONE 110 */ 111 void 112 bcm_trunk_pp_port_allocation_info_t_init(bcm_trunk_pp_port_allocation_info_t *allocation_info) 113 { 114 if (NULL != allocation_info) { 115 sal_memset(allocation_info, 0, sizeof (*allocation_info)); 116 } 117 return; 118 } 119