openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

compat_6510.h (5111B)


      1 /*
      2  * $Id: compat_6510.h,v 1.0 2018/02/26
      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.10 routines
      8  */
      9 
     10 #ifndef _COMPAT_6510_H_
     11 #define _COMPAT_6510_H_
     12 
     13 #ifdef  BCM_RPC_SUPPORT
     14 #include <bcm/types.h>
     15 #include <bcm/l2.h>
     16 
     17 /* Device-independent L2 address structure. */
     18 typedef struct bcm_compat6510_l2_addr_s {
     19     uint32 flags;                       /* BCM_L2_xxx flags. */
     20     uint32 station_flags;               /* BCM_L2_STATION_xxx flags. */
     21     bcm_mac_t mac;                      /* 802.3 MAC address. */
     22     bcm_vlan_t vid;                     /* VLAN identifier. */
     23     int port;                           /* Zero-based port number. */
     24     int modid;                          /* XGS: modid. */
     25     bcm_trunk_t tgid;                   /* Trunk group ID. */
     26     bcm_cos_t cos_dst;                  /* COS based on dst addr. */
     27     bcm_cos_t cos_src;                  /* COS based on src addr. */
     28     bcm_multicast_t l2mc_group;         /* XGS: index in L2MC table. */
     29     bcm_pbmp_t block_bitmap;            /* XGS: blocked egress bitmap. */
     30     int auth;                           /* Used if auth enabled on port. */
     31     int group;                          /* Group number for FP. */
     32     bcm_fabric_distribution_t distribution_class; /* Fabric Distribution Class. */
     33     int encap_id;                       /* out logical interface */
     34     int age_state;                      /* Age state of the entry */
     35     uint32 flow_handle;                 /* FLOW handle for flex entries. */
     36     uint32 flow_option_handle;          /* FLOW option handle for flex entries. */
     37     bcm_flow_logical_field_t logical_fields[BCM_FLOW_MAX_NOF_LOGICAL_FIELDS]; /* logical fields array for flex
     38                                                                                  entries. */
     39     uint32 num_of_fields;               /* number of logical fields. */
     40     bcm_pbmp_t sa_source_filter_pbmp;   /* Source port filter bitmap for this SA */
     41     bcm_tsn_flowset_t tsn_flowset;      /* Time-Sensitive Networking: associated
     42                                            flow set */
     43     bcm_tsn_sr_flowset_t sr_flowset;    /* Seamless Redundancy: associated flow
     44                                            set */
     45     bcm_policer_t policer_id;           /* Base policer to be used */
     46     bcm_tsn_pri_map_t taf_gate_primap; /* TAF (Time Aware Filtering) gate
     47                                            priority mapping */
     48 } bcm_compat6510_l2_addr_t;
     49 
     50 extern int bcm_compat6510_l2_addr_add(int unit,
     51                                       bcm_compat6510_l2_addr_t *l2addr);
     52 extern int bcm_compat6510_l2_addr_multi_add(int unit,
     53                                             bcm_compat6510_l2_addr_t *l2addr, int count);
     54 extern int bcm_compat6510_l2_addr_multi_delete(int unit,
     55                                                bcm_compat6510_l2_addr_t *l2addr, int count);
     56 extern int bcm_compat6510_l2_addr_get(int unit, bcm_mac_t mac_addr, bcm_vlan_t vid,
     57                                       bcm_compat6510_l2_addr_t *l2addr);
     58 extern int bcm_compat6510_l2_conflict_get(int unit, bcm_compat6510_l2_addr_t *addr,
     59                                           bcm_compat6510_l2_addr_t *cf_array, int cf_max,
     60                                           int *cf_count);
     61 extern int bcm_compat6510_l2_replace(int unit, uint32 flags,
     62                                      bcm_compat6510_l2_addr_t *match_addr,
     63                                      bcm_module_t new_module,
     64                                      bcm_port_t new_port, bcm_trunk_t new_trunk);
     65 extern int bcm_compat6510_l2_replace_match(int unit, uint32 flags,
     66                                            bcm_compat6510_l2_addr_t *match_addr,
     67                                            bcm_compat6510_l2_addr_t *mask_addr,
     68                                            bcm_compat6510_l2_addr_t *replace_addr,
     69                                            bcm_compat6510_l2_addr_t *replace_mask_addr);
     70 extern int bcm_compat6510_l2_stat_get(int unit,
     71                                       bcm_compat6510_l2_addr_t *l2addr,
     72                                       bcm_l2_stat_t stat, uint64 *val);
     73 extern int bcm_compat6510_l2_stat_get32(int unit,
     74                                         bcm_compat6510_l2_addr_t *l2addr,
     75                                         bcm_l2_stat_t stat, uint32 *val);
     76 extern int bcm_compat6510_l2_stat_set(int unit,
     77                                       bcm_compat6510_l2_addr_t *l2addr,
     78                                       bcm_l2_stat_t stat, uint64 val);
     79 extern int bcm_compat6510_l2_stat_set32(int unit,
     80                                         bcm_compat6510_l2_addr_t *l2addr,
     81                                         bcm_l2_stat_t stat, uint32 val);
     82 extern int bcm_compat6510_l2_stat_enable_set(int unit,
     83                                              bcm_compat6510_l2_addr_t *l2addr,
     84                                              int enable);
     85 #endif
     86 #endif	/* !_COMPAT_6510_H */