tr_hash.h (1815B)
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-2020 Broadcom Inc. All rights reserved. 6 * 7 * TRX Hash Test definitions. 8 */ 9 10 #ifndef __TR_HASH__H 11 #define __TR_HASH__H 12 13 /* 14 * TRX Hash Test Data Structure 15 */ 16 17 typedef struct tr_hash_testdata_s { 18 int unit; 19 int opt_count; 20 int opt_verbose; 21 int opt_reset; 22 int opt_hash; 23 int opt_dual_hash; 24 int opt_base_ovid; 25 int opt_base_ivid; 26 int opt_vid_inc; /* VID increment */ 27 int opt_base_label; 28 int opt_label_inc; /* MPLS label increment */ 29 COMPILER_DOUBLE tm; 30 uint32 save_hash_control; 31 int hash_count; /* Hash Alg count */ 32 soc_mem_t mem; 33 #if defined(BCM_TRIDENT3_SUPPORT) || defined(BCM_TOMAHAWK3_SUPPORT) 34 int td3_hash_tbl_data[2]; 35 #endif 36 #if defined(BCM_TRIDENT3_SUPPORT) 37 l2_entry_hash_control_entry_t save_xlate_hash_control; 38 #endif 39 } tr_hash_testdata_t; 40 41 #define TR_VID_MAX (0xfff) 42 #define TR_LABEL_MAX (0xfffff) 43 #define TR_DEFAULT_HASH FB_HASH_LSB 44 45 /* Test structure, to retain test settings between runs */ 46 typedef struct tr_hash_test_s { 47 int lw_set_up; /* TRUE if tr_hash_setup() done */ 48 tr_hash_testdata_t lp_hash; /* hash Parameters */ 49 tr_hash_testdata_t lp_ov; /* overflow Parameters */ 50 tr_hash_testdata_t *lp_cur; /* Current test parameters */ 51 int lw_unit; /* Unit # */ 52 } tr_hash_test_t; 53 54 #endif /*!__TR_HASH__H */