compat_657.h (6904B)
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.7 routines 8 */ 9 10 #ifndef _COMPAT_657_H_ 11 #define _COMPAT_657_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/mpls.h> 19 20 /* Extender forwarding entry type. */ 21 typedef struct bcm_compat657_extender_forward_s { 22 uint32 flags; /* BCM_extender_FORWARD_xxx. */ 23 uint16 name_space; /* extender Namespace. */ 24 uint16 extended_port_vid; /* Extended port VID. */ 25 bcm_gport_t dest_port; /* Destination Gport. */ 26 bcm_multicast_t dest_multicast; /* Destination Multicast Group. */ 27 bcm_gport_t extender_forward_id; /* Downstream forwarding id. */ 28 } bcm_compat657_extender_forward_t; 29 30 /* Create extender forwarding entry */ 31 extern int bcm_compat657_extender_forward_add( 32 int unit, 33 bcm_compat657_extender_forward_t *extender_forward_entry); 34 35 /* Delete extender forwarding entry. */ 36 extern int bcm_compat657_extender_forward_delete( 37 int unit, 38 bcm_compat657_extender_forward_t *extender_forward_entry); 39 40 /* Get extender forwarding entry information */ 41 extern int bcm_compat657_extender_forward_get( 42 int unit, 43 bcm_compat657_extender_forward_t *extender_forward_entry); 44 45 /* MPLS tunnel switch structure. */ 46 typedef struct bcm_compat657_mpls_tunnel_switch_s { 47 uint32 flags; /* BCM_MPLS_SWITCH_xxx. */ 48 bcm_mpls_label_t label; /* Incoming label value. */ 49 bcm_mpls_label_t second_label; /* Incoming second label. */ 50 bcm_gport_t port; /* Incoming port. */ 51 bcm_mpls_switch_action_t action; /* MPLS label action. */ 52 bcm_mpls_switch_action_t action_if_bos; /* MPLS label action if BOS. */ 53 bcm_mpls_switch_action_t action_if_not_bos; /* MPLS label action if not BOS. */ 54 bcm_multicast_t mc_group; /* P2MP Multicast group. */ 55 int exp_map; /* EXP-map ID. */ 56 int int_pri; /* Internal priority. */ 57 bcm_policer_t policer_id; /* Policer ID to be associated with the 58 incoming label. */ 59 bcm_vpn_t vpn; /* L3 VPN used if action is POP. */ 60 bcm_mpls_egress_label_t egress_label; /* Outgoing label information. */ 61 bcm_if_t egress_if; /* Outgoing egress object. */ 62 bcm_if_t ingress_if; /* Ingress Interface object. */ 63 int mtu; /* MTU. */ 64 int qos_map_id; /* QOS map identifier. */ 65 bcm_failover_t failover_id; /* Failover Object Identifier for 66 protected tunnel. Used for 1+1 67 protection also */ 68 bcm_gport_t tunnel_id; /* Tunnel ID. */ 69 bcm_gport_t failover_tunnel_id; /* Failover Tunnel ID. */ 70 bcm_if_t tunnel_if; /* hierarchical interface, relevant for 71 when action is 72 BCM_MPLS_SWITCH_ACTION_POP. */ 73 bcm_gport_t egress_port; /* Outgoing egress port. */ 74 uint16 oam_global_context_id; /* OAM global context id passed from 75 ingress to egress XGS chip. */ 76 uint32 class_id; /* Class ID */ 77 int inlif_counting_profile; /* In LIF counting profile */ 78 int ecn_map_id; /* ECN map identifier */ 79 int tunnel_term_ecn_map_id; /* Tunnel termination ecn map identifier */ 80 } bcm_compat657_mpls_tunnel_switch_t; 81 82 extern int bcm_compat657_mpls_tunnel_switch_add( 83 int unit, 84 bcm_compat657_mpls_tunnel_switch_t *info); 85 86 extern int bcm_compat657_mpls_tunnel_switch_create( 87 int unit, 88 bcm_compat657_mpls_tunnel_switch_t *info); 89 90 extern int bcm_compat657_mpls_tunnel_switch_delete( 91 int unit, 92 bcm_compat657_mpls_tunnel_switch_t *info); 93 94 extern int bcm_compat657_mpls_tunnel_switch_get( 95 int unit, 96 bcm_compat657_mpls_tunnel_switch_t *info); 97 #endif /* INCLUDE_L3 */ 98 /* Configuration for remote port */ 99 typedef struct bcm_compat657_port_e2efc_remote_port_config_s { 100 bcm_module_t remote_module; /* Remote module id that E2EFC applied */ 101 bcm_port_t remote_port; /* Remote port id to be configured */ 102 int xoff_threshold_bytes; /* Assert backpressure when number of buffers 103 used is at or above this threshold in bytes */ 104 int xoff_threshold_packets; /* Assert backpressure when number of buffers 105 used is at or above this threshold in packets */ 106 int xon_threshold_bytes; /* Remove backpressure when number of buffers 107 used drop below this threshold in bytes */ 108 int xon_threshold_packets; /* Remove backpressure when number of buffers 109 used drop below this threshold in packets */ 110 int drop_threshold_bytes; /* Drop packets when number of buffers used hit 111 this threshold in bytes */ 112 int drop_threshold_packets; /* Drop packets when number of buffers used hit 113 this threshold in packets */ 114 } bcm_compat657_port_e2efc_remote_port_config_t; 115 116 extern int bcm_compat657_port_e2efc_remote_port_add( 117 int unit, 118 bcm_compat657_port_e2efc_remote_port_config_t *e2efc_rport_cfg, 119 int *rport_handle_id); 120 121 122 extern int bcm_compat657_port_e2efc_remote_port_set( 123 int unit, 124 int rport_handle_id, 125 bcm_compat657_port_e2efc_remote_port_config_t *e2efc_rport_cfg); 126 extern int bcm_compat657_port_e2efc_remote_port_get( 127 int unit, 128 int rport_handle_id, 129 bcm_compat657_port_e2efc_remote_port_config_t *e2efc_rport_cfg); 130 131 #define BCM_COMPAT657_FIELD_QUALIFY_CNT (675) 132 #define BCM_COMPAT657_FIELD_USER_NUM_UDFS (93) 133 134 typedef struct bcm_compat657_field_qset_s { 135 SHR_BITDCL w[_SHR_BITDCLSIZE(BCM_COMPAT657_FIELD_QUALIFY_CNT + 136 BCM_COMPAT657_FIELD_USER_NUM_UDFS)]; 137 SHR_BITDCL udf_map[_SHR_BITDCLSIZE(BCM_COMPAT657_FIELD_USER_NUM_UDFS)]; 138 } bcm_compat657_field_qset_t; 139 140 extern int bcm_compat657_field_group_create( 141 int unit, 142 bcm_compat657_field_qset_t qset, 143 int pri, 144 bcm_field_group_t *group); 145 146 extern int bcm_compat657_field_group_create_id( 147 int unit, 148 bcm_compat657_field_qset_t qset, 149 int pri, 150 bcm_field_group_t group); 151 152 extern int bcm_compat657_field_qset_data_qualifier_add( 153 int unit, 154 bcm_compat657_field_qset_t *qset, 155 int qual_id); 156 157 #endif /* BCM_RPC_SUPPORT */ 158 159 #endif /* !_COMPAT_657_H */