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

pstats.h (1520B)


      1 /*
      2  * 
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * File for SOC Pktstats structures and routines
      8  */
      9 
     10 #ifndef __SOC_PSTATS_H__
     11 #define __SOC_PSTATS_H__
     12 
     13 typedef struct soc_pstats_mem_desc {
     14     soc_mem_t mem;
     15     uint32 width;
     16     uint32 entries;
     17     uint32 shift;
     18     int mor_dma;
     19 } soc_pstats_mem_desc_t;
     20 
     21 #define MAX_PSTATS_MEM_PER_BLK  32
     22 
     23 typedef struct soc_pstats_tbl_desc {
     24     soc_block_t blk;
     25     soc_mem_t bmem;
     26     int pipe_enum;
     27     int mor_dma;
     28     soc_pstats_mem_desc_t desc[MAX_PSTATS_MEM_PER_BLK];
     29     int pattern_set;
     30     soc_mem_t mem;
     31     uint32 index;
     32     uint32 count;
     33 } soc_pstats_tbl_desc_t;
     34 
     35 typedef struct soc_pstats_tbl_ctrl {
     36     soc_block_t blk;
     37     uint32 tindex;
     38     uint32 entries;
     39     uint8 *buff;
     40     uint32 size;
     41     int flags;
     42     sal_sem_t dma_done;
     43 } soc_pstats_tbl_ctrl_t;
     44 
     45 extern int soc_pstats_init(int unit);
     46 extern int soc_pstats_deinit(int unit);
     47 extern int soc_pstats_tbl_pattern_get(int unit, soc_pstats_tbl_desc_t *tdesc,
     48                                       soc_mem_t *mem, uint32 *index, uint32 *count);
     49 extern int soc_pstats_tbl_pattern_set(int unit, soc_pstats_tbl_desc_t *tdesc,
     50                                       soc_mem_t mem, uint32 index, uint32 count);
     51 extern int soc_pstats_sync(int unit);
     52 extern int soc_pstats_mem_get(int unit, soc_mem_t mem, uint8 *buf, int sync);
     53 
     54 #endif /* __SOC_PSTATS_H__ */
     55