compat_6513.h (6794B)
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 * RPC Compatibility with sdk-6.5.13 routines 8 */ 9 10 #ifndef _COMPAT_6513_H_ 11 #define _COMPAT_6513_H_ 12 13 #ifdef BCM_RPC_SUPPORT 14 #include <bcm/types.h> 15 #include <bcm/field.h> 16 17 #if defined(INCLUDE_L3) 18 #include <bcm/flow.h> 19 20 typedef struct bcm_compat6513_flow_encap_config_s { 21 bcm_vpn_t vpn; /* VPN representing a vfi or vrf */ 22 bcm_gport_t flow_port; /* flow port id representing a DVP */ 23 bcm_if_t intf_id; /* l3 interface id */ 24 uint32 dvp_group; /* DVP group ID */ 25 uint32 oif_group; /* L3 OUT interface group ID */ 26 uint32 vnid; /* VN_ID. */ 27 uint8 pri; /* service tag priority. */ 28 uint8 cfi; /* service tag cfi */ 29 uint16 tpid; /* service tag tpid */ 30 bcm_vlan_t vlan; /* service VLAN ID. */ 31 uint32 flags; /* BCM_FLOW_ENCAP_FLAG_xxx. */ 32 uint32 options; /* BCM_FLOW_ENCAP_OPTION_xxx. */ 33 bcm_flow_encap_criteria_t criteria; /* flow encap criteria. */ 34 uint32 valid_elements; /* bitmap of valid fields for the encap 35 action */ 36 bcm_flow_handle_t flow_handle; /* flow handle derived from flow name */ 37 uint32 flow_option; /* flow option derived from flow option 38 name */ 39 } bcm_compat6513_flow_encap_config_t; 40 #endif 41 42 43 #if defined(INCLUDE_L3) 44 /* Add a flow encap rule. */ 45 extern int bcm_compat6513_flow_encap_add( 46 int unit, 47 bcm_compat6513_flow_encap_config_t *info, 48 uint32 num_of_fields, 49 bcm_flow_logical_field_t *field); 50 #endif 51 52 #if defined(INCLUDE_L3) 53 /* Delete a flow encap rule on the given encap key. */ 54 extern int bcm_compat6513_flow_encap_delete( 55 int unit, 56 bcm_compat6513_flow_encap_config_t *info, 57 uint32 num_of_fields, 58 bcm_flow_logical_field_t *field); 59 #endif 60 61 #if defined(INCLUDE_L3) 62 /* Get the encap attributes on the given encap key. */ 63 extern int bcm_compat6513_flow_encap_get( 64 int unit, 65 bcm_compat6513_flow_encap_config_t *info, 66 uint32 num_of_fields, 67 bcm_flow_logical_field_t *field); 68 #endif 69 70 #if defined(INCLUDE_L3) 71 /* 72 * L3 Egress Structure. 73 * 74 * Description of an L3 forwarding destination. 75 */ 76 typedef struct bcm_compat6513_l3_egress_s { 77 uint32 flags; /* Interface flags (BCM_L3_TGID, 78 BCM_L3_L2TOCPU). */ 79 uint32 flags2; /* See BCM_L3_FLAGS2_xxx flag 80 definitions. */ 81 bcm_if_t intf; /* L3 interface (source MAC, tunnel). */ 82 bcm_mac_t mac_addr; /* Next hop forwarding destination mac. */ 83 bcm_vlan_t vlan; /* Next hop vlan id. */ 84 bcm_module_t module; 85 bcm_port_t port; /* Port packet switched to (if 86 !BCM_L3_TGID). */ 87 bcm_trunk_t trunk; /* Trunk packet switched to (if 88 BCM_L3_TGID). */ 89 uint32 mpls_flags; /* BCM_MPLS flag definitions. */ 90 bcm_mpls_label_t mpls_label; /* MPLS label. */ 91 bcm_mpls_egress_action_t mpls_action; /* MPLS action. */ 92 int mpls_qos_map_id; /* MPLS EXP map ID. */ 93 int mpls_ttl; /* MPLS TTL threshold. */ 94 uint8 mpls_pkt_pri; /* MPLS Packet Priority Value. */ 95 uint8 mpls_pkt_cfi; /* MPLS Packet CFI Value. */ 96 uint8 mpls_exp; /* MPLS Exp. */ 97 int qos_map_id; /* General QOS map id */ 98 bcm_if_t encap_id; /* Encapsulation index. */ 99 bcm_failover_t failover_id; /* Failover Object Index. */ 100 bcm_if_t failover_if_id; /* Failover Egress Object index. */ 101 bcm_multicast_t failover_mc_group; /* Failover Multicast Group. */ 102 int dynamic_scaling_factor; /* Scaling factor for dynamic load 103 balancing thresholds. */ 104 int dynamic_load_weight; /* Weight of traffic load in determining 105 a dynamic load balancing member's 106 quality. */ 107 int dynamic_queue_size_weight; /* Weight of queue size in determining a 108 dynamic load balancing member's 109 quality. */ 110 int intf_class; /* L3 interface class ID */ 111 uint32 multicast_flags; /* BCM_L3_MULTICAST flag definitions. */ 112 uint16 oam_global_context_id; /* OAM global context id passed from 113 ingress to egress XGS chip. */ 114 bcm_vntag_t vntag; /* VNTAG. */ 115 bcm_vntag_action_t vntag_action; /* VNTAG action. */ 116 bcm_etag_t etag; /* ETAG. */ 117 bcm_etag_action_t etag_action; /* ETAG action. */ 118 uint32 flow_handle; /* FLOW handle for flex entries. */ 119 uint32 flow_option_handle; /* FLOW option handle for flex entries. */ 120 uint32 flow_label_option_handle; /* FLOW option handle for egress label 121 flex entries. */ 122 bcm_flow_logical_field_t logical_fields[BCM_FLOW_MAX_NOF_LOGICAL_FIELDS]; /* logical fields array for flex 123 entries. */ 124 uint32 num_of_fields; /* number of logical fields. */ 125 int counting_profile; /* counting profile. If not required, 126 set it to 127 BCM_STAT_LIF_COUNTING_PROFILE_NONE */ 128 int mpls_ecn_map_id; /* IP ECN/INT CN to MPLS EXP map ID. */ 129 bcm_l3_ingress_urpf_mode_t urpf_mode; /* fec rpf mode. */ 130 } bcm_compat6513_l3_egress_t; 131 132 /* Create an Egress forwarding object. */ 133 extern int bcm_compat6513_l3_egress_create( 134 int unit, uint32 flags, bcm_compat6513_l3_egress_t *egr, bcm_if_t *intf); 135 136 /* Get an Egress forwarding object. */ 137 extern int bcm_compat6513_l3_egress_get( 138 int unit, bcm_if_t intf, bcm_compat6513_l3_egress_t *egr); 139 140 /* Find an egress forwarding object. */ 141 extern int bcm_compat6513_l3_egress_find( 142 int unit, bcm_compat6513_l3_egress_t *egr, bcm_if_t *intf); 143 #endif 144 #endif 145 #endif /* !_COMPAT_6513_H */