switch_tpid.h (1432B)
1 /** \file bcm_int/dnx/switch/switch_tpid.h 2 * 3 * Internal DNX SWITCH-TPID APIs 4 * 5 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 6 * 7 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 8 */ 9 10 #ifndef SWITCH_TPID_H_INCLUDED 11 /* { */ 12 # define SWITCH_TPID_H_INCLUDED 13 14 # ifndef BCM_DNX_SUPPORT 15 # error "This file is for use by DNX (JR2) family only!" 16 # endif 17 18 /** TPID invalid index: Table index is [0..7] */ 19 #define BCM_DNX_SWITCH_TPID_INDEX_INVALID (-1) 20 21 /** There are 8 globals TPIDs: 22 * See the Programming Guide PP document for full details */ 23 #define BCM_DNX_SWITCH_TPID_NUM_OF_GLOBALS (8) 24 25 /** There are 7 valid globals TPIDs: 26 * See the Programming Guide PP document for full details */ 27 #define BCM_DNX_SWITCH_TPID_NUM_OF_VALID_GLOBALS (7) 28 29 /** TPID7 is reserved: 30 * See the Programming Guide PP document for full details */ 31 #define BCM_DNX_SWITCH_TPID_RESERVED_ENTRY (7) 32 33 /* Tag Protocol Identifier (TPID) value for CoE */ 34 #define DNX_TPID_VALUE_COE (0x8100) 35 36 shr_error_e dnx_switch_tpid_value_get( 37 int unit, 38 int tpid_index, 39 uint16 *tpid_value); 40 41 shr_error_e dnx_switch_tpid_value_set( 42 int unit, 43 int tpid_index, 44 uint16 tpid_value); 45 46 shr_error_e dnx_switch_tpid_index_get( 47 int unit, 48 uint16 tpid_value, 49 int *tpid_index); 50 51 /* } */ 52 #endif /* SWITCH_TPID_H_INCLUDED */