compat_6518.h (110527B)
1 /* 2 * $Id: compat_6518.h,v 1.0 2019/04/03 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.18 routines 8 */ 9 10 #ifndef _COMPAT_6518_H_ 11 #define _COMPAT_6518_H_ 12 13 #ifdef BCM_RPC_SUPPORT 14 #include <bcm_int/compat/compat_6519.h> 15 #include <bcm/sat.h> 16 #include <bcm/types.h> 17 #include <bcm/mirror.h> 18 #if defined(INCLUDE_L3) 19 #include <bcm/tunnel.h> 20 #include <bcm/l3.h> 21 #include <bcm/flow.h> 22 #include <bcm/failover.h> 23 #include <bcm/vxlan.h> 24 #endif /* defined(INCLUDE_L3) */ 25 #include <bcm/udf.h> 26 #include <bcm/ecn.h> 27 #include <bcm/flexctr.h> 28 #include <bcm/cosq.h> 29 #include <bcm/field.h> 30 #include <bcm/switch.h> 31 #if defined(INCLUDE_BFD) 32 #include <bcm/bfd.h> 33 #endif /* defined(INCLUDE_BFD) */ 34 #include <bcm/vlan.h> 35 #include <bcm/fcoe.h> 36 #include <bcm/collector.h> 37 #include <bcm/l2.h> 38 #include <bcm/rx.h> 39 #include <bcm/srv6.h> 40 #include <bcm/port.h> 41 #include <bcm/cpri.h> 42 #include <bcm/oam.h> 43 44 /* 45 * Mirror destination Structure 46 * 47 * Contains information required for manipulating mirror destinations. 48 */ 49 typedef struct bcm_compat6518_mirror_destination_s { 50 bcm_gport_t mirror_dest_id; /* Unique mirror destination and 51 encapsulation identifier. */ 52 uint32 flags; /* See BCM_MIRROR_DEST_xxx flag 53 definitions. */ 54 bcm_gport_t gport; /* Mirror destination. */ 55 uint8 version; /* IP header version. */ 56 uint8 tos; /* Traffic Class/Tos byte. */ 57 uint8 ttl; /* Hop limit. */ 58 bcm_ip_t src_addr; /* Tunnel source ip address (IPv4). */ 59 bcm_ip_t dst_addr; /* Tunnel destination ip address (IPv4). */ 60 bcm_ip6_t src6_addr; /* Tunnel source ip address (IPv6). */ 61 bcm_ip6_t dst6_addr; /* Tunnel destination ip address (IPv6). */ 62 uint32 flow_label; /* IPv6 header flow label field. */ 63 bcm_mac_t src_mac; /* L2 source mac address. */ 64 bcm_mac_t dst_mac; /* L2 destination mac address. */ 65 uint16 tpid; /* L2 header outer TPID. */ 66 bcm_vlan_t vlan_id; /* Vlan id. */ 67 bcm_trill_name_t trill_src_name; /* TRILL source bridge nickname */ 68 bcm_trill_name_t trill_dst_name; /* TRILL destination bridge nickname */ 69 int trill_hopcount; /* TRILL hop count */ 70 uint16 niv_src_vif; /* Source Virtual Interface of NIV tag */ 71 uint16 niv_dst_vif; /* Destination Virtual Interface of NIV 72 tag */ 73 uint32 niv_flags; /* NIV flags BCM_MIRROR_NIV_XXX */ 74 uint16 gre_protocol; /* L3 GRE header protocol */ 75 bcm_policer_t policer_id; /* policer_id */ 76 int stat_id; /* stat_id */ 77 int stat_id2; /* stat_id2 for second counter pointer */ 78 bcm_if_t encap_id; /* Encapsulation index */ 79 bcm_if_t tunnel_id; /* IP tunnel for encapsulation. Valid 80 only if BCM_MIRROR_DEST_TUNNEL_IP_GRE 81 is set */ 82 uint16 span_id; /* SPAN-ID. Valid only if 83 BCM_MIRROR_DEST_TUNNEL_WITH_SPAN_ID 84 is set */ 85 uint8 pkt_prio; /* L2 header PCP */ 86 uint32 sample_rate_dividend; /* The probability of mirroring a packet 87 is: sample_rate_dividend >= 88 sample_rate_divisor ? 1 : 89 sample_rate_dividend / 90 sample_rate_divisor */ 91 uint32 sample_rate_divisor; 92 uint8 int_pri; /* Internal Priority */ 93 uint16 etag_src_vid; /* Extended (source) port vlan id */ 94 uint16 etag_dst_vid; /* Extended (destination) port vlan id */ 95 uint16 udp_src_port; /* UDP source port */ 96 uint16 udp_dst_port; /* UDP destination port */ 97 uint32 egress_sample_rate_dividend; /* The probability of outbound mirroring 98 a packet from the destination is 99 sample_rate_dividend >= 100 sample_rate_divisor ? 1 : 101 sample_rate_dividend / 102 sample_rate_divisor */ 103 uint32 egress_sample_rate_divisor; 104 uint8 recycle_context; /* recycle context of egress originating 105 packets */ 106 uint16 packet_copy_size; /* If non zero, the copied packet will 107 be truncated to the first 108 packet_copy_size . Current supported 109 values for DNX are 0, 64, 128, 192 */ 110 uint16 egress_packet_copy_size; /* If non zero and the packet is copied 111 from the egress, the packet will be 112 truncated to the first 113 packet_copy_size . Current supported 114 values for DNX are 0, 256. */ 115 bcm_mirror_pkt_header_updates_t packet_control_updates; 116 bcm_mirror_psc_t rtag; /* specify RTAG HASH algorithm used for 117 shared-id mirror destination */ 118 uint8 df; /* Set the do not fragment bit of IP 119 header in mirror encapsulation */ 120 uint8 truncate; /* Setting truncate would result in 121 mirroring a truncated frame */ 122 uint16 template_id; /* Template ID for IPFIX HDR */ 123 uint32 observation_domain; /* Observation domain for IPFIX HDR */ 124 uint32 is_recycle_strict_priority; /* Recycle priority (1-lossless, 0-high) */ 125 int ext_stat_id[BCM_MIRROR_EXT_STAT_ID_COUNT]; /* ext_stat_id to support statistic 126 interface for mirror packets. */ 127 uint32 flags2; /* See BCM_MIRROR_DEST_FLAGS2_xxx flag 128 definitions. */ 129 uint32 vni; /* Virtual Network Interface ID. */ 130 uint32 gre_seq_number; /* Sequence number value used in GRE 131 header. If no value is provided, 132 gre_seq_number will start with 0. 133 Valid only if 134 BCM_MIRROR_DEST_TUNNEL_IP_GRE is set. */ 135 bcm_mirror_pkt_erspan_encap_t erspan_header; /* ERSPAN encapsulation header fields. 136 Valid only if only 137 BCM_MIRROR_DEST_TUNNEL_IP_GRE is set. */ 138 uint32 initial_seq_number; /* Starting seq number in SFLOW or PSAMP 139 header */ 140 bcm_mirror_psamp_fmt2_meta_data_t meta_data_type; /* Type of item in 'meta_data' */ 141 uint16 meta_data; /* Actual value of class id or meta 142 data, based on 'meta_data_type' */ 143 int ext_stat_valid; /* Validates the ext_stat. */ 144 int ext_stat_type_id[BCM_MIRROR_EXT_STAT_ID_COUNT]; /* Type ids for statistic interface. */ 145 uint16 ipfix_version; /* IPFIX version number in PSAMP 146 encapsulation. */ 147 uint16 psamp_epoch; /* PSAMP epoch field. */ 148 int cosq; /* Queue id that mirror copy is enqueued 149 into. */ 150 } bcm_compat6518_mirror_destination_t; 151 152 /* Create a mirror (destination, encapsulation) pair. */ 153 extern int bcm_compat6518_mirror_destination_create( 154 int unit, 155 bcm_compat6518_mirror_destination_t *mirror_dest); 156 157 /* Get mirror (destination, encapsulation) pair. */ 158 extern int bcm_compat6518_mirror_destination_get( 159 int unit, 160 bcm_gport_t mirror_dest_id, 161 bcm_compat6518_mirror_destination_t *mirror_dest); 162 163 /* Mirror source structure. */ 164 typedef struct bcm_compat6518_mirror_source_s { 165 bcm_mirror_source_type_t type; /* Mirror source type. */ 166 uint32 flags; /* Mirror source flags only with port 167 source type. */ 168 bcm_port_t port; /* Port/gport id. */ 169 bcm_pkt_trace_event_t trace_event; /* Trace event. */ 170 bcm_pkt_drop_event_t drop_event; /* Drop event. */ 171 uint32 sample_profile_id; /* Sample profile id. */ 172 } bcm_compat6518_mirror_source_t; 173 174 /* Add a mirror destination to a mirror source. */ 175 extern int bcm_compat6518_mirror_source_dest_add( 176 int unit, 177 bcm_compat6518_mirror_source_t *source, 178 bcm_gport_t mirror_dest_id); 179 180 /* Delete a mirror destination from a mirror source. */ 181 extern int bcm_compat6518_mirror_source_dest_delete( 182 int unit, 183 bcm_compat6518_mirror_source_t *source, 184 bcm_gport_t mirror_dest_id); 185 186 /* Delete all mirror destinations applied on a mirror source. */ 187 extern int bcm_compat6518_mirror_source_dest_delete_all( 188 int unit, 189 bcm_compat6518_mirror_source_t *source); 190 191 /* Get all mirror destinations applied on a mirror source. */ 192 extern int bcm_compat6518_mirror_source_dest_get_all( 193 int unit, 194 bcm_compat6518_mirror_source_t *source, 195 int array_size, 196 bcm_gport_t *mirror_dest, 197 int *count); 198 #if defined(INCLUDE_L3) 199 200 /* 201 * L3 Interface Structure. 202 * 203 * Contains information required for manipulating L3 interfaces. 204 */ 205 typedef struct bcm_compat6518_l3_intf_s { 206 uint32 l3a_flags; /* See BCM_L3_FLAGS_XXX flags 207 definitions. */ 208 uint32 l3a_flags2; /* See BCM_L3_FLAGS2_XXX flags 209 definitions. */ 210 bcm_vrf_t l3a_vrf; /* Virtual router instance. */ 211 bcm_if_t l3a_intf_id; /* Interface ID. */ 212 bcm_mac_t l3a_mac_addr; /* MAC address. */ 213 bcm_vlan_t l3a_vid; /* VLAN ID. */ 214 bcm_vlan_t l3a_inner_vlan; /* Inner vlan for double tagged packets. */ 215 int l3a_tunnel_idx; /* Tunnel (initiator) index. */ 216 int l3a_ttl; /* TTL threshold. */ 217 int l3a_mtu; /* MTU. */ 218 int l3a_mtu_forwarding; /* Forwarding Layer MTU. */ 219 bcm_if_group_t l3a_group; /* Interface group number. */ 220 bcm_l3_intf_qos_t vlan_qos; /* Outer-Vlan QoS Setting. */ 221 bcm_l3_intf_qos_t inner_vlan_qos; /* Inner-Vlan QoS Setting. */ 222 bcm_l3_intf_qos_t dscp_qos; /* DSCP QoS Setting. */ 223 int l3a_intf_class; /* L3 interface class ID */ 224 int l3a_ip4_options_profile_id; /* IP4 Options handling Profile ID */ 225 int l3a_nat_realm_id; /* Realm id of the interface for NAT */ 226 uint16 outer_tpid; /* TPID value */ 227 uint32 l3a_intf_flags; /* See BCM_L3_INTF_XXX flag definitions. */ 228 uint8 native_routing_vlan_tags; /* Set number of VLAN tags expected when 229 interface is used for native routing */ 230 bcm_gport_t l3a_source_vp; /* Source virtual port in overlay 231 domain. SVP is used for deriving port 232 properties in the egress device when 233 packets are sent over HG flow. */ 234 uint32 flow_handle; /* FLOW handle for flex entries. */ 235 uint32 flow_option_handle; /* FLOW option handle for flex entries. */ 236 bcm_flow_logical_field_t logical_fields[BCM_FLOW_MAX_NOF_LOGICAL_FIELDS]; /* logical fields array for flex 237 entries. */ 238 uint32 num_of_fields; /* number of logical fields. */ 239 bcm_qos_ingress_model_t ingress_qos_model; /* ingress qos and ttl model */ 240 bcm_qos_egress_model_t egress_qos_model; /* egress qos and ttl model */ 241 uint32 stat_id; /* Object statistics ID. */ 242 int stat_pp_profile; /* Statistics profile. */ 243 uint8 l3a_ttl_dec; /* TTL decrement value. */ 244 int opaque_ctrl_id; /* Opqaue control ID for EFP key 245 selection. */ 246 } bcm_compat6518_l3_intf_t; 247 248 /* Create a new L3 interface. */ 249 extern int bcm_compat6518_l3_intf_create( 250 int unit, 251 bcm_compat6518_l3_intf_t *intf); 252 253 /* Delete an L3 interface */ 254 extern int bcm_compat6518_l3_intf_delete( 255 int unit, 256 bcm_compat6518_l3_intf_t *intf); 257 258 /* Search for L3 interface by MAC address and VLAN. */ 259 extern int bcm_compat6518_l3_intf_find( 260 int unit, 261 bcm_compat6518_l3_intf_t *intf); 262 263 /* Search for L3 interface by VLAN only. */ 264 extern int bcm_compat6518_l3_intf_find_vlan( 265 int unit, 266 bcm_compat6518_l3_intf_t *intf); 267 268 /* Given the L3 interface number, return the interface information. */ 269 extern int bcm_compat6518_l3_intf_get( 270 int unit, 271 bcm_compat6518_l3_intf_t *intf); 272 273 /* Set the tunneling initiator parameters on an L3 interface. */ 274 extern int bcm_compat6518_tunnel_initiator_set( 275 int unit, 276 bcm_compat6518_l3_intf_t *intf, 277 bcm_compat6519_tunnel_initiator_t *tunnel); 278 279 /* Set the tunneling initiator parameters on an L3 interface. */ 280 extern int bcm_compat6518_tunnel_initiator_create( 281 int unit, 282 bcm_compat6518_l3_intf_t *intf, 283 bcm_compat6519_tunnel_initiator_t *tunnel); 284 285 /* Delete the tunnel association for the given L3 interface. */ 286 extern int bcm_compat6518_tunnel_initiator_clear( 287 int unit, 288 bcm_compat6518_l3_intf_t *intf); 289 290 /* Get the tunnel property for the given L3 interface. */ 291 extern int bcm_compat6518_tunnel_initiator_get( 292 int unit, 293 bcm_compat6518_l3_intf_t *intf, 294 bcm_compat6519_tunnel_initiator_t *tunnel); 295 296 typedef struct bcm_compat6518_flow_port_encap_s { 297 bcm_gport_t flow_port; /* flow port id identifies DVP. */ 298 uint32 options; /* BCM_FLOW_PORT_ENCAP_xxx. */ 299 uint32 flags; /* BCM_FLOW_PORT_ENCAP_FLAG_xxx. */ 300 uint32 class_id; /* class id. */ 301 uint16 mtu; /* MTU. */ 302 uint32 network_group; /* network group ID */ 303 uint32 dvp_group; /* DVP group ID */ 304 uint8 pri; /* service tag priority. */ 305 uint8 cfi; /* service tag cfi */ 306 uint16 tpid; /* service tag tpid */ 307 bcm_vlan_t vlan; /* service VLAN ID. */ 308 bcm_if_t egress_if; /* egress object */ 309 uint32 valid_elements; /* bitmap of valid fields for hardware 310 parameters */ 311 bcm_flow_handle_t flow_handle; /* flow handle */ 312 uint32 flow_option; /* flow option id */ 313 uint16 ip4_id; /* IPv4 ID */ 314 int vlan_pri_map_id; /* Remarking map ID for the payload VLAN 315 priority and CFI. */ 316 } bcm_compat6518_flow_port_encap_t; 317 318 extern int bcm_compat6518_flow_port_encap_set( 319 int unit, 320 bcm_compat6518_flow_port_encap_t *info, 321 uint32 num_of_fields, 322 bcm_flow_logical_field_t *field); 323 324 extern int bcm_compat6518_flow_port_encap_get( 325 int unit, 326 bcm_compat6518_flow_port_encap_t *info, 327 uint32 num_of_fields, 328 bcm_flow_logical_field_t *field); 329 330 typedef struct bcm_compat6518_mpls_tunnel_encap_s { 331 bcm_gport_t tunnel_id; /* Tunnel ID. */ 332 int num_labels; /* Number of labels to be added. */ 333 bcm_mpls_egress_label_t label_array[BCM_MPLS_EGRESS_LABEL_MAX]; /* Label info. */ 334 } bcm_compat6518_mpls_tunnel_encap_t; 335 336 extern int bcm_compat6518_mpls_tunnel_encap_create( 337 int unit, 338 uint32 options, 339 bcm_compat6518_mpls_tunnel_encap_t *tunnel_encap); 340 341 extern int bcm_compat6518_mpls_tunnel_encap_get( 342 int unit, 343 bcm_compat6518_mpls_tunnel_encap_t *tunnel_encap); 344 345 /* MPLS port type <= 6.5.18. */ 346 typedef struct bcm_compat6518_mpls_port_s { 347 bcm_gport_t mpls_port_id; /* GPORT identifier. */ 348 uint32 flags; /* BCM_MPLS_PORT_xxx. */ 349 uint32 flags2; /* BCM_MPLS_PORT2_xxx. */ 350 int if_class; /* Interface class ID. */ 351 int exp_map; /* Incoming EXP map ID. */ 352 int int_pri; /* Internal priority. */ 353 uint8 pkt_pri; /* Packet priority. */ 354 uint8 pkt_cfi; /* Packet CFI. */ 355 uint16 service_tpid; /* Service VLAN TPID value. */ 356 bcm_gport_t port; /* Match port and/or egress port. */ 357 bcm_mpls_port_match_t criteria; /* Match criteria. */ 358 bcm_vlan_t match_vlan; /* Outer VLAN ID to match. */ 359 bcm_vlan_t match_inner_vlan; /* Inner VLAN ID to match. */ 360 bcm_mpls_label_t match_label; /* VC label to match. */ 361 bcm_if_t egress_tunnel_if; /* MPLS tunnel egress object. */ 362 bcm_mpls_egress_label_t egress_label; /* Outgoing VC label. */ 363 int mtu; /* MPLS port MTU. */ 364 bcm_vlan_t egress_service_vlan; /* Service VLAN to Add/Replace. */ 365 uint32 pw_seq_number; /* Initial-value of Pseudo-wire Sequence 366 number */ 367 bcm_if_t encap_id; /* Encap Identifier. */ 368 bcm_failover_t ingress_failover_id; /* Ingress Failover Object Identifier. */ 369 bcm_gport_t ingress_failover_port_id; /* Ingress Failover MPLS Port 370 Identifier. */ 371 bcm_failover_t failover_id; /* Failover Object Identifier. */ 372 bcm_gport_t failover_port_id; /* Failover MPLS Port Identifier. */ 373 bcm_policer_t policer_id; /* Policer ID to be associated with the 374 MPLS gport */ 375 bcm_multicast_t failover_mc_group; /* MC group used for bi-cast. */ 376 bcm_failover_t pw_failover_id; /* Failover Object Identifier for 377 Redundant PW. */ 378 bcm_gport_t pw_failover_port_id; /* Redundant PW port Identifier. */ 379 bcm_mpls_port_control_channel_type_t vccv_type; /* Indicate VCCV Control Channel */ 380 bcm_switch_network_group_t network_group_id; /* Split Horizon network group 381 identifier */ 382 bcm_vlan_t match_subport_pkt_vid; /* LLTAG VLAN ID to match. */ 383 bcm_gport_t tunnel_id; /* Tunnel Id pointing to ingress LSP. */ 384 bcm_gport_t per_flow_queue_base; /* Base queue of the per flow queue set. 385 Actual queue is decided based on 386 internal priority and qos map. */ 387 int qos_map_id; /* QOS map identifier. */ 388 bcm_failover_t egress_failover_id; /* Failover object index for Egress 389 Protection */ 390 bcm_gport_t egress_failover_port_id; /* Failover MPLS Port identifier for 391 Egress Protection */ 392 int ecn_map_id; /* ECN map identifier. */ 393 uint32 class_id; /* Class ID */ 394 uint32 egress_class_id; /* Egress Class ID */ 395 int inlif_counting_profile; /* In LIF counting profile */ 396 bcm_mpls_egress_label_t egress_tunnel_label; /* A mpls tunnel to be binded with the 397 pwe */ 398 int nof_service_tags; /* Number of Service-Tags expected on 399 Native-ETH header */ 400 bcm_qos_ingress_model_t ingress_qos_model; /* ingress qos&ttl model */ 401 bcm_mpls_label_t context_label; /* Ingress match - context label. */ 402 bcm_if_t ingress_if; /* Ingress match - context interface. */ 403 } bcm_compat6518_mpls_port_t; 404 405 extern int bcm_compat6518_mpls_port_add( 406 int unit, 407 bcm_vpn_t vpn, 408 bcm_compat6518_mpls_port_t *mpls_port); 409 410 extern int bcm_compat6518_mpls_port_get( 411 int unit, 412 bcm_vpn_t vpn, 413 bcm_compat6518_mpls_port_t *mpls_port); 414 415 extern int bcm_compat6518_mpls_port_get_all( 416 int unit, 417 bcm_vpn_t vpn, 418 int port_max, 419 bcm_compat6518_mpls_port_t *port_array, 420 int *port_count); 421 422 #endif /* defined(INCLUDE_L3) */ 423 424 /* Packet format based UDF specification structure. */ 425 typedef struct bcm_compat6518_udf_pkt_format_info_s { 426 int prio; /* Priority of the UDF */ 427 bcm_ethertype_t ethertype; /* EtherType in the packet */ 428 bcm_ethertype_t ethertype_mask; /* EtherType Mask */ 429 uint8 ip_protocol; /* IP protocol field in the packet */ 430 uint8 ip_protocol_mask; /* IP protocol Mask */ 431 uint16 l2; /* L2 packet format. 432 (BCM_PKT_FORMAT_L2_XXX) */ 433 uint16 vlan_tag; /* Vlan tag format. 434 (BCM_PKT_FORMAT_VLAN_XXX) */ 435 uint16 outer_ip; /* Outer IP header type. 436 (BCM_PKT_FORMAT_IP_XXX) */ 437 uint16 inner_ip; /* Inner IP header type. 438 (BCM_PKT_FORMAT_IP_XXX) */ 439 uint16 tunnel; /* Tunnel type. 440 (BCM_PKT_FORMAT_TUNNEL_XXX) */ 441 uint16 mpls; /* Mpls labels. 442 (BCM_PKT_FORMAT_MPLS_XXX) */ 443 uint16 fibre_chan_outer; /* Fibre Channel outer header type. 444 (BCM_PKT_FORMAT_FIBRE_CHAN_XXX) */ 445 uint16 fibre_chan_inner; /* Fibre Channel inner header 446 type.(BCM_PKT_FORMAT_FIBRE_CHAN_XXX) */ 447 uint16 higig; /* HIGIG packet 448 format.(BCM_PKT_FORMAT_HIGIG_XXX) */ 449 uint16 vntag; /* NIV packet 450 format.(BCM_PKT_FORMAT_VNTAG_XXX) */ 451 uint16 etag; /* Extender tag packet 452 format.(BCM_PKT_FORMAT_ETAG_XXX) */ 453 uint16 cntag; /* CNTAG packet 454 format.(BCM_PKT_FORMAT_CNTAG_XXX) */ 455 uint16 icnm; /* ICNM packet 456 format.(BCM_PKT_FORMAT_ICNM_XXX) */ 457 uint16 subport_tag; /* SUBPORT_TAG packet format. 458 (BCM_PKT_FORMAT_SUBPORT_TAG_XXX) */ 459 int class_id; /* id used by the IFP Key Selection 460 Mechanism. Range 0~255 */ 461 uint16 inner_protocol; /* Inner protocol field in the packet. 462 Inner_ip should be set to 463 BCM_PKT_FORMAT_IP_NONE to make this 464 take effect. IP-IN-IP type GRE should 465 take original API sequence. */ 466 uint16 inner_protocol_mask; /* Inner protocol mask. */ 467 uint32 l4_dst_port; /* TCP or UDP Destination Port number. */ 468 uint32 l4_dst_port_mask; /* TCP or UDP Destination Port number 469 mask. */ 470 uint8 opaque_tag_type; /* Tag type field in the opaque tag. */ 471 uint8 opaque_tag_type_mask; /* Mask for tag type field in the opaque 472 tag. */ 473 uint8 int_pkt; /* Inband Telemetry packet indicator. */ 474 uint8 src_port; /* Logical Source Port number. */ 475 uint8 src_port_mask; /* Logical Source Port number mask. */ 476 uint8 lb_pkt_type; /* Loopback Packet Type. 477 (BCM_PKT_FORMAT_LB_TYPE_XXX) */ 478 uint16 first_2bytes_after_mpls_bos; /* First 2 bytes after BOS in an mpls 479 packet. */ 480 uint16 first_2bytes_after_mpls_bos_mask; /* Mask for first 2 bytes after BOS in 481 an mpls packet. */ 482 } bcm_compat6518_udf_pkt_format_info_t; 483 484 /* Create a packet format entry */ 485 extern int bcm_compat6518_udf_pkt_format_create( 486 int unit, 487 bcm_udf_pkt_format_options_t options, 488 bcm_compat6518_udf_pkt_format_info_t *pkt_format, 489 bcm_udf_pkt_format_id_t *pkt_format_id); 490 491 /* Retrieve packet format info given the packet format Id */ 492 extern int bcm_compat6518_udf_pkt_format_info_get( 493 int unit, 494 bcm_udf_pkt_format_id_t pkt_format_id, 495 bcm_compat6518_udf_pkt_format_info_t *pkt_format); 496 497 /* QoS Map structure */ 498 typedef struct bcm_compat6518_qos_map_s { 499 uint8 pkt_pri; /* Packet priority */ 500 uint8 pkt_cfi; /* Packet CFI */ 501 int dscp; /* Packet DSCP */ 502 int exp; /* Packet EXP */ 503 int int_pri; /* Internal priority */ 504 bcm_color_t color; /* Color */ 505 int remark_int_pri; /* (internal) remarking priority */ 506 bcm_color_t remark_color; /* (internal) remark color */ 507 int policer_offset; /* Offset based on pri/cos to fetch a policer */ 508 int queue_offset; /* Offset based on int_pri to fetch cosq for 509 subscriber ports */ 510 int port_offset; /* Offset based on port connection for indexing 511 into the action table */ 512 uint8 etag_pcp; /* ETAG PCP field */ 513 uint8 etag_de; /* ETAG DE field */ 514 int counter_offset; /* Offset based on priority for indexing into 515 the loss measurement counter table */ 516 int inherited_dscp_exp; /* Inherited DSCP EXP value */ 517 uint32 opcode; /* Set QOS Map Opcode ID */ 518 uint8 inner_pkt_pri; /* Inner Tag Packet priority */ 519 uint8 inner_pkt_cfi; /* Inner Tag Packet CFI */ 520 uint8 int_cn; /* Internal congestion notification. */ 521 uint8 pkt_ecn; /* Packet explicit congestion notification. */ 522 uint8 responsive; /* Responsive flow(like TCP). */ 523 uint8 latency_marked; /* Packet marked with latency congestion. */ 524 } bcm_compat6518_qos_map_t; 525 526 /* bcm_qos_map_add */ 527 extern int bcm_compat6518_qos_map_add( 528 int unit, 529 uint32 flags, 530 bcm_compat6518_qos_map_t *map, 531 int map_id); 532 533 /* bcm_qos_map_multi_get */ 534 extern int bcm_compat6518_qos_map_multi_get( 535 int unit, 536 uint32 flags, 537 int map_id, 538 int array_size, 539 bcm_compat6518_qos_map_t *array, 540 int *array_count); 541 542 /* bcm_qos_map_delete */ 543 extern int bcm_compat6518_qos_map_delete( 544 int unit, 545 uint32 flags, 546 bcm_compat6518_qos_map_t *map, 547 int map_id); 548 549 /* ECN traffic action configuration. 550 * 551 * Contains information required for assigning the actions of ECN traffic. 552 */ 553 typedef struct bcm_compat6518_ecn_traffic_action_config_s { 554 uint32 action_type; /* See BCM_ECN_TRAFFIC_ACTION_TYPE_XXX flag definitions. */ 555 uint32 action_flags; /* See BCM_ECN_TRAFFIC_ACTION_XXX flag definitions. */ 556 int int_cn; /* Internal congestion notification. */ 557 bcm_color_t color; /* Packet color. */ 558 uint8 ecn; /* ECN value of packet;s IP header. */ 559 uint8 new_ecn; /* New ECN value for remarking. */ 560 int congested_int_cn; /* New int_cn to be updated when the congestion is experienced. */ 561 int non_congested_int_cn; /* New int_cn to be updated when the congestion is not experienced. */ 562 int responsive; /* New responsive value to be used in the egress pipeline. */ 563 } bcm_compat6518_ecn_traffic_action_config_t; 564 565 /* Assign/Retrieve the actions to the specified ECN traffic. */ 566 extern int bcm_compat6518_ecn_traffic_action_config_get( 567 int unit, 568 bcm_compat6518_ecn_traffic_action_config_t *ecn_config); 569 570 /* Assign/Retrieve the actions to the specified ECN traffic. */ 571 extern int bcm_compat6518_ecn_traffic_action_config_set( 572 int unit, 573 bcm_compat6518_ecn_traffic_action_config_t *ecn_config); 574 575 /* ECN traffic map info. */ 576 typedef struct bcm_compat6518_ecn_traffic_map_info_s { 577 uint32 flags; /* BCM_ECN_TRAFFIC_MAP_XXX flag definitions. */ 578 uint8 ecn; /* ECN value of packet's IP header. */ 579 int int_cn; /* Mapped internal congestion notification(int_cn) value. */ 580 uint8 tunnel_ecn; /* ECN information of packet's tunnel header. */ 581 bcm_ecn_traffic_map_tunnel_type_t tunnel_type; /* Tunnel type. */ 582 } bcm_compat6518_ecn_traffic_map_info_t; 583 584 /* To set/get the mapped internal congestion notification (int_cn). */ 585 extern int bcm_compat6518_ecn_traffic_map_get( 586 int unit, 587 bcm_compat6518_ecn_traffic_map_info_t *map); 588 589 /* To set/get the mapped internal congestion notification (int_cn). */ 590 extern int bcm_compat6518_ecn_traffic_map_set( 591 int unit, 592 bcm_compat6518_ecn_traffic_map_info_t *map); 593 594 #if defined(INCLUDE_L3) 595 /* MPLS ECN Map Structure. */ 596 typedef struct bcm_compat6518_ecn_map_s { 597 uint32 action_flags; /* action flags for ECN map. */ 598 int int_cn; /* Internal congestion. */ 599 uint8 inner_ecn; /* IP ECN value in payload. */ 600 uint8 ecn; /* IP ECN value. */ 601 uint8 exp; /* Mpls EXP value. */ 602 uint8 new_ecn; /* New ECN value. */ 603 uint8 new_exp; /* New EXP value. */ 604 uint32 nonip_action_flags; /* action flags for Non-ip ECN map. */ 605 } bcm_compat6518_ecn_map_t; 606 607 /* To set an ECN mapping entry in an ECN mapping profile. */ 608 extern int bcm_compat6518_ecn_map_set( 609 int unit, 610 uint32 options, 611 int ecn_map_id, 612 bcm_compat6518_ecn_map_t *ecn_map); 613 614 /* To get an ECN mapping entry from an ECN mapping profile. */ 615 extern int bcm_compat6518_ecn_map_get( 616 int unit, 617 int ecn_map_id, 618 bcm_compat6518_ecn_map_t *ecn_map); 619 620 /* Per DLB configuration of monitoring parameters. */ 621 typedef struct bcm_compat6518_l3_ecmp_dlb_mon_cfg_s { 622 uint32 sample_rate; /* Rate of sampling DLB monitored packets */ 623 int action; /* Either BCM_L3_ECMP_DLB_MON_COPY_TO_CPU or BCM_L3_ECMP_DLB_MON_MIRROR or BCM_L3_ECMP_DLB 624 _MON_COPY_TO_CPU_AND_MIRROR or BCM_L3_ECMP_DLB_MON_ACTION_NONE or BCM_L3_ECMP_DLB_MON_TRACE */ 625 int enable; /* Enable monitoring of DLB associated with the ECMP group. 1 = Enable monitoring for DLB 626 associated with ecmp, 0 = Do not monitor DLB */ 627 } bcm_compat6518_l3_ecmp_dlb_mon_cfg_t; 628 629 /* Configure monitoring parameters for a DLB corresponding to a ECMP interface */ 630 extern int bcm_compat6518_l3_ecmp_dlb_mon_config_set( 631 int unit, 632 bcm_if_t ecmp_intf, 633 bcm_compat6518_l3_ecmp_dlb_mon_cfg_t *dlb_mon_cfg); 634 635 /* Retrieve monitoring parameters for a DLB corresponding to a ECMP interface */ 636 extern int bcm_compat6518_l3_ecmp_dlb_mon_config_get( 637 int unit, 638 bcm_if_t intf, 639 bcm_compat6518_l3_ecmp_dlb_mon_cfg_t *dlb_mon_cfg); 640 641 #endif /* defined(INCLUDE_L3) */ 642 #if defined(INCLUDE_BFD) 643 /* BFD endpoint object. */ 644 typedef struct bcm_compat6518_bfd_endpoint_info_s { 645 uint32 flags; /* Control flags. */ 646 bcm_bfd_endpoint_t id; /* Endpoint identifier. */ 647 bcm_bfd_endpoint_t remote_id; /* Remote endpoint identifier. */ 648 bcm_bfd_tunnel_type_t type; /* Type of BFD encapsulation. */ 649 bcm_gport_t gport; /* Gport identifier. */ 650 bcm_gport_t tx_gport; /* TX gport associated with this endpoint. */ 651 bcm_gport_t remote_gport; /* Gport identifier of trapping destination: OAMP or CPU, local or remote. */ 652 int bfd_period; /* For local endpoints, this is the BFD transmission period in ms. */ 653 bcm_vpn_t vpn; /* VPN. */ 654 uint8 vlan_pri; /* VLAN tag priority. */ 655 uint8 inner_vlan_pri; /* Inner VLAN tag priority. */ 656 bcm_vrf_t vrf_id; /* Vrf identifier. */ 657 bcm_ip_t dst_ip_addr; /* Destination IPv4 address. */ 658 bcm_ip6_t dst_ip6_addr; /* Destination IPv6 address. */ 659 bcm_ip_t src_ip_addr; /* Source IPv4 address. */ 660 bcm_ip6_t src_ip6_addr; /* Source IPv6 address. */ 661 uint8 ip_tos; /* IPv4 Tos / IPv6 Traffic Class. */ 662 uint8 ip_ttl; /* IPv4 TTL / IPv6 Hop Count. */ 663 bcm_ip_t inner_dst_ip_addr; /* Inner destination IPv4 address. */ 664 bcm_ip6_t inner_dst_ip6_addr; /* Inner destination IPv6 address. */ 665 bcm_ip_t inner_src_ip_addr; /* Inner source IPv4 address. */ 666 bcm_ip6_t inner_src_ip6_addr; /* Inner source IPv6 address. */ 667 uint8 inner_ip_tos; /* Inner IPv4 Tos / IPv6 Traffic Class. */ 668 uint8 inner_ip_ttl; /* Inner IPv4 TTL / IPv6 Hop Count. */ 669 uint32 udp_src_port; /* UDP source port for Ipv4, Ipv6. */ 670 bcm_mpls_label_t label; /* Incoming inner label. */ 671 bcm_mpls_egress_label_t egress_label; /* The MPLS outgoing label information. */ 672 bcm_if_t egress_if; /* Egress interface. */ 673 uint8 mep_id[BCM_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CC/CV TLV and Source MEP ID. */ 674 uint8 mep_id_length; /* Length of MPLS-TP CC/CV TLV and MEP-ID. */ 675 bcm_cos_t int_pri; /* Egress queuing for outgoing BFD to remote. */ 676 uint8 cpu_qid; /* CPU queue for BFD. */ 677 bcm_bfd_state_t local_state; /* Local session state. */ 678 uint32 local_discr; /* Local discriminator. */ 679 bcm_bfd_diag_code_t local_diag; /* Local diagnostic code. */ 680 uint32 local_flags; /* Flags combination on outgoing frames. */ 681 uint32 local_min_tx; /* Desired local min tx interval. */ 682 uint32 local_min_rx; /* Required local rx interval. */ 683 uint32 local_min_echo; /* Local minimum echo interval. */ 684 uint8 local_detect_mult; /* Local detection interval multiplier. */ 685 bcm_bfd_auth_type_t auth; /* Authentication type. */ 686 uint32 auth_index; /* Authentication index. */ 687 uint32 tx_auth_seq; /* Tx authentication sequence id. */ 688 uint32 rx_auth_seq; /* Rx authentication sequence id. */ 689 uint32 remote_flags; /* Remote flags. */ 690 bcm_bfd_state_t remote_state; /* Remote session state. */ 691 uint32 remote_discr; /* Remote discriminator. */ 692 bcm_bfd_diag_code_t remote_diag; /* Remote diagnostic code. */ 693 uint32 remote_min_tx; /* Desired remote min tx interval. */ 694 uint32 remote_min_rx; /* Required remote rx interval. */ 695 uint32 remote_min_echo; /* Remote minimum echo interval. */ 696 uint8 remote_detect_mult; /* Remote detection interval multiplier. */ 697 int sampling_ratio; /* 0 - No packets sampled to the CPU. 1-8 - Count of packets (with events) that need to arrive before one is sampled to the CPU. */ 698 uint8 loc_clear_threshold; /* Number of packets required to reset the Loss-of-Continuity status per endpoint. */ 699 uint32 ip_subnet_length; /* The subnet length for incoming packet validity check. Value 0 indicates no check is performed, positive values indicate the amount of MSBs to be compared. */ 700 uint8 remote_mep_id[BCM_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CC/CV TLV and Remote MEP ID. */ 701 uint8 remote_mep_id_length; /* Length of MPLS-TP CC/CV TLV and REMOTE MEP-ID. */ 702 uint8 mis_conn_mep_id[BCM_BFD_ENDPOINT_MAX_MEP_ID_LENGTH]; /* MPLS-TP CC/CV TLV and Mis connectivity MEP ID. */ 703 uint8 mis_conn_mep_id_length; /* Length of MPLS-TP CC/CV TLV and Mis connectivity MEP-ID. */ 704 uint32 bfd_detection_time; /* Optional: BFD Detection Time, in microseconds. */ 705 bcm_vlan_t pkt_vlan_id; /* TX Packet Vlan Id. */ 706 bcm_vlan_t rx_pkt_vlan_id; /* RX Packet Vlan Id. */ 707 bcm_mpls_label_t gal_label; /* MPLS GAL label. */ 708 uint32 faults; /* Fault flags. */ 709 uint32 flags2; /* Second set of control flags. */ 710 int ipv6_extra_data_index; /* Pointer to first extended data entry */ 711 int punt_good_packet_period; /* BFD good packets sampling period. Every punt_good_packet_period milliseconds, a single packet is punted to the CPU */ 712 uint8 bfd_period_cluster; /* Tx period group. All MEPs in a group must be created with the same Tx period. Modifying the Tx period in one MEP affects the others. */ 713 } bcm_compat6518_bfd_endpoint_info_t; 714 715 /* Create or update an BFD endpoint object */ 716 extern int bcm_compat6518_bfd_endpoint_create( 717 int unit, 718 bcm_compat6518_bfd_endpoint_info_t *endpoint_info); 719 720 /* Get an BFD endpoint object. */ 721 extern int bcm_compat6518_bfd_endpoint_get( 722 int unit, 723 bcm_bfd_endpoint_t endpoint, 724 bcm_compat6518_bfd_endpoint_info_t *endpoint_info); 725 #endif /* defined(INCLUDE_BFD) */ 726 727 /* OAM action key. */ 728 typedef struct bcm_compat6518_oam_action_key_s { 729 uint32 flags; 730 bcm_oam_opcode_t opcode; 731 bcm_oam_dest_mac_type_t dest_mac_type; 732 bcm_oam_match_type_t endpoint_type; 733 uint8 inject; 734 } bcm_compat6518_oam_action_key_t; 735 736 /* Function return action. */ 737 extern int bcm_compat6518_oam_profile_action_get( 738 int unit, 739 uint32 flags, 740 bcm_oam_profile_t profile_id, 741 bcm_compat6518_oam_action_key_t *oam_action_key, 742 bcm_oam_action_result_t *oam_action_result); 743 744 /* Function return action. */ 745 extern int bcm_compat6518_oam_profile_action_set( 746 int unit, 747 uint32 flags, 748 bcm_oam_profile_t profile_id, 749 bcm_compat6518_oam_action_key_t *oam_action_key, 750 bcm_oam_action_result_t *oam_action_result); 751 752 /* 753 * Flex counter index operation structure. 754 * 755 * This data structure lists the operation of a flex counter index. 756 * Flex counter index would be generated as below: 757 * value0 = (SEL(object0) >> shift0) & ((1 << mask_size0) - 1)). 758 * value1 = (SEL(object1) & ((1 << mask_size1) - 1)) << shift1. 759 * index = (value1 | value0). 760 */ 761 typedef struct bcm_compat6518_flexctr_index_operation_s { 762 bcm_flexctr_object_t object[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Flex counter object array. */ 763 uint32 quant_id[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Quantization ID. */ 764 uint8 mask_size[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Object mask size array. */ 765 uint8 shift[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Object shift array. */ 766 } bcm_compat6518_flexctr_index_operation_t; 767 768 /* 769 * Flex counter value operation structure. 770 * 771 * This data structure lists the operation of a flex counter update 772 * value. 773 * Flex counter update value would be generated as below: 774 * value0 = (SEL(object0) >> shift0) & ((1 << mask_size0) - 1)). 775 * value1 = (SEL(object1) & ((1 << mask_size1) - 1)) << shift1. 776 * value = (value1 | value0). 777 * New_counter = UPDATE_TYPE(old_counter, value). 778 */ 779 typedef struct bcm_compat6518_flexctr_value_operation_s { 780 bcm_flexctr_value_select_t select; /* Select counter value. */ 781 bcm_flexctr_object_t object[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Flex counter object array. */ 782 uint32 quant_id[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Quantization ID. */ 783 uint8 mask_size[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Object mask size array. */ 784 uint8 shift[BCM_FLEXCTR_OPERATION_OBJECT_SIZE]; /* Object shift array. */ 785 bcm_flexctr_value_operation_type_t type; /* Counter value operation type. */ 786 } bcm_compat6518_flexctr_value_operation_t; 787 788 /* 789 * Flex counter trigger structure. 790 * 791 * This data structure lists the properties of the flex counter trigger. 792 */ 793 typedef struct bcm_compat6518_flexctr_trigger_s { 794 bcm_flexctr_trigger_type_t trigger_type; /* Trigger type. */ 795 uint8 period_num; /* Time trigger period number. */ 796 bcm_flexctr_trigger_interval_t interval; /* Time trigger interval scale. */ 797 bcm_flexctr_object_t object; /* Flex counter object. */ 798 uint16 object_value_start; /* Conditional trigger start value. */ 799 uint16 object_value_stop; /* Conditional trigger stop value. */ 800 uint16 object_value_mask; /* Conditional trigger mask. */ 801 } bcm_compat6518_flexctr_trigger_t; 802 803 /* 804 * Flex counter action structure. 805 * 806 * This data structure lists the properties of a flex counter action. 807 */ 808 typedef struct bcm_compat6518_flexctr_action_s { 809 uint32 flags; /* Action flags. */ 810 bcm_flexctr_source_t source; /* Flex counter source. */ 811 bcm_pbmp_t ports; /* Flex counter ports. */ 812 int hint; /* Flex counter hint. */ 813 bcm_flexctr_drop_count_mode_t drop_count_mode; /* Counter drop mode for functional 814 packet drops. */ 815 int exception_drop_count_enable; /* Enable to count on hardware exception 816 drops. */ 817 int egress_mirror_count_enable; /* Enable to count egress mirrored 818 packets also. */ 819 bcm_flexctr_counter_mode_t mode; /* Action mode. */ 820 uint32 index_num; /* Total counter index number. */ 821 bcm_compat6518_flexctr_index_operation_t index_operation; /* Flex counter index operation 822 structure. */ 823 bcm_compat6518_flexctr_value_operation_t operation_a; /* Flex counter value A operation 824 structure. */ 825 bcm_compat6518_flexctr_value_operation_t operation_b; /* Flex counter value B operation 826 structure. */ 827 bcm_compat6518_flexctr_trigger_t trigger; /* Flex counter trigger structure. */ 828 } bcm_compat6518_flexctr_action_t; 829 830 /* Flex counter action creation function. */ 831 extern int bcm_compat6518_flexctr_action_create( 832 int unit, 833 int options, 834 bcm_compat6518_flexctr_action_t *action, 835 uint32 *stat_counter_id); 836 837 /* Flex counter action get function. */ 838 extern int bcm_compat6518_flexctr_action_get( 839 int unit, 840 uint32 stat_counter_id, 841 bcm_compat6518_flexctr_action_t *action); 842 843 /* 844 * Flex counter quantization structure. 845 * 846 * This data structure lists the properties of a flex counter 847 * quantization. 848 * Each quantization instance generates a range check result. 849 */ 850 typedef struct bcm_compat6518_flexctr_quantization_s { 851 bcm_flexctr_object_t object; /* Flex counter object. */ 852 bcm_pbmp_t ports; /* Flex counter ports. */ 853 uint32 range_check_min[BCM_FLEXCTR_QUANTIZATION_RANGE_SIZE]; /* Range check min value array. */ 854 uint32 range_check_max[BCM_FLEXCTR_QUANTIZATION_RANGE_SIZE]; /* Range check max value array. */ 855 uint8 range_num; /* Total range check number */ 856 } bcm_compat6518_flexctr_quantization_t; 857 858 /* Flex counter quantization creation function. */ 859 extern int bcm_compat6518_flexctr_quantization_create( 860 int unit, 861 int options, 862 bcm_compat6518_flexctr_quantization_t *quantization, 863 uint32 *quant_id); 864 865 /* Flex counter quantization get function. */ 866 extern int bcm_compat6518_flexctr_quantization_get( 867 int unit, 868 uint32 quant_id, 869 bcm_compat6518_flexctr_quantization_t *quantization); 870 871 /* EBST data buffer info structure */ 872 typedef struct bcm_compat6518_cosq_ebst_data_entry_s { 873 uint64 timestamp; /* Timestamp */ 874 uint32 bytes; /* Buffer occupancy level in bytes */ 875 } bcm_compat6518_cosq_ebst_data_entry_t; 876 877 /* Get EBST stat for a given stat Id. */ 878 extern int bcm_compat6518_cosq_ebst_data_get( 879 int unit, 880 bcm_cosq_object_id_t *object_id, 881 bcm_bst_stat_id_t bid, 882 int array_size, 883 bcm_compat6518_cosq_ebst_data_entry_t *entry_array, 884 int *count); 885 886 /* 887 * Packet control action structure, common for integrity check API and 888 * protocol control API. 889 */ 890 typedef struct bcm_compat6518_switch_pkt_control_action_t_s { 891 uint8 discard; /* Packet is discarded. */ 892 uint8 copy_to_cpu; /* Packet is copied to CPU. */ 893 uint8 flood; /* Packet is flooded to the forwarding domain. */ 894 uint8 bpdu; /* Packet is BPDU. */ 895 uint8 opaque_ctrl_id; /* Opaque control ID. */ 896 } bcm_compat6518_switch_pkt_control_action_t; 897 898 /* Packet protocol match structure. */ 899 typedef struct bcm_compat6518_switch_pkt_protocol_match_s { 900 uint8 l2_iif_opaque_ctrl_id; /* L2 iif based control id. */ 901 uint8 l2_iif_opaque_ctrl_id_mask; /* L2 iif based control id mask. */ 902 bcm_vlan_t vfi; /* Virtual forwarding instance. */ 903 bcm_vlan_t vfi_mask; /* VFI mask. */ 904 bcm_mac_t macda; /* Destination MAC address. */ 905 bcm_mac_t macda_mask; /* Destination MAC address mask. */ 906 uint16 ethertype; /* Ethernet type. */ 907 uint16 ethertype_mask; /* Ethernet type mask. */ 908 uint16 arp_rarp_opcode; /* ARP/RARP packet operation code. */ 909 uint16 arp_rarp_opcode_mask; /* ARP/RARP packet operation code mask. */ 910 uint8 icmp_type; /* ICMP type. */ 911 uint8 icmp_type_mask; /* ICMP type mask. */ 912 uint8 igmp_type; /* IGMP type. */ 913 uint8 igmp_type_mask; /* IGMP type mask. */ 914 uint8 l4_valid; /* If set, layer 4 header present. */ 915 uint8 l4_valid_mask; /* L4_valid mask. */ 916 uint16 l4_src_port; /* Layer 4 source port. */ 917 uint16 l4_src_port_mask; /* Layer 4 source port mask. */ 918 uint16 l4_dst_port; /* Layer 4 destination port. */ 919 uint16 l4_dst_port_mask; /* Layer 4 destination port mask. */ 920 uint16 l5_bytes_0_1; /* First 2 bytes of layer 5 header. */ 921 uint16 l5_bytes_0_1_mask; /* L5_bytes_0_1 mask. */ 922 uint16 outer_l5_bytes_0_1; /* Outer l5 bytes 0 1. */ 923 uint16 outer_l5_bytes_0_1_mask; /* Outer l5 bytes 0 1 mask. */ 924 uint8 ip_last_protocol; /* Protocol from IP extension header if 925 present, otherwise from IP header. */ 926 uint8 ip_last_protocol_mask; /* Ip_last_protocol mask. */ 927 uint8 fixed_hve_result_set_1; /* Fixed HVE result 1. */ 928 uint8 fixed_hve_result_set_1_mask; /* Fixed HVE result 1 mask. */ 929 uint8 fixed_hve_result_set_5; /* Fixed HVE result 5. */ 930 uint8 fixed_hve_result_set_5_mask; /* Fixed HVE result 5 mask. */ 931 uint8 flex_hve_result_set_1; /* Flex HVE result 1. */ 932 uint8 flex_hve_result_set_1_mask; /* Flex HVE result 1 mask. */ 933 uint8 tunnel_processing_results_1; /* Tunnel processing results 1. */ 934 uint8 tunnel_processing_results_1_mask; /* Tunnel processing results 1 mask. */ 935 uint8 vfp_opaque_ctrl_id; /* VFP opaque ctrl id. */ 936 uint8 vfp_opaque_ctrl_id_mask; /* VFP opaque ctrl id mask. */ 937 } bcm_compat6518_switch_pkt_protocol_match_t; 938 939 /* An API to add a protocol control entry. */ 940 extern int bcm_compat6518_switch_pkt_protocol_control_add( 941 int unit, 942 uint32 options, 943 bcm_compat6518_switch_pkt_protocol_match_t *match, 944 bcm_compat6518_switch_pkt_control_action_t *action, 945 int priority); 946 947 /* An API to get action and priority for a protocol control entry. */ 948 extern int bcm_compat6518_switch_pkt_protocol_control_get( 949 int unit, 950 bcm_compat6518_switch_pkt_protocol_match_t *match, 951 bcm_compat6518_switch_pkt_control_action_t *action, 952 int *priority); 953 954 /* An API to delete a protocol control entry. */ 955 extern int bcm_compat6518_switch_pkt_protocol_control_delete( 956 int unit, 957 bcm_compat6518_switch_pkt_protocol_match_t *match); 958 959 /* Add an entry into packet integrity check table. */ 960 extern int bcm_compat6518_switch_pkt_integrity_check_add( 961 int unit, 962 uint32 options, 963 bcm_switch_pkt_integrity_match_t *match, 964 bcm_compat6518_switch_pkt_control_action_t *action, 965 int priority); 966 967 /* Get an entry from packet integrity check table. */ 968 extern int bcm_compat6518_switch_pkt_integrity_check_get( 969 int unit, 970 bcm_switch_pkt_integrity_match_t *match, 971 bcm_compat6518_switch_pkt_control_action_t *action, 972 int *priority); 973 974 /* Initialize a VLAN tag action set structure. */ 975 typedef struct bcm_compat6518_vlan_action_set_s { 976 bcm_vlan_t new_outer_vlan; /* New outer VLAN for Add/Replace 977 actions. */ 978 bcm_vlan_t new_inner_vlan; /* New inner VLAN for Add/Replace 979 actions. */ 980 uint8 new_inner_pkt_prio; /* New inner packet priority for 981 Add/Replace actions. */ 982 uint8 new_outer_cfi; /* New outer packet CFI for Add/Replace 983 actions. */ 984 uint8 new_inner_cfi; /* New inner packet CFI for Add/Replace 985 actions. */ 986 bcm_if_t ingress_if; /* L3 Ingress Interface. */ 987 int priority; /* Internal or packet priority. */ 988 bcm_vlan_action_t dt_outer; /* Outer-tag action for double-tagged 989 packets. */ 990 bcm_vlan_action_t dt_outer_prio; /* Outer-priority-tag action for 991 double-tagged packets. */ 992 bcm_vlan_action_t dt_outer_pkt_prio; /* Outer packet priority action for 993 double-tagged packets. */ 994 bcm_vlan_action_t dt_outer_cfi; /* Outer packet CFI action for 995 double-tagged packets. */ 996 bcm_vlan_action_t dt_inner; /* Inner-tag action for double-tagged 997 packets. */ 998 bcm_vlan_action_t dt_inner_prio; /* Inner-priority-tag action for 999 double-tagged packets. */ 1000 bcm_vlan_action_t dt_inner_pkt_prio; /* Inner packet priority action for 1001 double-tagged packets. */ 1002 bcm_vlan_action_t dt_inner_cfi; /* Inner packet CFI action for 1003 double-tagged packets. */ 1004 bcm_vlan_action_t ot_outer; /* Outer-tag action for 1005 single-outer-tagged packets. */ 1006 bcm_vlan_action_t ot_outer_prio; /* Outer-priority-tag action for 1007 single-outer-tagged packets. */ 1008 bcm_vlan_action_t ot_outer_pkt_prio; /* Outer packet priority action for 1009 single-outer-tagged packets. */ 1010 bcm_vlan_action_t ot_outer_cfi; /* Outer packet CFI action for 1011 single-outer-tagged packets. */ 1012 bcm_vlan_action_t ot_inner; /* Inner-tag action for 1013 single-outer-tagged packets. */ 1014 bcm_vlan_action_t ot_inner_pkt_prio; /* Inner packet priority action for 1015 single-outer-tagged packets. */ 1016 bcm_vlan_action_t ot_inner_cfi; /* Inner packet CFI action for 1017 single-outer-tagged packets. */ 1018 bcm_vlan_action_t it_outer; /* Outer-tag action for 1019 single-inner-tagged packets. */ 1020 bcm_vlan_action_t it_outer_pkt_prio; /* Outer packet priority action for 1021 single-inner-tagged packets. */ 1022 bcm_vlan_action_t it_outer_cfi; /* Outer packet CFI action for 1023 single-inner-tagged packets. */ 1024 bcm_vlan_action_t it_inner; /* Inner-tag action for 1025 single-inner-tagged packets. */ 1026 bcm_vlan_action_t it_inner_prio; /* Inner-priority-tag action for 1027 single-inner-tagged packets. */ 1028 bcm_vlan_action_t it_inner_pkt_prio; /* Inner packet priority action for 1029 single-inner-tagged packets. */ 1030 bcm_vlan_action_t it_inner_cfi; /* Inner packet CFI action for 1031 single-inner-tagged packets. */ 1032 bcm_vlan_action_t ut_outer; /* Outer-tag action for untagged 1033 packets. */ 1034 bcm_vlan_action_t ut_outer_pkt_prio; /* Outer packet priority action for 1035 untagged packets. */ 1036 bcm_vlan_action_t ut_outer_cfi; /* Outer packet CFI action for untagged 1037 packets. */ 1038 bcm_vlan_action_t ut_inner; /* Inner-tag action for untagged 1039 packets. */ 1040 bcm_vlan_action_t ut_inner_pkt_prio; /* Inner packet priority action for 1041 untagged packets. */ 1042 bcm_vlan_action_t ut_inner_cfi; /* Inner packet CFI action for untagged 1043 packets. */ 1044 bcm_vlan_pcp_action_t outer_pcp; /* Outer tag's pcp field action of 1045 outgoing packets. */ 1046 bcm_vlan_pcp_action_t inner_pcp; /* Inner tag's pcp field action of 1047 outgoing packets. */ 1048 bcm_policer_t policer_id; /* Base policer to be used */ 1049 uint16 outer_tpid; /* New outer-tag's tpid field for modify 1050 action */ 1051 uint16 inner_tpid; /* New inner-tag's tpid field for modify 1052 action */ 1053 bcm_vlan_tpid_action_t outer_tpid_action; /* Action of outer-tag's tpid field */ 1054 bcm_vlan_tpid_action_t inner_tpid_action; /* Action of inner-tag's tpid field */ 1055 int action_id; /* Action Set index */ 1056 uint32 class_id; /* Class ID */ 1057 bcm_tsn_pri_map_t taf_gate_primap; /* TAF (Time Aware Filtering) gate 1058 priority mapping */ 1059 uint32 flags; /* BCM_VLAN_ACTION_SET_xxx. */ 1060 bcm_vlan_action_t outer_tag; /* Outer-tag action for all tagged 1061 packets. */ 1062 bcm_vlan_action_t inner_tag; /* Inner_tag action for all tagged 1063 packets. */ 1064 bcm_vlan_t forwarding_domain; /* Forwarding domain (VLAN or VPN). */ 1065 int inner_qos_map_id; /* Map ID of inner QOS profile */ 1066 int outer_qos_map_id; /* Map ID of outer QOS profile. */ 1067 } bcm_compat6518_vlan_action_set_t; 1068 1069 /*Get or set the port's default VLAN tag actions. */ 1070 extern int bcm_compat6518_vlan_port_default_action_get( 1071 int unit, 1072 bcm_port_t port, 1073 bcm_compat6518_vlan_action_set_t *action); 1074 1075 /*Get or set the port's default VLAN tag actions. */ 1076 extern int bcm_compat6518_vlan_port_default_action_set( 1077 int unit, 1078 bcm_port_t port, 1079 bcm_compat6518_vlan_action_set_t *action); 1080 1081 /*Get or set the egress default VLAN tag actions. */ 1082 extern int bcm_compat6518_vlan_port_egress_default_action_get( 1083 int unit, 1084 bcm_port_t port, 1085 bcm_compat6518_vlan_action_set_t *action); 1086 1087 /*Get or set the egress default VLAN tag actions. */ 1088 extern int bcm_compat6518_vlan_port_egress_default_action_set( 1089 int unit, 1090 bcm_port_t port, 1091 bcm_compat6518_vlan_action_set_t *action); 1092 1093 /* 1094 * Add protocol based VLAN with specified action. If the entry already 1095 * exists, update the action. 1096 */ 1097 extern int bcm_compat6518_vlan_port_protocol_action_add( 1098 int unit, 1099 bcm_port_t port, 1100 bcm_port_frametype_t frame, 1101 bcm_port_ethertype_t ether, 1102 bcm_compat6518_vlan_action_set_t *action); 1103 1104 /*Get protocol based VLAN action. */ 1105 extern int bcm_compat6518_vlan_port_protocol_action_get( 1106 int unit, 1107 bcm_port_t port, 1108 bcm_port_frametype_t frame, 1109 bcm_port_ethertype_t ether, 1110 bcm_compat6518_vlan_action_set_t *action); 1111 1112 /* 1113 * Add an association from MAC address to VLAN actions, which are 1114 * used for VLAN tag/s assignment to untagged packets. 1115 */ 1116 extern int bcm_compat6518_vlan_mac_action_add( 1117 int unit, 1118 bcm_mac_t mac, 1119 bcm_compat6518_vlan_action_set_t *action); 1120 1121 /* 1122 * Retrive an association from MAC address to VLAN actions, which 1123 * are used for VLAN tag assignment to untagged packets. 1124 */ 1125 extern int bcm_compat6518_vlan_mac_action_get( 1126 int unit, 1127 bcm_mac_t mac, 1128 bcm_compat6518_vlan_action_set_t *action); 1129 1130 /*Add an entry to the VLAN Translation table and assign VLAN actions. */ 1131 extern int bcm_compat6518_vlan_translate_action_add( 1132 int unit, 1133 bcm_gport_t port, 1134 bcm_vlan_translate_key_t key_type, 1135 bcm_vlan_t outer_vlan, 1136 bcm_vlan_t inner_vlan, 1137 bcm_compat6518_vlan_action_set_t *action); 1138 1139 /*Add an entry to the VLAN Translation table and assign VLAN actions. */ 1140 extern int bcm_compat6518_vlan_translate_action_create( 1141 int unit, 1142 bcm_gport_t port, 1143 bcm_vlan_translate_key_t key_type, 1144 bcm_vlan_t outer_vlan, 1145 bcm_vlan_t inner_vlan, 1146 bcm_compat6518_vlan_action_set_t *action); 1147 1148 /*Get an entry to the VLAN Translation table and assign VLAN actions. */ 1149 extern int bcm_compat6518_vlan_translate_action_get( 1150 int unit, 1151 bcm_gport_t port, 1152 bcm_vlan_translate_key_t key_type, 1153 bcm_vlan_t outer_vlan, 1154 bcm_vlan_t inner_vlan, 1155 bcm_compat6518_vlan_action_set_t *action); 1156 1157 /* 1158 * Add an entry to the egress VLAN Translation table and assign VLAN 1159 * actions. 1160 */ 1161 extern int bcm_compat6518_vlan_translate_egress_action_add( 1162 int unit, 1163 int port_class, 1164 bcm_vlan_t outer_vlan, 1165 bcm_vlan_t inner_vlan, 1166 bcm_compat6518_vlan_action_set_t *action); 1167 1168 /* 1169 * Get an entry to the egress VLAN Translation table and assign VLAN 1170 * actions. 1171 */ 1172 extern int bcm_compat6518_vlan_translate_egress_action_get( 1173 int unit, 1174 int port_class, 1175 bcm_vlan_t outer_vlan, 1176 bcm_vlan_t inner_vlan, 1177 bcm_compat6518_vlan_action_set_t *action); 1178 1179 /* 1180 * Add an entry based on gport and VLANs to the egress VLAN Translation 1181 * table and assign VLAN actions. 1182 */ 1183 extern int bcm_compat6518_vlan_translate_egress_gport_action_add( 1184 int unit, 1185 bcm_gport_t port, 1186 bcm_vlan_t outer_vlan, 1187 bcm_vlan_t inner_vlan, 1188 bcm_compat6518_vlan_action_set_t *action); 1189 1190 /* 1191 * Get VLAN actions for an entry based on gport and VLANS in the egress 1192 * VLAN Translation table. 1193 */ 1194 extern int bcm_compat6518_vlan_translate_egress_gport_action_get( 1195 int unit, 1196 bcm_gport_t port, 1197 bcm_vlan_t outer_vlan, 1198 bcm_vlan_t inner_vlan, 1199 bcm_compat6518_vlan_action_set_t *action); 1200 1201 1202 /*bcm_vlan_translate_action_range_add */ 1203 extern int bcm_compat6518_vlan_translate_action_range_add( 1204 int unit, 1205 bcm_gport_t port, 1206 bcm_vlan_t outer_vlan_low, 1207 bcm_vlan_t outer_vlan_high, 1208 bcm_vlan_t inner_vlan_low, 1209 bcm_vlan_t inner_vlan_high, 1210 bcm_compat6518_vlan_action_set_t *action); 1211 1212 /*bcm_vlan_translate_action_range_get */ 1213 extern int bcm_compat6518_vlan_translate_action_range_get( 1214 int unit, 1215 bcm_gport_t port, 1216 bcm_vlan_t outer_vlan_low, 1217 bcm_vlan_t outer_vlan_high, 1218 bcm_vlan_t inner_vlan_low, 1219 bcm_vlan_t inner_vlan_high, 1220 bcm_compat6518_vlan_action_set_t *action); 1221 1222 /*Set a VLAN translation ID instance with tag actions */ 1223 extern int bcm_compat6518_vlan_translate_action_id_set( 1224 int unit, 1225 uint32 flags, 1226 int action_id, 1227 bcm_compat6518_vlan_action_set_t *action); 1228 1229 /*Get tag actions from a VLAN translation ID instance */ 1230 extern int bcm_compat6518_vlan_translate_action_id_get( 1231 int unit, 1232 uint32 flags, 1233 int action_id, 1234 bcm_compat6518_vlan_action_set_t *action); 1235 1236 /* 1237 * Add an association from IP subnet to VLAN actions to use for assigning 1238 * VLAN tag actions to untagged packets. 1239 */ 1240 extern int bcm_compat6518_vlan_ip_action_add( 1241 int unit, 1242 bcm_vlan_ip_t *vlan_ip, 1243 bcm_compat6518_vlan_action_set_t *action); 1244 1245 /* 1246 * Get an association from IP subnet to VLAN actions to use for assigning 1247 * VLAN tag actions to untagged packets. 1248 */ 1249 extern int bcm_compat6518_vlan_ip_action_get( 1250 int unit, 1251 bcm_vlan_ip_t *vlan_ip, 1252 bcm_compat6518_vlan_action_set_t *action); 1253 1254 /*Add action for match criteria for Vlan assignment. */ 1255 extern int bcm_compat6518_vlan_match_action_add( 1256 int unit, 1257 uint32 options, 1258 bcm_vlan_match_info_t *match_info, 1259 bcm_compat6518_vlan_action_set_t *action_set); 1260 1261 /*Get action for given match criteria. */ 1262 extern int bcm_compat6518_vlan_match_action_get( 1263 int unit, 1264 bcm_vlan_match_info_t *match_info, 1265 bcm_compat6518_vlan_action_set_t *action_set); 1266 1267 /*Get all actions and match criteria for given vlan match. */ 1268 extern int bcm_compat6518_vlan_match_action_multi_get( 1269 int unit, 1270 bcm_vlan_match_t match, 1271 int size, 1272 bcm_vlan_match_info_t *match_info_array, 1273 bcm_compat6518_vlan_action_set_t *action_set_array, 1274 int *count); 1275 1276 /*Add VLAN actions to a field entry. */ 1277 extern int bcm_compat6518_field_action_vlan_actions_add( 1278 int unit, 1279 bcm_field_entry_t entry, 1280 bcm_field_action_t action, 1281 bcm_compat6518_vlan_action_set_t *vlan_action_set); 1282 1283 /*Retrieve VLAN actions configured to a field entry. */ 1284 extern int bcm_compat6518_field_action_vlan_actions_get( 1285 int unit, 1286 bcm_field_entry_t entry, 1287 bcm_field_action_t action, 1288 bcm_compat6518_vlan_action_set_t *vlan_action_set); 1289 1290 /* VLAN/VSAN Translation Action Set. */ 1291 typedef struct bcm_compat6518_fcoe_vsan_action_set_t { 1292 uint32 flags; /* BCM_FCOE_VSAN_ACTION_* */ 1293 bcm_fcoe_vsan_id_t new_vsan; /* new VSAN ID to replace with */ 1294 uint8 new_vsan_pri; /* new VSAN priority to replace with */ 1295 bcm_fcoe_vsan_vft_t vft; /* remaining fields of VFT header */ 1296 bcm_if_t ingress_if; /* TBD */ 1297 bcm_fcoe_vsan_action_t dt_vsan; /* Vsan action when double tagged */ 1298 bcm_fcoe_vsan_action_t dt_vsan_pri; /* VSAN Priority action when double 1299 tagged */ 1300 bcm_fcoe_vsan_action_t it_vsan; /* Vsan action when single inner tagged */ 1301 bcm_fcoe_vsan_action_t it_vsan_pri; /* Vsan Priority action when single 1302 inner tagged */ 1303 bcm_fcoe_vsan_action_t ot_vsan; /* Vsan action when single outer tagged */ 1304 bcm_fcoe_vsan_action_t ot_vsan_pri; /* Vsan Priority action when single 1305 outer tagged */ 1306 bcm_fcoe_vsan_action_t ut_vsan; /* Vsan action when un-tagged */ 1307 bcm_fcoe_vsan_action_t ut_vsan_pri; /* Vsan Priority action when un-tagged */ 1308 bcm_compat6518_vlan_action_set_t vlan_action; /* VLAN actions */ 1309 } bcm_compat6518_fcoe_vsan_action_set_t; 1310 1311 /* Add VSAN translation action */ 1312 extern int bcm_compat6518_fcoe_vsan_translate_action_add( 1313 int unit, 1314 bcm_fcoe_vsan_translate_key_config_t *key, 1315 bcm_compat6518_fcoe_vsan_action_set_t *action); 1316 1317 /* Generic port match attribute structure */ 1318 typedef struct bcm_compat6518_port_match_info_s { 1319 bcm_port_match_t match; /* Match criteria */ 1320 bcm_gport_t port; /* Match port */ 1321 bcm_vlan_t match_vlan; /* Outer VLAN ID to match */ 1322 bcm_vlan_t match_vlan_max; /* Maximum VLAN ID in range to match */ 1323 bcm_vlan_t match_inner_vlan; /* Inner VLAN ID to match */ 1324 bcm_vlan_t match_inner_vlan_max; /* Maximum Inner VLAN ID in range to 1325 match */ 1326 bcm_vlan_t match_tunnel_vlan; /* B-domain VID */ 1327 bcm_mac_t match_tunnel_srcmac; /* B-domain source MAC address */ 1328 bcm_mpls_label_t match_label; /* MPLS label */ 1329 uint32 flags; /* BCM_PORT_MATCH_XXX flags */ 1330 bcm_tunnel_id_t match_pon_tunnel; /* PON Tunnel value to match. */ 1331 bcm_port_ethertype_t match_ethertype; /* Ethernet type value to match */ 1332 int match_pcp; /* Outer PCP ID to match */ 1333 bcm_compat6518_vlan_action_set_t *action; 1334 /* Match action */ 1335 uint16 extended_port_vid; /* Extender port VID */ 1336 bcm_vpn_t vpn; /* VPN ID */ 1337 uint16 niv_port_vif; /* NIV port VIF */ 1338 uint32 isid; 1339 bcm_mac_t src_mac; /* Source Mac Address */ 1340 uint32 port_class; /* Port Class Id */ 1341 }bcm_compat6518_port_match_info_t; 1342 1343 /* Add a match to an existing port */ 1344 extern int bcm_compat6518_port_match_add( 1345 int unit, 1346 bcm_gport_t port, 1347 bcm_compat6518_port_match_info_t *match); 1348 1349 /* Remove a match from an existing port */ 1350 extern int bcm_compat6518_port_match_delete( 1351 int unit, 1352 bcm_gport_t port, 1353 bcm_compat6518_port_match_info_t *match); 1354 1355 /* Replace an old match with a new one for an existing port */ 1356 extern int bcm_compat6518_port_match_replace( 1357 int unit, 1358 bcm_gport_t port, 1359 bcm_compat6518_port_match_info_t *old_match, 1360 bcm_compat6518_port_match_info_t *new_match); 1361 1362 /* Get all the matches for an existing port */ 1363 extern int bcm_compat6518_port_match_multi_get( 1364 int unit, 1365 bcm_gport_t port, 1366 int size, 1367 bcm_compat6518_port_match_info_t *match_array, 1368 int *count); 1369 1370 /* Assign a set of matches to an existing port */ 1371 extern int bcm_compat6518_port_match_set( 1372 int unit, 1373 bcm_gport_t port, 1374 int size, 1375 bcm_compat6518_port_match_info_t *match_array); 1376 1377 /* Port Configuration structure. */ 1378 typedef struct bcm_compat6518_port_config_s { 1379 bcm_pbmp_t fe; /* Mask of FE ports. */ 1380 bcm_pbmp_t ge; /* Mask of GE ports. */ 1381 bcm_pbmp_t xe; /* Mask of 10gig ports. */ 1382 bcm_pbmp_t ce; /* Mask of 100gig ports. */ 1383 bcm_pbmp_t le; /* Mask of 50gig ports. */ 1384 bcm_pbmp_t cc; /* Mask of 200gig ports. */ 1385 bcm_pbmp_t cd; /* Mask of 400gig ports. */ 1386 bcm_pbmp_t e; /* Mask of eth ports. */ 1387 bcm_pbmp_t hg; /* Mask of HiGig ports. */ 1388 bcm_pbmp_t sci; /* Mask of SCI ports. */ 1389 bcm_pbmp_t sfi; /* Mask of SFI ports. */ 1390 bcm_pbmp_t spi; /* Mask of SPI ports. */ 1391 bcm_pbmp_t spi_subport; /* Mask of SPI subports. */ 1392 bcm_pbmp_t port; /* Mask of all front panel ports. */ 1393 bcm_pbmp_t cpu; /* Mask of CPU ports. */ 1394 bcm_pbmp_t all; /* Mask of all ports. */ 1395 bcm_pbmp_t stack_int; /* Deprecated - unused. */ 1396 bcm_pbmp_t stack_ext; /* Mask of Stack ports. */ 1397 bcm_pbmp_t tdm; /* Mask of TDM ports. */ 1398 bcm_pbmp_t pon; /* Mask of PON ports. */ 1399 bcm_pbmp_t llid; /* Mask of LLID ports. */ 1400 bcm_pbmp_t il; /* Mask of ILKN ports. */ 1401 bcm_pbmp_t xl; /* Mask of XLAUI ports. */ 1402 bcm_pbmp_t rcy; /* Mask of RECYCLE ports. */ 1403 bcm_pbmp_t sat; /* Mask of SAT ports. */ 1404 bcm_pbmp_t ipsec; /* Mask of IPSEC ports. */ 1405 bcm_pbmp_t per_pipe[BCM_PIPES_MAX]; /* Mask of ports per pipe. The number of pipes per device can be obtained via num_pipes field of bcm_info_t. */ 1406 bcm_pbmp_t nif; /* Mask of Network Interfaces ports. */ 1407 bcm_pbmp_t control; /* Mask of hot swap controlling ports. */ 1408 bcm_pbmp_t eventor; /* Mask of Eventor ports. */ 1409 bcm_pbmp_t olp; /* Mask of OLP ports. */ 1410 bcm_pbmp_t oamp; /* Mask of OAMP ports. */ 1411 bcm_pbmp_t erp; /* Mask of ERP ports. */ 1412 bcm_pbmp_t roe; /* Mask of ROE ports. */ 1413 bcm_pbmp_t rcy_mirror; /* Mask of mirror recycle ports (sniff) */ 1414 bcm_pbmp_t per_pp_pipe[BCM_PP_PIPES_MAX]; /* Mask of ports per PP pipe. The number of PP pipes per device can be obtained via num_pp_pipes field of bcm_info_t. */ 1415 } bcm_compat6518_port_config_t; 1416 1417 /* Retrieved the port configuration for the specified device. */ 1418 extern int bcm_compat6518_port_config_get( 1419 int unit, 1420 bcm_compat6518_port_config_t *config); 1421 1422 /* Offsets of payload, timestamp and sequence number in user defined header */ 1423 typedef struct bcm_compat6518_sat_header_user_define_offsets_s { 1424 int payload_offset; /* Payload offset */ 1425 int timestamp_offset; /* Timestamp offset */ 1426 int seq_number_offset; /* Sequence number offset */ 1427 int crc_byte_offset; /* offset of CRC covered byte */ 1428 } bcm_compat6518_sat_header_user_define_offsets_t; 1429 1430 /* Sat ctf packet config */ 1431 typedef struct bcm_compat6518_sat_ctf_packet_info_s { 1432 bcm_sat_header_type_t sat_header_type; /* Sat header type */ 1433 bcm_sat_payload_t payload; /* Sat payload */ 1434 uint32 flags; /* */ 1435 bcm_compat6518_sat_header_user_define_offsets_t offsets; /* Offsets of payload, timestamp and sequence number in user defined header */ 1436 } bcm_compat6518_sat_ctf_packet_info_t; 1437 1438 /* Set ctf packet format. */ 1439 extern int bcm_compat6518_sat_ctf_packet_config( 1440 int unit, 1441 bcm_sat_ctf_t ctf_id, 1442 bcm_compat6518_sat_ctf_packet_info_t *packet_info); 1443 1444 typedef struct bcm_compat6518_info_s { 1445 uint32 vendor; /* PCI values used usually. */ 1446 uint32 device; /* PCI values used usually. */ 1447 uint32 revision; /* PCI values used usually. */ 1448 uint32 capability; 1449 int num_pipes; /* Number of pipes in the device. */ 1450 int num_pp_pipes; /* Number of packet processing pipes in the device. */ 1451 } bcm_compat6518_info_t; 1452 1453 /* Get information about a BCM unit. */ 1454 extern int bcm_compat6518_info_get( 1455 int unit, 1456 bcm_compat6518_info_t *info); 1457 1458 /* 1459 * IPFIX header in the encap used to send the data packet to the remote 1460 * collector. 1461 */ 1462 typedef struct bcm_compat6518_collector_ipfix_header_s { 1463 int version; /* Ipfix Protocol Version. */ 1464 int initial_sequence_num; /* Ipfix initial sequence number. */ 1465 } bcm_compat6518_collector_ipfix_header_t; 1466 1467 /* Collector information. */ 1468 typedef struct bcm_compat6518_collector_info_s { 1469 bcm_collector_type_t collector_type; /* Collector type. Remote vs Local */ 1470 bcm_collector_transport_type_t transport_type; /* Transport type used for exporting 1471 data to the collector. This 1472 identifies the usable fields within 1473 the encap structure member defined 1474 below. */ 1475 bcm_collector_eth_header_t eth; /* Ethernet encapsulation of the packet 1476 sent to collector. */ 1477 bcm_collector_ipv4_header_t ipv4; /* IPv4 encapsulation of the packet sent 1478 to collector. */ 1479 bcm_collector_ipv6_header_t ipv6; /* IPv6 encapsulation of the packet sent 1480 to collector. */ 1481 bcm_collector_udp_header_t udp; /* UDP encapsulation of the packet sent 1482 to collector. */ 1483 bcm_compat6518_collector_ipfix_header_t ipfix; /* IPFIX encapsulation of the packet 1484 sent to collector. */ 1485 bcm_collector_protobuf_header_t protobuf; /* Protobuf header information. */ 1486 bcm_collector_timestamp_source_t src_ts; /* Timestamp source info. */ 1487 } bcm_compat6518_collector_info_t; 1488 1489 /* Create a collector with given collector info. */ 1490 extern int bcm_compat6518_collector_create( 1491 int unit, 1492 uint32 options, 1493 bcm_collector_t *collector_id, 1494 bcm_compat6518_collector_info_t *collector_info); 1495 1496 /* Get collector information with ID. */ 1497 extern int bcm_compat6518_collector_get( 1498 int unit, 1499 bcm_collector_t id, 1500 bcm_compat6518_collector_info_t *collector_info); 1501 1502 /* IFA statistics information data. */ 1503 typedef struct bcm_compat6518_ifa_stat_info_s { 1504 uint32 rx_pkt_cnt; /* Number of packet recieved in FW. */ 1505 uint32 tx_pkt_cnt; /* Number of packet transmitted from FW. */ 1506 uint32 ifa_no_config_drop; /* Number of pkt dropped due to missing 1507 configuration. */ 1508 uint32 ifa_collector_not_present_drop; /* Number of pkt dropped due to missing 1509 collector configuration. */ 1510 uint32 ifa_hop_cnt_invalid_drop; /* Number of pkt dropped due to Hop 1511 count and Hop limit are out of order. */ 1512 uint32 ifa_int_hdr_len_invalid_drop; /* Number of pkt dropped due to maximum 1513 length and current length are out of 1514 order. */ 1515 uint32 ifa_pkt_size_invalid_drop; /* Number of pkt dropped due to invalid 1516 packet size. */ 1517 uint32 rx_pkt_length_exceed_max_drop_count; /* Number of Rx packets dropped due to 1518 its length exceeding the max length 1519 configured using the config property 1520 ifa_rx_pkt_max_length. */ 1521 uint32 rx_pkt_parse_error_drop_count; /* Number of Rx packets dropped due to 1522 errors in parsing. */ 1523 uint32 rx_pkt_unknown_namespace_drop_count; /* Number of Rx packets dropped as the 1524 namespace is unknown. */ 1525 uint32 rx_pkt_excess_rate_drop_count; /* Number of Rx packets dropped as the 1526 incoming rate is too high to process. */ 1527 uint32 tx_record_count; /* Number of IFA records exported to 1528 collector. */ 1529 uint32 tx_pkt_failure_count; /* Number of Tx packets that could not 1530 be exported due to some failure. */ 1531 } bcm_compat6518_ifa_stat_info_t; 1532 1533 /* In-band flow analyzer - IFA statistics information */ 1534 extern int bcm_compat6518_ifa_stat_info_set( 1535 int unit, 1536 bcm_compat6518_ifa_stat_info_t *stat_data); 1537 1538 /* In-band flow analyzer - IFA statistics information */ 1539 extern int bcm_compat6518_ifa_stat_info_get( 1540 int unit, 1541 bcm_compat6518_ifa_stat_info_t *stat_data); 1542 1543 /* This structure contains the configuration of a VLAN. */ 1544 typedef struct bcm_compat6518_vlan_control_vlan_s { 1545 bcm_vrf_t vrf; /* */ 1546 bcm_vlan_t forwarding_vlan; /* Shared VLAN ID. */ 1547 bcm_if_t ingress_if; /* Mapped Ingress interface. */ 1548 uint16 outer_tpid; /* */ 1549 uint32 flags; /* */ 1550 bcm_vlan_mcast_flood_t ip6_mcast_flood_mode; /* */ 1551 bcm_vlan_mcast_flood_t ip4_mcast_flood_mode; /* */ 1552 bcm_vlan_mcast_flood_t l2_mcast_flood_mode; /* */ 1553 int if_class; /* */ 1554 bcm_vlan_forward_t forwarding_mode; /* */ 1555 bcm_vlan_urpf_mode_t urpf_mode; /* */ 1556 bcm_cos_queue_t cosq; /* */ 1557 int qos_map_id; /* index to int_pri->queue offset mapping profile */ 1558 bcm_fabric_distribution_t distribution_class; /* Fabric Distribution Class. */ 1559 bcm_multicast_t broadcast_group; /* Group to handle broadcast frames */ 1560 bcm_multicast_t unknown_multicast_group; /* Group to handle unknown multicast frames */ 1561 bcm_multicast_t unknown_unicast_group; /* Group to handle unknown unicast frames */ 1562 bcm_multicast_t trill_nonunicast_group; /* Group to handle trill-domain nonunicast frames */ 1563 bcm_trill_name_t source_trill_name; /* Source RBridge nickname per VLAN */ 1564 int trunk_index; /* Trunk index for static PSC */ 1565 bcm_vlan_protocol_packet_ctrl_t protocol_pkt; /* Protocol packet control per VLAN */ 1566 int nat_realm_id; /* Realm id of interface that this vlan maps to */ 1567 int l3_if_class; /* L3IIF class id. */ 1568 bcm_vlan_vp_mc_ctrl_t vp_mc_ctrl; /* VP replication control, Auto, Enable, Disable */ 1569 int aging_cycles; /* number of aging meta-cycles */ 1570 int entropy_id; /* aging profile ID */ 1571 bcm_vpn_t vpn; /* vpn */ 1572 bcm_vlan_t egress_vlan; /* egress outer vlan */ 1573 uint32 learn_flags; /* Learn control flags for VLAN-based (BCM_VLAN_LEARN_CONTROL_XXX) */ 1574 uint32 sr_flags; /* Flags for Seamless Redundancy: BCM_VLAN_CONTROL_SR_FLAG_xxx */ 1575 uint32 flags2; /* BCM_VLAN_FLAGS2_XXX */ 1576 uint32 ingress_stat_id; /* Object statistics id ingress. */ 1577 int ingress_stat_pp_profile; /* Statistic profile ingress. */ 1578 uint32 egress_stat_id; /* Object statistics id egress. */ 1579 int egress_stat_pp_profile; /* Statistic profile egress. */ 1580 bcm_compat6518_vlan_action_set_t egress_action; /* Egress VLAN actions. */ 1581 bcm_vlan_l2_view_t l2_view; /* L2 table view. */ 1582 int egress_class_id; /* Class ID for EFP qualifier. */ 1583 int egress_opaque_ctrl_id; /* Egress opaque control ID. */ 1584 int ingress_opaque_ctrl_id; /* Ingress opaque control ID. */ 1585 } bcm_compat6518_vlan_control_vlan_t; 1586 1587 /* Set or retrieve current VLAN properties selectively. */ 1588 extern int bcm_compat6518_vlan_control_vlan_selective_get( 1589 int unit, 1590 bcm_vlan_t vlan, 1591 uint32 valid_fields, 1592 bcm_compat6518_vlan_control_vlan_t *control); 1593 1594 /* Set or retrieve current VLAN properties selectively. */ 1595 extern int bcm_compat6518_vlan_control_vlan_selective_set( 1596 int unit, 1597 bcm_vlan_t vlan, 1598 uint32 valid_fields, 1599 bcm_compat6518_vlan_control_vlan_t *control); 1600 1601 /* Set or retrieve current VLAN properties. */ 1602 extern int bcm_compat6518_vlan_control_vlan_get( 1603 int unit, 1604 bcm_vlan_t vlan, 1605 bcm_compat6518_vlan_control_vlan_t *control); 1606 1607 /* Set or retrieve current VLAN properties. */ 1608 extern int bcm_compat6518_vlan_control_vlan_set( 1609 int unit, 1610 bcm_vlan_t vlan, 1611 bcm_compat6518_vlan_control_vlan_t control); 1612 1613 /* Port Resource Configuration */ 1614 typedef struct bcm_compat6518_port_resource_s { 1615 uint32 flags; /* BCM_PORT_RESOURCE_XXX */ 1616 bcm_gport_t port; /* Local logical port number to connect to 1617 the given physical port */ 1618 int physical_port; /* Local physical port, -1 if the logical to 1619 physical mapping is to be deleted */ 1620 int speed; /* Initial speed after FlexPort operation */ 1621 int rx_speed; /* Indicate the Rx speed, valid only 1622 BCM_PORT_RESOURCE_ASYMMETRICAL flags is 1623 set */ 1624 int lanes; /* Number of PHY lanes for this physical 1625 port */ 1626 bcm_port_encap_t encap; /* Encapsulation mode for port */ 1627 bcm_port_phy_fec_t fec_type; /* fec_type for port */ 1628 int phy_lane_config; /* serdes pmd lane config for port */ 1629 int link_training; /* link training on or off */ 1630 int roe_compression; /* enable roe_compression */ 1631 int num_subports; /* Number of subports if this is cascaded 1632 port. */ 1633 int line_card; /* Line card number for the cascaded port */ 1634 } bcm_compat6518_port_resource_t; 1635 1636 /* 1637 * Perform a FlexPort operation changing the port resources for a given 1638 * logical port. 1639 */ 1640 extern int bcm_compat6518_port_resource_set( 1641 int unit, 1642 bcm_gport_t port, 1643 bcm_compat6518_port_resource_t *resource); 1644 1645 /* Get the port resource configuration. */ 1646 extern int bcm_compat6518_port_resource_get( 1647 int unit, 1648 bcm_gport_t port, 1649 bcm_compat6518_port_resource_t *resource); 1650 1651 /* 1652 * Get suggested default resource values prior to calling 1653 * bcm_port_resource_set. 1654 */ 1655 extern int bcm_compat6518_port_resource_default_get( 1656 int unit, 1657 bcm_gport_t port, 1658 uint32 flags, 1659 bcm_compat6518_port_resource_t *resource); 1660 1661 /* 1662 * Performs a FlexPort operation changing the port resources for a set of 1663 * ports. 1664 */ 1665 extern int bcm_compat6518_port_resource_multi_set( 1666 int unit, 1667 int nport, 1668 bcm_compat6518_port_resource_t *resource); 1669 1670 /* 1671 * Validate a port's speed configuration on the BCM56980 by fetching the 1672 * affected ports. 1673 */ 1674 extern int bcm_compat6518_port_resource_speed_config_validate( 1675 int unit, 1676 bcm_compat6518_port_resource_t *resource, 1677 bcm_pbmp_t *pbmp); 1678 1679 /* Get/Modify the speed for a given port. */ 1680 extern int bcm_compat6518_port_resource_speed_get( 1681 int unit, 1682 bcm_gport_t port, 1683 bcm_compat6518_port_resource_t *resource); 1684 1685 /* Get/Modify the speed for a given port. */ 1686 extern int bcm_compat6518_port_resource_speed_set( 1687 int unit, 1688 bcm_gport_t port, 1689 bcm_compat6518_port_resource_t *resource); 1690 1691 /* Modify the Port Speeds for a set of ports in a single Port Macro. */ 1692 extern int bcm_compat6518_port_resource_speed_multi_set( 1693 int unit, 1694 int nport, 1695 bcm_compat6518_port_resource_t *resource); 1696 1697 /* Specify hints to be used during group creation. */ 1698 typedef struct bcm_compat6518_field_hint_s { 1699 bcm_field_hint_type_t hint_type; /* Field hints of type 1700 bcm_field_hint_type_t. */ 1701 bcm_field_qualify_t qual; /* Field qualifier bcmFieldQualifyXXX. */ 1702 uint32 max_values; /* To figure out the width of the 1703 compression output. */ 1704 uint32 start_bit; /* Builds the range in conjunction with 1705 end_bit which will indicate that in 1706 the 1707 full mask any 1708 bits outside of that range are 1709 guaranteed to be 0. */ 1710 uint32 end_bit; /* End bit of a mask for the qualifier 1711 in hint structure. */ 1712 uint32 flags; /* Flags. */ 1713 uint32 dosattack_event_flags; /* Dos Attack Events Flags. */ 1714 uint32 max_group_size; /* Max size of the group. */ 1715 int priority; /* Group priority. */ 1716 bcm_udf_id_t udf_id; /* UDF ID. */ 1717 bcm_field_group_t group_id; /* Original Group ID. */ 1718 } bcm_compat6518_field_hint_t; 1719 1720 /* Associate a hint structure to the hint id. */ 1721 extern int bcm_compat6518_field_hints_add( 1722 int unit, 1723 bcm_field_hintid_t hint_id, 1724 bcm_compat6518_field_hint_t *hint); 1725 1726 /* Get the complete hint structure from the hint id. */ 1727 extern int bcm_compat6518_field_hints_get( 1728 int unit, 1729 bcm_field_hintid_t hint_id, 1730 bcm_compat6518_field_hint_t *hint); 1731 1732 /* Remove a hint structure from the hint id. */ 1733 extern int bcm_compat6518_field_hints_delete( 1734 int unit, 1735 bcm_field_hintid_t hint_id, 1736 bcm_compat6518_field_hint_t *hint); 1737 /* 1738 * Field entry configuration structure. Used to create a field entry with 1739 * specific attributes. 1740 */ 1741 typedef struct bcm_compat6518_field_entry_config_s { 1742 uint32 flags; /* Field entry create flags 1743 BCM_FIELD_ENTRY_CREATE_XXX. */ 1744 bcm_field_entry_t entry_id; /* Field entry. */ 1745 bcm_field_group_t group_id; /* Group Id. */ 1746 bcm_field_aset_t aset; /* Default entry Action Set (currently 1747 applicable only for default entries). */ 1748 int priority; /* Entry priority. */ 1749 } bcm_compat6518_field_entry_config_t; 1750 1751 extern int bcm_compat6518_field_entry_config_create( 1752 int unit, 1753 bcm_compat6518_field_entry_config_t *entry_config); 1754 1755 #if defined(INCLUDE_L3) 1756 /* 1757 * L3 Egress Structure. 1758 * 1759 * Description of an L3 forwarding destination. 1760 */ 1761 typedef struct bcm_compat6518_l3_egress_s { 1762 uint32 flags; /* Interface flags (BCM_L3_TGID, 1763 BCM_L3_L2TOCPU). */ 1764 uint32 flags2; /* See BCM_L3_FLAGS2_xxx flag 1765 definitions. */ 1766 bcm_if_t intf; /* L3 interface (source MAC, tunnel). */ 1767 bcm_mac_t mac_addr; /* Next hop forwarding destination mac. */ 1768 bcm_vlan_t vlan; /* Next hop vlan id. */ 1769 bcm_module_t module; 1770 bcm_port_t port; /* Port packet switched to (if 1771 !BCM_L3_TGID). */ 1772 bcm_trunk_t trunk; /* Trunk packet switched to (if 1773 BCM_L3_TGID). */ 1774 uint32 mpls_flags; /* BCM_MPLS flag definitions. */ 1775 bcm_mpls_label_t mpls_label; /* MPLS label. */ 1776 bcm_mpls_egress_action_t mpls_action; /* MPLS action. */ 1777 int mpls_qos_map_id; /* MPLS EXP map ID. */ 1778 int mpls_ttl; /* MPLS TTL threshold. */ 1779 uint8 mpls_pkt_pri; /* MPLS Packet Priority Value. */ 1780 uint8 mpls_pkt_cfi; /* MPLS Packet CFI Value. */ 1781 uint8 mpls_exp; /* MPLS Exp. */ 1782 int qos_map_id; /* General QOS map id */ 1783 bcm_if_t encap_id; /* Encapsulation index. */ 1784 bcm_failover_t failover_id; /* Failover Object Index. */ 1785 bcm_if_t failover_if_id; /* Failover Egress Object index. */ 1786 bcm_multicast_t failover_mc_group; /* Failover Multicast Group. */ 1787 int dynamic_scaling_factor; /* Scaling factor for dynamic load 1788 balancing thresholds. */ 1789 int dynamic_load_weight; /* Weight of traffic load in determining 1790 a dynamic load balancing member's 1791 quality. */ 1792 int dynamic_queue_size_weight; /* Weight of queue size in determining a 1793 dynamic load balancing member's 1794 quality. */ 1795 int intf_class; /* L3 interface class ID */ 1796 uint32 multicast_flags; /* BCM_L3_MULTICAST flag definitions. */ 1797 uint16 oam_global_context_id; /* OAM global context id passed from 1798 ingress to egress XGS chip. */ 1799 bcm_vntag_t vntag; /* VNTAG. */ 1800 bcm_vntag_action_t vntag_action; /* VNTAG action. */ 1801 bcm_etag_t etag; /* ETAG. */ 1802 bcm_etag_action_t etag_action; /* ETAG action. */ 1803 uint32 flow_handle; /* FLOW handle for flex entries. */ 1804 uint32 flow_option_handle; /* FLOW option handle for flex entries. */ 1805 uint32 flow_label_option_handle; /* FLOW option handle for egress label 1806 flex entries. */ 1807 bcm_flow_logical_field_t logical_fields[BCM_FLOW_MAX_NOF_LOGICAL_FIELDS]; /* logical fields array for flex 1808 entries. */ 1809 uint32 num_of_fields; /* number of logical fields. */ 1810 int counting_profile; /* counting profile. If not required, 1811 set it to 1812 BCM_STAT_LIF_COUNTING_PROFILE_NONE */ 1813 int mpls_ecn_map_id; /* IP ECN/INT CN to MPLS EXP map ID. */ 1814 bcm_l3_ingress_urpf_mode_t urpf_mode; /* fec rpf mode. */ 1815 bcm_multicast_t mc_group; /* Multicast Group. */ 1816 bcm_mac_t src_mac_addr; /* Source MAC Address. */ 1817 bcm_gport_t hierarchical_gport; /* Hierarchical TM-Flow. */ 1818 uint32 stat_id; /* Object statistics ID. */ 1819 int stat_pp_profile; /* Statistics profile. */ 1820 bcm_gport_t vlan_port_id; /* Pointer to egress vlan translation 1821 lif entry in EEDB. */ 1822 int replication_id; /* Replication copy ID of multicast 1823 Egress object. */ 1824 int mtu; /* MTU. */ 1825 int nat_realm_id; /* NAT destination realm ID. */ 1826 bcm_qos_egress_model_t egress_qos_model; /* egress qos and ttl model */ 1827 } bcm_compat6518_l3_egress_t; 1828 1829 /* Create an Egress forwarding object. */ 1830 extern int bcm_compat6518_l3_egress_create( 1831 int unit, 1832 uint32 flags, 1833 bcm_compat6518_l3_egress_t *egr, 1834 bcm_if_t *if_id); 1835 1836 /* Get an Egress forwarding object. */ 1837 extern int bcm_compat6518_l3_egress_get( 1838 int unit, 1839 bcm_if_t intf, 1840 bcm_compat6518_l3_egress_t *egr); 1841 1842 /* Find an interface pointing to an Egress forwarding object. */ 1843 extern int bcm_compat6518_l3_egress_find( 1844 int unit, 1845 bcm_compat6518_l3_egress_t *egr, 1846 bcm_if_t *intf); 1847 1848 /* Retrieve valid allocation for a given number of FECs. */ 1849 extern int bcm_compat6518_l3_egress_allocation_get( 1850 int unit, 1851 uint32 flags, 1852 bcm_compat6518_l3_egress_t *egr, 1853 uint32 nof_members, 1854 bcm_if_t *if_id); 1855 1856 /* 1857 * Set a failover egress object with fixed offset to protect primary NH 1858 * intf. 1859 */ 1860 extern int bcm_compat6518_failover_egress_set( 1861 int unit, 1862 bcm_if_t intf, 1863 bcm_compat6518_l3_egress_t *failover_egr); 1864 1865 /* 1866 * Get a failover egress object with fixed offset to protect primary NH 1867 * intf. 1868 */ 1869 extern int bcm_compat6518_failover_egress_get( 1870 int unit, 1871 bcm_if_t intf, 1872 bcm_compat6518_l3_egress_t *failover_egr); 1873 #endif /* defined(INCLUDE_L3) */ 1874 1875 /* 1876 * Flex counter group action structure. 1877 * 1878 * This data structure lists the properties of a flex counter group 1879 * action. 1880 */ 1881 typedef struct bcm_compat6518_flexctr_group_action_s { 1882 bcm_flexctr_source_t source; /* Flex counter source. */ 1883 bcm_pbmp_t ports; /* Flex counter ports. */ 1884 uint32 stat_counter_id[BCM_FLEXCTR_GROUP_ACTION_SIZE]; /* Flex counter group action array. */ 1885 uint8 action_num; /* Total group action array number */ 1886 } bcm_compat6518_flexctr_group_action_t; 1887 1888 /* Flex counter group action creation function. */ 1889 extern int bcm_compat6518_flexctr_group_action_create( 1890 int unit, 1891 int options, 1892 bcm_compat6518_flexctr_group_action_t *group_action, 1893 uint32 *group_stat_counter_id); 1894 1895 /* Flex counter group action get function. */ 1896 extern int bcm_compat6518_flexctr_group_action_get( 1897 int unit, 1898 uint32 group_stat_counter_id, 1899 bcm_compat6518_flexctr_group_action_t *group_action); 1900 1901 typedef struct bcm_compat6518_field_destination_match_s { 1902 int priority; /* Match priority. */ 1903 bcm_gport_t gport; /* Outgoing mod port or trunk. */ 1904 uint32 gport_mask; /* Outgoing mod port or trunk mask. */ 1905 bcm_multicast_t mc_group; /* Multicast group. */ 1906 uint32 mc_group_mask; /* Multicast group mask. */ 1907 bcm_port_encap_t port_encap; /* Incoming port encapsulation. */ 1908 uint8 port_encap_mask; /* Incoming port encapsulation mask. */ 1909 bcm_color_t color; /* Color. */ 1910 uint8 color_mask; /* Color mask. */ 1911 bcm_color_t elephant_color; /* Elephant color. */ 1912 uint8 elephant_color_mask; /* Elephant color mask. */ 1913 uint8 elephant; /* Flowtracker elephant flow indicator. */ 1914 uint8 elephant_mask; /* Elephant mask. */ 1915 uint8 elephant_notify; /* Indicator that flow exceeds the elephant 1916 threshold byte count and becomes an 1917 elephant flow. */ 1918 uint8 elephant_notify_mask; /* elephant_notify mask. */ 1919 int int_pri; /* Internal priority. */ 1920 uint32 int_pri_mask; /* Internal priority mask. */ 1921 int opaque_object_2; /* Opaque object 2 assigned in ingress 1922 field. */ 1923 uint32 opaque_object_2_mask; /* Opaque object 2 mask. */ 1924 } bcm_compat6518_field_destination_match_t; 1925 1926 /* Add a field destination entry. */ 1927 extern int bcm_compat6518_field_destination_entry_add( 1928 int unit, 1929 uint32 options, 1930 bcm_compat6518_field_destination_match_t *match, 1931 bcm_field_destination_action_t *action); 1932 1933 /* Get a field destination entry. */ 1934 extern int bcm_compat6518_field_destination_entry_get( 1935 int unit, 1936 bcm_compat6518_field_destination_match_t *match, 1937 bcm_field_destination_action_t *action); 1938 1939 /* Delete a field destination entry. */ 1940 extern int bcm_compat6518_field_destination_entry_delete( 1941 int unit, 1942 bcm_compat6518_field_destination_match_t *match); 1943 1944 /* Attach the statistic counter ID to a field destination entry. */ 1945 extern int bcm_compat6518_field_destination_stat_attach( 1946 int unit, 1947 bcm_compat6518_field_destination_match_t *match, 1948 uint32 stat_counter_id); 1949 1950 /* Get the statistic counter ID attached to a field destination entry. */ 1951 extern int bcm_compat6518_field_destination_stat_id_get( 1952 int unit, 1953 bcm_compat6518_field_destination_match_t *match, 1954 uint32 *stat_counter_id); 1955 1956 /* Detach the statistic counter ID attached to a field destination entry. */ 1957 extern int bcm_compat6518_field_destination_stat_detach( 1958 int unit, 1959 bcm_compat6518_field_destination_match_t *match); 1960 1961 /* Set the flex counter object value for a field destination entry. */ 1962 extern int bcm_compat6518_field_destination_flexctr_object_set( 1963 int unit, 1964 bcm_compat6518_field_destination_match_t *match, 1965 uint32 value); 1966 1967 /* Get the flex counter object value of a field destination entry. */ 1968 extern int bcm_compat6518_field_destination_flexctr_object_get( 1969 int unit, 1970 bcm_compat6518_field_destination_match_t *match, 1971 uint32 *value); 1972 1973 /* L2 Station address info. */ 1974 typedef struct bcm_compat6518_l2_station_s { 1975 uint32 flags; /* BCM_L2_STATION_xxx flags. */ 1976 int priority; /* Entry priority. */ 1977 bcm_mac_t dst_mac; /* Destination MAC address to match. */ 1978 bcm_mac_t dst_mac_mask; /* Destination MAC address mask value. */ 1979 bcm_vlan_t vlan; /* VLAN to match. */ 1980 bcm_vlan_t vlan_mask; /* VLAN mask value. */ 1981 bcm_port_t src_port; /* Ingress port to match. */ 1982 bcm_port_t src_port_mask; /* Ingress port mask value. */ 1983 bcm_tsn_pri_map_t taf_gate_primap; /* TAF (Time Aware Filtering) gate 1984 priority mapping */ 1985 bcm_l2_forward_domain_type_t forward_domain_type; /* L2 forwarding domain type. */ 1986 uint8 forward_domain_type_mask; /* L2 forwarding domain type mask. */ 1987 bcm_vlan_t inner_vlan; /* Inner VLAN to match. */ 1988 bcm_vlan_t inner_vlan_mask; /* Inner VLAN mask value. */ 1989 bcm_vlan_t vfi; /* Port default virtual forwarding 1990 instance to match. */ 1991 bcm_vlan_t vfi_mask; /* Port default virtual forwarding 1992 instance mask. */ 1993 } bcm_compat6518_l2_station_t; 1994 1995 /* Add an entry to L2 Station Table. */ 1996 int bcm_compat6518_l2_station_add( 1997 int unit, 1998 int *station_id, 1999 bcm_compat6518_l2_station_t *station); 2000 2001 /* Get L2 station entry detail from Station Table. */ 2002 int bcm_compat6518_l2_station_get( 2003 int unit, 2004 int station_id, 2005 bcm_compat6518_l2_station_t *station); 2006 2007 /* Rx cosq mapping. */ 2008 typedef struct bcm_compat6518_rx_cosq_mapping_s { 2009 uint32 flags; /* flags */ 2010 int index; /* Index into COSQ mapping table (0 is 2011 highest match priority) */ 2012 bcm_rx_reasons_t reasons; /* packet reasons bitmap */ 2013 bcm_rx_reasons_t reasons_mask; /* mask for packet reasons bitmap */ 2014 uint8 int_prio; /* internal priority value */ 2015 uint8 int_prio_mask; /* mask for internal priority value */ 2016 uint32 packet_type; /* packet type bitmap */ 2017 uint32 packet_type_mask; /* mask for packet type bitmap */ 2018 bcm_cos_queue_t cosq; /* cosq value */ 2019 uint8 flex_key1; /* Flex key 1. */ 2020 uint8 flex_key1_mask; /* Mask for flex key 1. */ 2021 bcm_rx_pkt_trace_reasons_t trace_reasons; /* Copy to CPU trace event reasons 2022 bitmap. */ 2023 bcm_rx_pkt_trace_reasons_t trace_reasons_mask; /* Mask for copy to CPU trace event 2024 reasons bitmap. */ 2025 bcm_pkt_drop_event_t drop_event; /* Drop event. */ 2026 bcm_pkt_drop_event_t drop_event_mask; /* Mask for drop event. */ 2027 int priority; /* Entry priority. */ 2028 } bcm_compat6518_rx_cosq_mapping_t; 2029 2030 /* Map packets to a CPU COS queue. */ 2031 extern int bcm_compat6518_rx_cosq_mapping_extended_set( 2032 int unit, 2033 uint32 options, 2034 bcm_compat6518_rx_cosq_mapping_t *rx_cosq_mapping); 2035 2036 /* Get packets to CPU COS queue mappings. */ 2037 extern int bcm_compat6518_rx_cosq_mapping_extended_get( 2038 int unit, 2039 bcm_compat6518_rx_cosq_mapping_t *rx_cosq_mapping); 2040 2041 /* Add a CPU COS map. */ 2042 extern int bcm_compat6518_rx_cosq_mapping_extended_add( 2043 int unit, 2044 uint32 options, 2045 bcm_compat6518_rx_cosq_mapping_t *rx_cosq_mapping); 2046 2047 /* Delete a CPU COS map. */ 2048 extern int bcm_compat6518_rx_cosq_mapping_extended_delete( 2049 int unit, 2050 bcm_compat6518_rx_cosq_mapping_t *rx_cosq_mapping); 2051 2052 /* Structure that is used in SRv6 SRH Base initiator APIs, for managing device behavior at SRv6 Tunnel Encapsulation */ 2053 typedef struct bcm_compat6518_srv6_srh_base_initiator_info_s { 2054 uint32 flags; /* BCM_SRV6_SRH_BASE_INITIATOR_XXX */ 2055 bcm_gport_t tunnel_id; /* Tunnel SRv6 SRH base object ID */ 2056 int nof_sids; /* Number of SIDs in the SID list */ 2057 int qos_map_id; /* QOS map identifier */ 2058 int ttl; /* Tunnel header TTL */ 2059 int dscp; /* Tunnel header DSCP value */ 2060 bcm_qos_egress_model_t egress_qos_model; /* Egress qos and ttl model */ 2061 bcm_if_t next_encap_id; /* Next encapsulation ID */ 2062 } bcm_compat6518_srv6_srh_base_initiator_info_t; 2063 2064 /* Create/Get/Delete/Traverse SRv6 SRH Base properties */ 2065 extern int bcm_compat6518_srv6_srh_base_initiator_create( 2066 int unit, 2067 bcm_compat6518_srv6_srh_base_initiator_info_t *info); 2068 2069 /* Create/Get/Delete/Traverse SRv6 SRH Base properties */ 2070 extern int bcm_compat6518_srv6_srh_base_initiator_get( 2071 int unit, 2072 bcm_compat6518_srv6_srh_base_initiator_info_t *info); 2073 2074 /* Create/Get/Delete/Traverse SRv6 SRH Base properties */ 2075 extern int bcm_compat6518_srv6_srh_base_initiator_delete( 2076 int unit, 2077 bcm_compat6518_srv6_srh_base_initiator_info_t *info); 2078 2079 2080 /* CPRI Encap Information */ 2081 typedef struct bcm_compat6518_cpri_encap_info_s { 2082 uint32 flags; /* CPRI Encap Info flags */ 2083 uint16 flow_id; /* Flow ID */ 2084 bcm_cpri_roe_subtype_t subtype; /* RoE subtype */ 2085 bcm_cpri_hdr_encap_type_t hdr_type; /* CPRI header encapsulation type */ 2086 int roe_ordering_info_index; /* RoE ordering Info index */ 2087 int macda_index; /* Index to MAC DA address */ 2088 int macsa_index; /* Index to MAC SA address */ 2089 bcm_cpri_vlan_type_t vlan_type; /* CPRI Vlan type */ 2090 int vlan0_idx; /* VLAN 0 Table index */ 2091 int vlan1_idx; /* VLAN 1 table index */ 2092 int vlan0_priority; /* VLAN 0 priority */ 2093 int vlan1_priority; /* VLAN 1 priority */ 2094 uint8 vlan_ethertype_idx; /* VLAN EtherType index */ 2095 bcm_cpri_roe_opcode_t opcode; /* RoE opcode */ 2096 bcm_cpri_roe_frame_format_t type; /* RoE Frame Header Formatt */ 2097 uint8 version; /* Header Version used in RSVD3 */ 2098 uint32 ecpri_pc_id; /* PC_ID of eCPRI header, 16 bits for both eCPRI8 and eCPRI12 */ 2099 uint32 ecpri_msg_type; /* Message Type eCPRI header, 8 bits only */ 2100 } bcm_compat6518_cpri_encap_info_t; 2101 2102 /* Configure/Retrieve the encapsulation header info for a given AxC ID. */ 2103 extern int bcm_compat6518_cpri_port_encap_set( 2104 int unit, 2105 bcm_gport_t port, 2106 int queue_num, 2107 bcm_compat6518_cpri_encap_info_t *encap_config); 2108 2109 /* Configure/Retrieve the encapsulation header info for a given AxC ID. */ 2110 extern int bcm_compat6518_cpri_port_encap_get( 2111 int unit, 2112 bcm_gport_t port, 2113 int queue_num, 2114 bcm_compat6518_cpri_encap_info_t *encap_config); 2115 2116 /* Device-independent L2 egress structure. */ 2117 typedef struct bcm_compat6518_l2_egress_s { 2118 uint32 flags; /* BCM_L2_EGRESS_XXX flags. */ 2119 bcm_mac_t dest_mac; /* Destination MAC address to replace with. */ 2120 bcm_mac_t src_mac; /* Source MAC address to replace with. */ 2121 bcm_vlan_t outer_vlan; /* outer vlan tag to replace with. */ 2122 bcm_vlan_t inner_vlan; /* inner vlan tag to replace with. */ 2123 bcm_ethertype_t ethertype; /* EtherType to replace with. */ 2124 bcm_gport_t dest_port; /* Destination gport to associate this l2 egress entry with */ 2125 bcm_if_t encap_id; /* Encapsulation index */ 2126 uint16 outer_tpid; /* outer vlan tag TPID */ 2127 uint8 outer_prio; /* outer vlan tag User Priority */ 2128 uint16 inner_tpid; /* inner vlan tag TPID */ 2129 bcm_if_t l3_intf; /* L3 interface (tunnel). Used only in Native Routing overlay protocols. */ 2130 int vlan_qos_map_id; /* VLAN PCP-DEI QoS settings. Used only in Native Routing overlay protocols. */ 2131 int mpls_extended_label_value; /* An extended label placed on top of a an egress encapsulation. */ 2132 bcm_gport_t vlan_port_id; /* vlan gport identifier */ 2133 } bcm_compat6518_l2_egress_t; 2134 2135 /* Create an l2 egress entry. */ 2136 extern int bcm_compat6518_l2_egress_create( 2137 int unit, 2138 bcm_compat6518_l2_egress_t *egr); 2139 2140 /* Get the config of an l2 egress entry with specified encap_id. */ 2141 extern int bcm_compat6518_l2_egress_get( 2142 int unit, 2143 bcm_if_t encap_id, 2144 bcm_compat6518_l2_egress_t *egr); 2145 2146 /* Find the encap_id with a given egress config */ 2147 extern int bcm_compat6518_l2_egress_find( 2148 int unit, 2149 bcm_compat6518_l2_egress_t *egr, 2150 bcm_if_t *encap_id); 2151 2152 #if defined(INCLUDE_L3) 2153 /* L3 tunneling terminator. */ 2154 typedef struct bcm_compat6518_tunnel_terminator_s { 2155 uint32 flags; /* Configuration flags. */ 2156 uint32 multicast_flag; /* VXLAN Multicast trigger flags. */ 2157 bcm_vrf_t vrf; /* Virtual router instance. */ 2158 bcm_ip_t sip; /* SIP for tunnel header match. */ 2159 bcm_ip_t dip; /* DIP for tunnel header match. */ 2160 bcm_ip_t sip_mask; /* Source IP mask. */ 2161 bcm_ip_t dip_mask; /* Destination IP mask. */ 2162 bcm_ip6_t sip6; /* SIP for tunnel header match (IPv6). */ 2163 bcm_ip6_t dip6; /* DIP for tunnel header match (IPv6). */ 2164 bcm_ip6_t sip6_mask; /* Source IP mask (IPv6). */ 2165 bcm_ip6_t dip6_mask; /* Destination IP mask (IPv6). */ 2166 uint32 udp_dst_port; /* UDP dst port for UDP packets. */ 2167 uint32 udp_src_port; /* UDP src port for UDP packets */ 2168 bcm_tunnel_type_t type; /* Tunnel type */ 2169 bcm_pbmp_t pbmp; /* Port bitmap for this tunnel */ 2170 bcm_vlan_t vlan; /* The VLAN ID or L3 ingress interface ID for IPMC lookup or WLAN tunnel */ 2171 bcm_vlan_t fwd_vlan; /* VLAN ID for forwarding terminated IP Tunnel */ 2172 bcm_gport_t remote_port; /* Remote termination */ 2173 bcm_gport_t tunnel_id; /* Tunnel id */ 2174 int if_class; /* L3 interface class this tunnel. */ 2175 bcm_multicast_t failover_mc_group; /* MC group used for bi-cast. */ 2176 bcm_failover_t ingress_failover_id; /* 1+1 protection. */ 2177 bcm_failover_t failover_id; /* Failover Object Identifier for protected tunnel. */ 2178 bcm_gport_t failover_tunnel_id; /* Failover Tunnel ID. */ 2179 bcm_if_t tunnel_if; /* hierarchical interface. */ 2180 int tunnel_class; /* Tunnel class id for VFP match. */ 2181 int qos_map_id; /* QoS DSCP map this tunnel. */ 2182 int inlif_counting_profile; /* In LIF counting profile */ 2183 int tunnel_term_ecn_map_id; /* Tunnel termination ecn map id. */ 2184 bcm_qos_ingress_model_t ingress_qos_model; /* ingress qos and ttl model */ 2185 int priority; /* Entry priority. */ 2186 int subport_pbmp_profile_id; /* profile id for allowed subports on this tunnel. */ 2187 } bcm_compat6518_tunnel_terminator_t; 2188 2189 /* Add a tunnel terminator for DIP-SIP key. */ 2190 extern int bcm_compat6518_tunnel_terminator_add( 2191 int unit, 2192 bcm_compat6518_tunnel_terminator_t *info); 2193 2194 /* Add a tunnel terminator for DIP-SIP key. */ 2195 extern int bcm_compat6518_tunnel_terminator_create( 2196 int unit, 2197 bcm_compat6518_tunnel_terminator_t *info); 2198 2199 /* Delete a tunnel terminator for DIP-SIP key. */ 2200 extern int bcm_compat6518_tunnel_terminator_delete( 2201 int unit, 2202 bcm_compat6518_tunnel_terminator_t *info); 2203 2204 /* Update a tunnel terminator for DIP-SIP key. */ 2205 extern int bcm_compat6518_tunnel_terminator_update( 2206 int unit, 2207 bcm_compat6518_tunnel_terminator_t *info); 2208 2209 /* Get a tunnel terminator for DIP-SIP key. */ 2210 extern int bcm_compat6518_tunnel_terminator_get( 2211 int unit, 2212 bcm_compat6518_tunnel_terminator_t *info); 2213 2214 /* Create VXLAN Tunnel terminator. */ 2215 extern int bcm_compat6518_vxlan_tunnel_terminator_create( 2216 int unit, 2217 bcm_compat6518_tunnel_terminator_t *info); 2218 2219 /* Update multicast/active state per VXLAN Tunnel terminator. */ 2220 extern int bcm_compat6518_vxlan_tunnel_terminator_update( 2221 int unit, 2222 bcm_compat6518_tunnel_terminator_t *info); 2223 2224 /* Get VXLAN Tunnel terminator. */ 2225 extern int bcm_compat6518_vxlan_tunnel_terminator_get( 2226 int unit, 2227 bcm_compat6518_tunnel_terminator_t *info); 2228 2229 /* Create L2GRE Tunnel terminator. */ 2230 extern int bcm_compat6518_l2gre_tunnel_terminator_create( 2231 int unit, 2232 bcm_compat6518_tunnel_terminator_t *info); 2233 2234 /* Update L2GRE Tunnel terminator. */ 2235 extern int bcm_compat6518_l2gre_tunnel_terminator_update( 2236 int unit, 2237 bcm_compat6518_tunnel_terminator_t *info); 2238 2239 /* Get L2GRE Tunnel terminator. */ 2240 extern int bcm_compat6518_l2gre_tunnel_terminator_get( 2241 int unit, 2242 bcm_compat6518_tunnel_terminator_t *info); 2243 2244 #endif /* defined(INCLUDE_L3) */ 2245 2246 /* 2247 * Flex counter configuration structure. Used to attach or detach the 2248 * flex counter to field entry. 2249 */ 2250 typedef struct bcm_compat6518_field_flexctr_config_s { 2251 uint32 flexctr_action_id; /* Flex counter action ID. */ 2252 uint32 counter_index; /* Index to the counters associated to the flex 2253 counter action. */ 2254 } bcm_compat6518_field_flexctr_config_t; 2255 2256 /* Attach the flexctr for a given field entry. */ 2257 extern int bcm_compat6518_field_entry_flexctr_attach( 2258 int unit, 2259 bcm_field_entry_t entry, 2260 bcm_compat6518_field_flexctr_config_t *flexctr_cfg); 2261 2262 /* Detach the flexctr for a given field entry. */ 2263 extern int bcm_compat6518_field_entry_flexctr_detach( 2264 int unit, 2265 bcm_field_entry_t entry, 2266 bcm_compat6518_field_flexctr_config_t *flexctr_cfg); 2267 2268 /* PP statistic profile. */ 2269 typedef struct bcm_compat6518_stat_pp_profile_info_s { 2270 int counter_command_id; /* Command id (interface id). */ 2271 int stat_object_type; /* Statistic object type in range 0-BCM_STAT_MAX_NUMBER_OF_OBJECT_TYPES-1 */ 2272 int meter_command_id; /* Relevant only for egress */ 2273 int meter_qos_map_id; /* Relevant only for egress */ 2274 uint8 is_meter_enable; /* Allow metering */ 2275 uint8 is_fp_cs_var; /* Enable PMF2 context selection */ 2276 } bcm_compat6518_stat_pp_profile_info_t; 2277 2278 /* Map {statistic command, statistic profile} to the profile properties */ 2279 extern int bcm_compat6518_stat_pp_profile_create( 2280 int unit, 2281 int flags, 2282 bcm_stat_counter_interface_type_t engine_source, 2283 int *stat_pp_profile, 2284 bcm_compat6518_stat_pp_profile_info_t *stat_pp_profile_info); 2285 2286 /* Get profile properties according to stat_pp_profile */ 2287 extern int bcm_compat6518_stat_pp_profile_get( 2288 int unit, 2289 int stat_pp_profile, 2290 bcm_compat6518_stat_pp_profile_info_t *stat_pp_profile_info); 2291 2292 #if defined(INCLUDE_L3) 2293 /* VXLAN Gport */ 2294 typedef struct bcm_compat6518_vxlan_port_s { 2295 bcm_gport_t vxlan_port_id; /* GPORT identifier. */ 2296 uint32 flags; /* BCM_VXLAN_PORT_xxx. */ 2297 uint32 if_class; /* Interface class ID. */ 2298 uint16 int_pri; /* Internal Priority */ 2299 uint8 pkt_pri; /* Packet Priority */ 2300 uint8 pkt_cfi; /* Packet CFI */ 2301 uint16 egress_service_tpid; /* Service Vlan TPID Value */ 2302 bcm_vlan_t egress_service_vlan; /* SD-TAG Vlan ID. */ 2303 uint16 mtu; /* MTU */ 2304 bcm_gport_t match_port; /* Match port / trunk */ 2305 bcm_vxlan_port_match_t criteria; /* Match criteria */ 2306 bcm_vlan_t match_vlan; /* Outer VLAN ID to match. */ 2307 bcm_vlan_t match_inner_vlan; /* Inner VLAN ID to match. */ 2308 bcm_gport_t egress_tunnel_id; /* Tunnel Initiator ID */ 2309 bcm_gport_t match_tunnel_id; /* Tunnel Terminator ID */ 2310 bcm_if_t egress_if; /* VXLAN egress object. */ 2311 bcm_switch_network_group_t network_group_id; /* Split Horizon network group identifier. */ 2312 uint32 vnid; /* VXLAN packet VNID. */ 2313 int qos_map_id; /* QoS Mapped priority */ 2314 uint8 tunnel_pkt_pri; /* Tunnel Packet Priority */ 2315 uint8 tunnel_pkt_cfi; /* Tunnel Packet CFI */ 2316 uint32 flags2; /* BCM_VXLAN_PORT_FLAGS2_xxx. */ 2317 } bcm_compat6518_vxlan_port_t; 2318 2319 /* bcm_vxlan_port_add adds a Access or Network VXLAN port */ 2320 extern int bcm_compat6518_vxlan_port_add( 2321 int unit, 2322 bcm_vpn_t l2vpn, 2323 bcm_compat6518_vxlan_port_t *vxlan_port); 2324 2325 /* Get VXLAN port information. */ 2326 extern int bcm_compat6518_vxlan_port_get( 2327 int unit, 2328 bcm_vpn_t l2vpn, 2329 bcm_compat6518_vxlan_port_t *vxlan_port); 2330 2331 /* Get all VXLAN port information. */ 2332 extern int bcm_compat6518_vxlan_port_get_all( 2333 int unit, 2334 bcm_vpn_t l2vpn, 2335 int port_max, 2336 bcm_compat6518_vxlan_port_t *port_array, 2337 int *port_count); 2338 2339 #endif /* defined(INCLUDE_L3) */ 2340 2341 #endif /* BCM_RPC_SUPPORT */ 2342 #endif /* !_COMPAT_6518_H */