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

vswitch.h (1184B)


      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  * File:        vswitch.h
      8  * Purpose:     vswitch internal definitions to the BCM library.
      9  */
     10 
     11 #ifndef   _BCM_INT_DNX_VSWITCH_H_
     12 #define   _BCM_INT_DNX_VSWITCH_H_
     13 
     14 #include <bcm/types.h>
     15 
     16 /**
     17 * \brief 
     18 * VSWITCH gport can be AC (VLAN-Port) or MPLS-Port or Tunnel or EXTENDER-Port
     19 */
     20 #define _SHR_GPORT_IS_VSWITCH(_gport) (_SHR_GPORT_IS_VLAN_PORT(_gport) || (_SHR_GPORT_IS_MPLS_PORT(_gport)) || (_SHR_GPORT_IS_TUNNEL(_gport)) || (_SHR_GPORT_IS_EXTENDER_PORT(_gport)))
     21 
     22 /**
     23  * \brief - function returns whether a table handle ID is P2P
     24  * \remark
     25  * The table handle needs to be allocated and "get all fields" was performed before calling this function
     26  */
     27 shr_error_e dnx_vswitch_entry_is_p2p(
     28     int unit,
     29     uint32 entry_handle_id,
     30     int *is_p2p);
     31 
     32 /**
     33  * \brief - function returns whether a given VLAN-Port / MPLS-Port / Tunnel gport is P2P
     34  */
     35 shr_error_e dnx_vswitch_is_p2p(
     36     int unit,
     37     bcm_gport_t gport,
     38     int *is_p2p);
     39 
     40 #endif /* _BCM_INT_DNX_VSWITCH_H_ */