compat_6512.h (8039B)
1 /* 2 * $Id: compat_6512.h,v 3.0 2018/02/27 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 6 * 7 * RPC Compatibility with sdk-6.5.12 routines 8 */ 9 10 #ifndef _COMPAT_6512_H_ 11 #define _COMPAT_6512_H_ 12 13 #ifdef BCM_RPC_SUPPORT 14 #include <bcm/types.h> 15 #include <bcm/field.h> 16 #include <bcm/fcoe.h> 17 #include <bcm/l2.h> 18 19 #if defined(INCLUDE_L3) 20 #include <bcm/vxlan.h> 21 22 /* MPLS ECN Map Structure. */ 23 typedef struct bcm_compat6512_vxlan_vpn_config_s { 24 uint32 flags; /* BCM_VXLAN_VPN_xxx. */ 25 bcm_vpn_t vpn; /* VXLAN VPN */ 26 uint32 vnid; /* VNID */ 27 uint8 pkt_pri; /* Packet Priority */ 28 uint8 pkt_cfi; /* Packet CFI */ 29 uint16 egress_service_tpid; /* Service TPID */ 30 bcm_vlan_t egress_service_vlan; /* Service VLAN */ 31 bcm_multicast_t broadcast_group; 32 bcm_multicast_t unknown_unicast_group; 33 bcm_multicast_t unknown_multicast_group; 34 bcm_vlan_protocol_packet_ctrl_t protocol_pkt; 35 bcm_vlan_t vlan; /* Outer VLAN */ 36 bcm_gport_t match_port_class; /* local port vlan domain */ 37 } bcm_compat6512_vxlan_vpn_config_t; 38 39 /* Get vxlan vpn */ 40 extern int bcm_compat6512_vxlan_vpn_get(int unit, bcm_vpn_t l2vpn, 41 bcm_compat6512_vxlan_vpn_config_t *info); 42 43 /* Create vxlan vpn */ 44 extern int bcm_compat6512_vxlan_vpn_create(int unit, 45 bcm_compat6512_vxlan_vpn_config_t *info); 46 #endif 47 48 /* VLAN/VSAN Translation Action Set. */ 49 typedef struct bcm_compat6512_fcoe_vsan_action_set_s { 50 uint32 flags; /* BCM_FCOE_VSAN_ACTION_* */ 51 bcm_fcoe_vsan_id_t new_vsan; /* new VSAN ID to replace with */ 52 uint8 new_vsan_pri; /* new VSAN priority to replace with */ 53 bcm_fcoe_vsan_vft_t vft; /* remaining fields of VFT header */ 54 bcm_if_t ingress_if; /* TBD */ 55 bcm_fcoe_vsan_action_t dt_vsan; /* Vsan action when double tagged */ 56 bcm_fcoe_vsan_action_t dt_vsan_pri; /* VSAN Priority action when double 57 tagged */ 58 bcm_fcoe_vsan_action_t it_vsan; /* Vsan action when single inner tagged */ 59 bcm_fcoe_vsan_action_t it_vsan_pri; /* Vsan Priority action when single 60 inner tagged */ 61 bcm_fcoe_vsan_action_t ot_vsan; /* Vsan action when single outer tagged */ 62 bcm_fcoe_vsan_action_t ot_vsan_pri; /* Vsan Priority action when single 63 outer tagged */ 64 bcm_fcoe_vsan_action_t ut_vsan; /* Vsan action when un-tagged */ 65 bcm_fcoe_vsan_action_t ut_vsan_pri; /* Vsan Priority action when un-tagged */ 66 } bcm_compat6512_fcoe_vsan_action_set_t; 67 68 /* Add VSAN VLAN action */ 69 extern int bcm_compat6512_fcoe_vsan_translate_action_add( 70 int unit, bcm_fcoe_vsan_translate_key_config_t *key, 71 bcm_compat6512_fcoe_vsan_action_set_t *action); 72 73 /* Device-independent L2 address structure. */ 74 typedef struct bcm_compat6512_l2_addr_s { 75 uint32 flags; /* BCM_L2_xxx flags. */ 76 uint32 flags2; /* BCM_L2_FLAGS2_xxx flags. */ 77 uint32 station_flags; /* BCM_L2_STATION_xxx flags. */ 78 bcm_mac_t mac; /* 802.3 MAC address. */ 79 bcm_vlan_t vid; /* VLAN identifier. */ 80 int port; /* Zero-based port number. */ 81 int modid; /* XGS: modid. */ 82 bcm_trunk_t tgid; /* Trunk group ID. */ 83 bcm_cos_t cos_dst; /* COS based on dst addr. */ 84 bcm_cos_t cos_src; /* COS based on src addr. */ 85 bcm_multicast_t l2mc_group; /* XGS: index in L2MC table. */ 86 bcm_if_t egress_if; /* XGS: index in Next Hop Tables. Used 87 it with BCM_L2_FLAGS2_ROE_NHI flag */ 88 bcm_pbmp_t block_bitmap; /* XGS: blocked egress bitmap. */ 89 int auth; /* Used if auth enabled on port. */ 90 int group; /* Group number for FP. */ 91 bcm_fabric_distribution_t distribution_class; /* Fabric Distribution Class. */ 92 int encap_id; /* out logical interface */ 93 int age_state; /* Age state of the entry */ 94 uint32 flow_handle; /* FLOW handle for flex entries. */ 95 uint32 flow_option_handle; /* FLOW option handle for flex entries. */ 96 bcm_flow_logical_field_t logical_fields[BCM_FLOW_MAX_NOF_LOGICAL_FIELDS]; /* logical fields array for flex 97 entries. */ 98 uint32 num_of_fields; /* number of logical fields. */ 99 bcm_pbmp_t sa_source_filter_pbmp; /* Source port filter bitmap for this SA */ 100 bcm_tsn_flowset_t tsn_flowset; /* Time-Sensitive Networking: associated 101 flow set */ 102 bcm_tsn_sr_flowset_t sr_flowset; /* Seamless Redundancy: associated flow 103 set */ 104 bcm_policer_t policer_id; /* Base policer to be used */ 105 bcm_tsn_pri_map_t taf_gate_primap; /* TAF (Time Aware Filtering) gate 106 priority mapping */ 107 } bcm_compat6512_l2_addr_t; 108 109 extern int bcm_compat6512_l2_addr_add(int unit, 110 bcm_compat6512_l2_addr_t *l2addr); 111 extern int bcm_compat6512_l2_addr_multi_add(int unit, 112 bcm_compat6512_l2_addr_t *l2addr, int count); 113 extern int bcm_compat6512_l2_addr_multi_delete(int unit, 114 bcm_compat6512_l2_addr_t *l2addr, int count); 115 extern int bcm_compat6512_l2_addr_get(int unit, bcm_mac_t mac_addr, bcm_vlan_t vid, 116 bcm_compat6512_l2_addr_t *l2addr); 117 extern int bcm_compat6512_l2_conflict_get(int unit, bcm_compat6512_l2_addr_t *addr, 118 bcm_compat6512_l2_addr_t *cf_array, int cf_max, 119 int *cf_count); 120 extern int bcm_compat6512_l2_replace(int unit, uint32 flags, 121 bcm_compat6512_l2_addr_t *match_addr, 122 bcm_module_t new_module, 123 bcm_port_t new_port, bcm_trunk_t new_trunk); 124 extern int bcm_compat6512_l2_replace_match(int unit, uint32 flags, 125 bcm_compat6512_l2_addr_t *match_addr, 126 bcm_compat6512_l2_addr_t *mask_addr, 127 bcm_compat6512_l2_addr_t *replace_addr, 128 bcm_compat6512_l2_addr_t *replace_mask_addr); 129 extern int bcm_compat6512_l2_stat_get(int unit, 130 bcm_compat6512_l2_addr_t *l2addr, 131 bcm_l2_stat_t stat, uint64 *val); 132 extern int bcm_compat6512_l2_stat_get32(int unit, 133 bcm_compat6512_l2_addr_t *l2addr, 134 bcm_l2_stat_t stat, uint32 *val); 135 extern int bcm_compat6512_l2_stat_set(int unit, 136 bcm_compat6512_l2_addr_t *l2addr, 137 bcm_l2_stat_t stat, uint64 val); 138 extern int bcm_compat6512_l2_stat_set32(int unit, 139 bcm_compat6512_l2_addr_t *l2addr, 140 bcm_l2_stat_t stat, uint32 val); 141 extern int bcm_compat6512_l2_stat_enable_set(int unit, 142 bcm_compat6512_l2_addr_t *l2addr, 143 int enable); 144 #endif 145 #endif /* !_COMPAT_6512_H */