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.c (1124B)


      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 
      8 #include <bcm/vswitch.h>
      9 #include <bcm/stg.h>
     10 #include <soc/mem.h>
     11 
     12 /* Initialize the bcm_vswitch_cross_connect_t struct. */
     13 void bcm_vswitch_cross_connect_t_init(bcm_vswitch_cross_connect_t *cross_connect){
     14 	cross_connect->encap1 = BCM_FORWARD_ENCAP_ID_INVALID;
     15 	cross_connect->encap2 = BCM_FORWARD_ENCAP_ID_INVALID;
     16 	cross_connect->flags = 0;
     17 	cross_connect->port1 = 0;
     18 	cross_connect->port2 = 0;
     19 }
     20 
     21 void bcm_vswitch_flexible_connect_fwd_t_init(
     22     bcm_vswitch_flexible_connect_fwd_t *vswitch_flexible_connect_fwd) 
     23 {
     24   vswitch_flexible_connect_fwd->forward_port = BCM_GPORT_INVALID;
     25   vswitch_flexible_connect_fwd->forward_encap = BCM_FORWARD_ENCAP_ID_INVALID;
     26 }
     27 
     28 
     29 void bcm_vswitch_flexible_connect_match_t_init(
     30     bcm_vswitch_flexible_connect_match_t *flexible_connect_match)
     31 {
     32     if (flexible_connect_match != NULL) {
     33         sal_memset(flexible_connect_match, 0, sizeof(*flexible_connect_match));
     34     }
     35 }