text: /** \file algo/swstate/auto_generated/access/algo_qos_access.c
   *
   * sw state functions definitions
   *
   * DO NOT EDIT THIS FILE!
   * This file is auto-generated.
   * Edits to this file will be lost when it is regenerated.
   */
  /*
   * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
   * 
   * Copyright 2007-2020 Broadcom Inc. All rights reserved.
   */
  
  #ifdef BSL_LOG_MODULE
  #error "BSL_LOG_MODULE redefined"
  #endif
  #define BSL_LOG_MODULE BSL_LS_SWSTATEDNX_GENERAL
  
  #include <soc/dnxc/swstate/dnxc_sw_state_c_includes.h>
  #include <bcm_int/dnx/algo/swstate/auto_generated/access/algo_qos_access.h>
  #include <bcm_int/dnx/algo/swstate/auto_generated/diagnostic/algo_qos_diagnostic.h>
  /*
   * Global Variables
   */
  
  /* dummy variable for gdb to know this type */
  algo_qos_sw_state_t* algo_qos_db_dummy = NULL;
  /*
   * FUNCTIONs
   */
  
  /*
   *
   * is_init function for the variable algo_qos_db
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_is_init(int unit, uint8 *is_init)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_INIT,
          DNXC_SW_STATE_NO_FLAGS);
  
      *is_init = (NULL != ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]));
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_IS_INIT_LOGGING,
          BSL_LS_SWSTATEDNX_ISINIT,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]),
          "algo_qos_db[%d]",
          unit);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * init function for the variable algo_qos_db
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_init(int unit)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_INIT,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNX_SW_STATE_MODULE_INIT(
          unit,
          ALGO_QOS_MODULE_ID,
          DNXC_SW_STATE_IMPLEMENTATION_WB,
          algo_qos_sw_state_t,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION,
          "algo_qos_db_init");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_INIT_LOGGING,
          BSL_LS_SWSTATEDNX_INIT,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]),
          "algo_qos_db[%d]",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_UPDATE(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INFO,
          DNX_SW_STATE_DIAG_ALLOC,
          sizeof(algo_qos_sw_state_t),
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_set(int unit, dnx_algo_res_t ingress_qos)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          ingress_qos,
          dnx_algo_res_t,
          0,
          "algo_qos_db_ingress_qos_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_get(int unit, dnx_algo_res_t *ingress_qos)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          ingress_qos);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *ingress_qos = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get_next function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_get_next(int unit, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET_NEXT,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_GET_NEXT(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_GET_NEXT_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRGET_NEXT,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * dump_info_get function for the variable ingress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_dump_info_get(int unit, dnx_algo_res_dump_data_t * info)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_DUMP_INFO_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_DUMP_INFO_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          info);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_DUMP_INFO_GET_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRDUMP_INFO_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos,
          "algo_qos_db[%d]->ingress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_set(int unit, dnx_algo_res_t ingress_qos_ecn)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          ingress_qos_ecn,
          dnx_algo_res_t,
          0,
          "algo_qos_db_ingress_qos_ecn_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_get(int unit, dnx_algo_res_t *ingress_qos_ecn)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          ingress_qos_ecn);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *ingress_qos_ecn = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get_next function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_get_next(int unit, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET_NEXT,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_GET_NEXT(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_GET_NEXT_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRGET_NEXT,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * dump_info_get function for the variable ingress_qos_ecn
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_dump_info_get(int unit, dnx_algo_res_dump_data_t * info)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_DUMP_INFO_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_DUMP_INFO_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          info);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_DUMP_INFO_GET_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRDUMP_INFO_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn,
          "algo_qos_db[%d]->ingress_qos_ecn",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable ingress_qos_phb_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_phb_opcode_set(int unit, dnx_algo_res_t ingress_qos_phb_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          ingress_qos_phb_opcode,
          dnx_algo_res_t,
          0,
          "algo_qos_db_ingress_qos_phb_opcode_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &ingress_qos_phb_opcode,
          "algo_qos_db[%d]->ingress_qos_phb_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_PHB_OPCODE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable ingress_qos_phb_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_phb_opcode_get(int unit, dnx_algo_res_t *ingress_qos_phb_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          ingress_qos_phb_opcode);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *ingress_qos_phb_opcode = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          "algo_qos_db[%d]->ingress_qos_phb_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_PHB_OPCODE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable ingress_qos_phb_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_phb_opcode_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          "algo_qos_db[%d]->ingress_qos_phb_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_PHB_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable ingress_qos_phb_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_phb_opcode_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          "algo_qos_db[%d]->ingress_qos_phb_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_PHB_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable ingress_qos_phb_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_phb_opcode_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          "algo_qos_db[%d]->ingress_qos_phb_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_PHB_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable ingress_qos_phb_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_phb_opcode_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_phb_opcode,
          "algo_qos_db[%d]->ingress_qos_phb_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_PHB_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable ingress_qos_remark_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_remark_opcode_set(int unit, dnx_algo_res_t ingress_qos_remark_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          ingress_qos_remark_opcode,
          dnx_algo_res_t,
          0,
          "algo_qos_db_ingress_qos_remark_opcode_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &ingress_qos_remark_opcode,
          "algo_qos_db[%d]->ingress_qos_remark_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_REMARK_OPCODE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable ingress_qos_remark_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_remark_opcode_get(int unit, dnx_algo_res_t *ingress_qos_remark_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          ingress_qos_remark_opcode);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *ingress_qos_remark_opcode = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          "algo_qos_db[%d]->ingress_qos_remark_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_REMARK_OPCODE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable ingress_qos_remark_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_remark_opcode_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          "algo_qos_db[%d]->ingress_qos_remark_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_REMARK_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable ingress_qos_remark_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_remark_opcode_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          "algo_qos_db[%d]->ingress_qos_remark_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_REMARK_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable ingress_qos_remark_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_remark_opcode_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          "algo_qos_db[%d]->ingress_qos_remark_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_REMARK_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable ingress_qos_remark_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_remark_opcode_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_remark_opcode,
          "algo_qos_db[%d]->ingress_qos_remark_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_REMARK_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable ingress_qos_ecn_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_opcode_set(int unit, dnx_algo_res_t ingress_qos_ecn_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          ingress_qos_ecn_opcode,
          dnx_algo_res_t,
          0,
          "algo_qos_db_ingress_qos_ecn_opcode_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &ingress_qos_ecn_opcode,
          "algo_qos_db[%d]->ingress_qos_ecn_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_OPCODE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable ingress_qos_ecn_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_opcode_get(int unit, dnx_algo_res_t *ingress_qos_ecn_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          ingress_qos_ecn_opcode);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *ingress_qos_ecn_opcode = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          "algo_qos_db[%d]->ingress_qos_ecn_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_OPCODE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable ingress_qos_ecn_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_opcode_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          "algo_qos_db[%d]->ingress_qos_ecn_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable ingress_qos_ecn_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_opcode_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          "algo_qos_db[%d]->ingress_qos_ecn_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable ingress_qos_ecn_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_opcode_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          "algo_qos_db[%d]->ingress_qos_ecn_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable ingress_qos_ecn_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_ecn_opcode_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_ecn_opcode,
          "algo_qos_db[%d]->ingress_qos_ecn_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_ECN_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable ingress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_policer_set(int unit, dnx_algo_res_t ingress_qos_policer)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          ingress_qos_policer,
          dnx_algo_res_t,
          0,
          "algo_qos_db_ingress_qos_policer_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &ingress_qos_policer,
          "algo_qos_db[%d]->ingress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable ingress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_policer_get(int unit, dnx_algo_res_t *ingress_qos_policer)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          ingress_qos_policer);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *ingress_qos_policer = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          "algo_qos_db[%d]->ingress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable ingress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_policer_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          "algo_qos_db[%d]->ingress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable ingress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_policer_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          "algo_qos_db[%d]->ingress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable ingress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_policer_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          "algo_qos_db[%d]->ingress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable ingress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_policer_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_policer,
          "algo_qos_db[%d]->ingress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable ingress_qos_vlan_pcp
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_vlan_pcp_set(int unit, dnx_algo_res_t ingress_qos_vlan_pcp)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          ingress_qos_vlan_pcp,
          dnx_algo_res_t,
          0,
          "algo_qos_db_ingress_qos_vlan_pcp_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &ingress_qos_vlan_pcp,
          "algo_qos_db[%d]->ingress_qos_vlan_pcp",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_VLAN_PCP_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable ingress_qos_vlan_pcp
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_vlan_pcp_get(int unit, dnx_algo_res_t *ingress_qos_vlan_pcp)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          ingress_qos_vlan_pcp);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *ingress_qos_vlan_pcp = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          "algo_qos_db[%d]->ingress_qos_vlan_pcp",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_VLAN_PCP_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable ingress_qos_vlan_pcp
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_vlan_pcp_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          "algo_qos_db[%d]->ingress_qos_vlan_pcp",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_VLAN_PCP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable ingress_qos_vlan_pcp
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_vlan_pcp_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          "algo_qos_db[%d]->ingress_qos_vlan_pcp",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_VLAN_PCP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable ingress_qos_vlan_pcp
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_vlan_pcp_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          "algo_qos_db[%d]->ingress_qos_vlan_pcp",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_VLAN_PCP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable ingress_qos_vlan_pcp
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_vlan_pcp_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          "algo_qos_db[%d]->ingress_qos_vlan_pcp",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_VLAN_PCP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * nof_allocated_elements_in_range_get function for the variable ingress_qos_vlan_pcp
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_ingress_qos_vlan_pcp_nof_allocated_elements_in_range_get(int unit, int range_start, int nof_elements_in_range, int *nof_allocated_elements)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_NOF_ALLOCATED_ELEMENTS_IN_RANGE_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_NOF_ALLOCATED_ELEMENTS_IN_RANGE_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          range_start,
          nof_elements_in_range,
          nof_allocated_elements);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_NOF_ALLOCATED_ELEMENTS_IN_RANGE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRNOF_ALLOCATED_ELEMENTS_IN_RANGE_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->ingress_qos_vlan_pcp,
          "algo_qos_db[%d]->ingress_qos_vlan_pcp",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_INGRESS_QOS_VLAN_PCP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable egress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_set(int unit, dnx_algo_res_t egress_qos)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          egress_qos,
          dnx_algo_res_t,
          0,
          "algo_qos_db_egress_qos_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &egress_qos,
          "algo_qos_db[%d]->egress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable egress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_get(int unit, dnx_algo_res_t *egress_qos)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          egress_qos);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *egress_qos = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          "algo_qos_db[%d]->egress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable egress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          "algo_qos_db[%d]->egress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable egress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          "algo_qos_db[%d]->egress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable egress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          "algo_qos_db[%d]->egress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable egress_qos
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos,
          "algo_qos_db[%d]->egress_qos",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_set(int unit, dnx_algo_res_t egress_qos_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          egress_qos_opcode,
          dnx_algo_res_t,
          0,
          "algo_qos_db_egress_qos_opcode_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_get(int unit, dnx_algo_res_t *egress_qos_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          egress_qos_opcode);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *egress_qos_opcode = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_several function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_allocate_several(int unit, uint32 flags, uint32 nof_elements, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SEVERAL,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SEVERAL(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          flags,
          nof_elements,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SEVERAL_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SEVERAL,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_several function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_free_several(int unit, uint32 nof_elements, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SEVERAL,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SEVERAL(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          nof_elements,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SEVERAL_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SEVERAL,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable egress_qos_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_opcode_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_opcode,
          "algo_qos_db[%d]->egress_qos_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable egress_qos_mpls_php
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_mpls_php_set(int unit, dnx_algo_res_t egress_qos_mpls_php)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          egress_qos_mpls_php,
          dnx_algo_res_t,
          0,
          "algo_qos_db_egress_qos_mpls_php_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &egress_qos_mpls_php,
          "algo_qos_db[%d]->egress_qos_mpls_php",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_MPLS_PHP_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable egress_qos_mpls_php
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_mpls_php_get(int unit, dnx_algo_res_t *egress_qos_mpls_php)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          egress_qos_mpls_php);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *egress_qos_mpls_php = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          "algo_qos_db[%d]->egress_qos_mpls_php",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_MPLS_PHP_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable egress_qos_mpls_php
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_mpls_php_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          "algo_qos_db[%d]->egress_qos_mpls_php",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_MPLS_PHP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable egress_qos_mpls_php
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_mpls_php_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          "algo_qos_db[%d]->egress_qos_mpls_php",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_MPLS_PHP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable egress_qos_mpls_php
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_mpls_php_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          "algo_qos_db[%d]->egress_qos_mpls_php",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_MPLS_PHP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable egress_qos_mpls_php
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_mpls_php_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_mpls_php,
          "algo_qos_db[%d]->egress_qos_mpls_php",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_MPLS_PHP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable egress_qos_php_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_php_opcode_set(int unit, dnx_algo_res_t egress_qos_php_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          egress_qos_php_opcode,
          dnx_algo_res_t,
          0,
          "algo_qos_db_egress_qos_php_opcode_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &egress_qos_php_opcode,
          "algo_qos_db[%d]->egress_qos_php_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_PHP_OPCODE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable egress_qos_php_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_php_opcode_get(int unit, dnx_algo_res_t *egress_qos_php_opcode)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          egress_qos_php_opcode);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *egress_qos_php_opcode = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          "algo_qos_db[%d]->egress_qos_php_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_PHP_OPCODE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable egress_qos_php_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_php_opcode_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          "algo_qos_db[%d]->egress_qos_php_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_PHP_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable egress_qos_php_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_php_opcode_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          "algo_qos_db[%d]->egress_qos_php_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_PHP_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable egress_qos_php_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_php_opcode_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          "algo_qos_db[%d]->egress_qos_php_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_PHP_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable egress_qos_php_opcode
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_php_opcode_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_php_opcode,
          "algo_qos_db[%d]->egress_qos_php_opcode",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_PHP_OPCODE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable egress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_policer_set(int unit, dnx_algo_res_t egress_qos_policer)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          egress_qos_policer,
          dnx_algo_res_t,
          0,
          "algo_qos_db_egress_qos_policer_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &egress_qos_policer,
          "algo_qos_db[%d]->egress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable egress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_policer_get(int unit, dnx_algo_res_t *egress_qos_policer)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          egress_qos_policer);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *egress_qos_policer = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          "algo_qos_db[%d]->egress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable egress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_policer_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          "algo_qos_db[%d]->egress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable egress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_policer_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          "algo_qos_db[%d]->egress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable egress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_policer_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          "algo_qos_db[%d]->egress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable egress_qos_policer
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_policer_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_policer,
          "algo_qos_db[%d]->egress_qos_policer",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_POLICER_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable egress_qos_oam_pcp_map
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_oam_pcp_map_set(int unit, dnx_algo_res_t egress_qos_oam_pcp_map)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          egress_qos_oam_pcp_map,
          dnx_algo_res_t,
          0,
          "algo_qos_db_egress_qos_oam_pcp_map_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &egress_qos_oam_pcp_map,
          "algo_qos_db[%d]->egress_qos_oam_pcp_map",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OAM_PCP_MAP_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable egress_qos_oam_pcp_map
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_oam_pcp_map_get(int unit, dnx_algo_res_t *egress_qos_oam_pcp_map)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          egress_qos_oam_pcp_map);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *egress_qos_oam_pcp_map = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          "algo_qos_db[%d]->egress_qos_oam_pcp_map",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OAM_PCP_MAP_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable egress_qos_oam_pcp_map
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_oam_pcp_map_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          "algo_qos_db[%d]->egress_qos_oam_pcp_map",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OAM_PCP_MAP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable egress_qos_oam_pcp_map
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_oam_pcp_map_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          "algo_qos_db[%d]->egress_qos_oam_pcp_map",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OAM_PCP_MAP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable egress_qos_oam_pcp_map
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_oam_pcp_map_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          "algo_qos_db[%d]->egress_qos_oam_pcp_map",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OAM_PCP_MAP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable egress_qos_oam_pcp_map
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_oam_pcp_map_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          "algo_qos_db[%d]->egress_qos_oam_pcp_map",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OAM_PCP_MAP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * nof_allocated_elements_in_range_get function for the variable egress_qos_oam_pcp_map
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_qos_oam_pcp_map_nof_allocated_elements_in_range_get(int unit, int range_start, int nof_elements_in_range, int *nof_allocated_elements)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_NOF_ALLOCATED_ELEMENTS_IN_RANGE_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_NOF_ALLOCATED_ELEMENTS_IN_RANGE_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          range_start,
          nof_elements_in_range,
          nof_allocated_elements);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_NOF_ALLOCATED_ELEMENTS_IN_RANGE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRNOF_ALLOCATED_ELEMENTS_IN_RANGE_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_qos_oam_pcp_map,
          "algo_qos_db[%d]->egress_qos_oam_pcp_map",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_QOS_OAM_PCP_MAP_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable qos_egress_ttl_pipe_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_ttl_pipe_profile_set(int unit, dnx_algo_template_t qos_egress_ttl_pipe_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          qos_egress_ttl_pipe_profile,
          dnx_algo_template_t,
          0,
          "algo_qos_db_qos_egress_ttl_pipe_profile_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &qos_egress_ttl_pipe_profile,
          "algo_qos_db[%d]->qos_egress_ttl_pipe_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_TTL_PIPE_PROFILE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable qos_egress_ttl_pipe_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_ttl_pipe_profile_get(int unit, dnx_algo_template_t *qos_egress_ttl_pipe_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          qos_egress_ttl_pipe_profile);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *qos_egress_ttl_pipe_profile = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          "algo_qos_db[%d]->qos_egress_ttl_pipe_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_TTL_PIPE_PROFILE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable qos_egress_ttl_pipe_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_ttl_pipe_profile_create(int unit, dnx_algo_template_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          data,
          extra_arguments,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          "algo_qos_db[%d]->qos_egress_ttl_pipe_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_TTL_PIPE_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable qos_egress_ttl_pipe_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_ttl_pipe_profile_allocate_single(int unit, uint32 flags, int *profile_data, void *extra_arguments, int *profile, uint8 *first_reference)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          flags,
          profile_data,
          extra_arguments,
          profile,
          first_reference);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          "algo_qos_db[%d]->qos_egress_ttl_pipe_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_TTL_PIPE_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable qos_egress_ttl_pipe_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_ttl_pipe_profile_free_single(int unit, int profile, uint8 *last_reference)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          profile,
          last_reference);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          "algo_qos_db[%d]->qos_egress_ttl_pipe_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_TTL_PIPE_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * exchange function for the variable qos_egress_ttl_pipe_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_ttl_pipe_profile_exchange(int unit, uint32 flags, const int *profile_data, int old_profile, const void *extra_arguments, int *new_profile, uint8 *first_reference, uint8 *last_reference)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_EXCHANGE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_EXCHANGE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          flags,
          profile_data,
          old_profile,
          extra_arguments,
          new_profile,
          first_reference,
          last_reference);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_EXCHANGE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGREXCHANGE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          "algo_qos_db[%d]->qos_egress_ttl_pipe_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_TTL_PIPE_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * profile_data_get function for the variable qos_egress_ttl_pipe_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_ttl_pipe_profile_profile_data_get(int unit, int profile, int *ref_count, int *profile_data)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_PROFILE_DATA_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_PROFILE_DATA_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          profile,
          ref_count,
          profile_data);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_PROFILE_DATA_GET_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRPROFILE_DATA_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_ttl_pipe_profile,
          "algo_qos_db[%d]->qos_egress_ttl_pipe_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_TTL_PIPE_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable qos_ingress_propagation_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_ingress_propagation_profile_set(int unit, dnx_algo_template_t qos_ingress_propagation_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          qos_ingress_propagation_profile,
          dnx_algo_template_t,
          0,
          "algo_qos_db_qos_ingress_propagation_profile_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &qos_ingress_propagation_profile,
          "algo_qos_db[%d]->qos_ingress_propagation_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_INGRESS_PROPAGATION_PROFILE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable qos_ingress_propagation_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_ingress_propagation_profile_get(int unit, dnx_algo_template_t *qos_ingress_propagation_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          qos_ingress_propagation_profile);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *qos_ingress_propagation_profile = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          "algo_qos_db[%d]->qos_ingress_propagation_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_INGRESS_PROPAGATION_PROFILE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable qos_ingress_propagation_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_ingress_propagation_profile_create(int unit, dnx_algo_template_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          data,
          extra_arguments,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          "algo_qos_db[%d]->qos_ingress_propagation_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_INGRESS_PROPAGATION_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * exchange function for the variable qos_ingress_propagation_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_ingress_propagation_profile_exchange(int unit, uint32 flags, const qos_propagation_profile_template_t *profile_data, int old_profile, const void *extra_arguments, int *new_profile, uint8 *first_reference, uint8 *last_reference)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_EXCHANGE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_EXCHANGE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          flags,
          profile_data,
          old_profile,
          extra_arguments,
          new_profile,
          first_reference,
          last_reference);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_EXCHANGE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGREXCHANGE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          "algo_qos_db[%d]->qos_ingress_propagation_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_INGRESS_PROPAGATION_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * profile_data_get function for the variable qos_ingress_propagation_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_ingress_propagation_profile_profile_data_get(int unit, int profile, int *ref_count, qos_propagation_profile_template_t *profile_data)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_PROFILE_DATA_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_PROFILE_DATA_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          profile,
          ref_count,
          profile_data);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_PROFILE_DATA_GET_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRPROFILE_DATA_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_ingress_propagation_profile,
          "algo_qos_db[%d]->qos_ingress_propagation_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_INGRESS_PROPAGATION_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_set(int unit, dnx_algo_template_t qos_egress_network_qos_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          qos_egress_network_qos_profile,
          dnx_algo_template_t,
          0,
          "algo_qos_db_qos_egress_network_qos_profile_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_get(int unit, dnx_algo_template_t *qos_egress_network_qos_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          qos_egress_network_qos_profile);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *qos_egress_network_qos_profile = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_create(int unit, dnx_algo_template_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          data,
          extra_arguments,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_allocate_single(int unit, uint32 flags, qos_pipe_profile_template_t *profile_data, void *extra_arguments, int *profile, uint8 *first_reference)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          flags,
          profile_data,
          extra_arguments,
          profile,
          first_reference);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_free_single(int unit, int profile, uint8 *last_reference)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          profile,
          last_reference);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * exchange function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_exchange(int unit, uint32 flags, const qos_pipe_profile_template_t *profile_data, int old_profile, const void *extra_arguments, int *new_profile, uint8 *first_reference, uint8 *last_reference)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_EXCHANGE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_EXCHANGE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          flags,
          profile_data,
          old_profile,
          extra_arguments,
          new_profile,
          first_reference,
          last_reference);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_EXCHANGE_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGREXCHANGE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * profile_data_get function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_profile_data_get(int unit, int profile, int *ref_count, qos_pipe_profile_template_t *profile_data)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_PROFILE_DATA_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_PROFILE_DATA_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          profile,
          ref_count,
          profile_data);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_PROFILE_DATA_GET_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRPROFILE_DATA_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * profile_get function for the variable qos_egress_network_qos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_qos_egress_network_qos_profile_profile_get(int unit, const qos_pipe_profile_template_t *profile_data, int *profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_PROFILE_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_TEMP_MNGR_PROFILE_GET(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          profile_data,
          profile);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_TEMP_MNGR_PROFILE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_TEMP_MNGRPROFILE_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->qos_egress_network_qos_profile,
          "algo_qos_db[%d]->qos_egress_network_qos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_QOS_EGRESS_NETWORK_QOS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_TEMP_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * set function for the variable egress_cos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_cos_profile_set(int unit, dnx_algo_res_t egress_cos_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_SET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_SW_STATE_SET(
          unit,
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          egress_cos_profile,
          dnx_algo_res_t,
          0,
          "algo_qos_db_egress_cos_profile_set");
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_SET_LOGGING,
          BSL_LS_SWSTATEDNX_SET,
          ALGO_QOS_MODULE_ID,
          &egress_cos_profile,
          "algo_qos_db[%d]->egress_cos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_COS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_MODIFY,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * get function for the variable egress_cos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_cos_profile_get(int unit, dnx_algo_res_t *egress_cos_profile)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_GET,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_PTR_NULL_CHECK(
          unit,
          ALGO_QOS_MODULE_ID,
          egress_cos_profile);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      *egress_cos_profile = ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile;
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_GET_LOGGING,
          BSL_LS_SWSTATEDNX_GET,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          "algo_qos_db[%d]->egress_cos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_COS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_READ,
          NULL);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * create function for the variable egress_cos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_cos_profile_create(int unit, dnx_algo_res_create_data_t * data, void *extra_arguments)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_CREATE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_CREATE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          data,
          extra_arguments,
          0,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_CREATE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRCREATE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          "algo_qos_db[%d]->egress_cos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_COS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_AUTO_GENERATED_ALLOCATION);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * allocate_single function for the variable egress_cos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_cos_profile_allocate_single(int unit, uint32 flags, void *extra_arguments, int *element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_ALLOCATE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_ALLOCATE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          flags,
          extra_arguments,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_ALLOCATE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRALLOCATE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          "algo_qos_db[%d]->egress_cos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_COS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * free_single function for the variable egress_cos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_cos_profile_free_single(int unit, int element)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_FREE_SINGLE,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_FREE_SINGLE(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          element);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_FREE_SINGLE_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRFREE_SINGLE,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          "algo_qos_db[%d]->egress_cos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_COS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   *
   * is_allocated function for the variable egress_cos_profile
   * AUTO-GENERATED - DO NOT MODIFY
   */
  int
  algo_qos_db_egress_cos_profile_is_allocated(int unit, int element, uint8 *is_allocated)
  {
      DNXC_SW_STATE_INIT_FUNC_DEFS;
  
      VERIFY_FUNCTION_CALL_ALLOWED(
          unit,
          ALGO_QOS_MODULE_ID,
          SW_STATE_FUNC_IS_ALLOCATED,
          DNXC_SW_STATE_NO_FLAGS);
  
      VERIFY_MODULE_IS_INITIALIZED(
          unit,
          ALGO_QOS_MODULE_ID,
          sw_state_roots_array[unit][ALGO_QOS_MODULE_ID]);
  
      DNX_SW_STATE_DIAG_INFO_PRE(
          unit,
          ALGO_QOS_MODULE_ID);
  
      DNX_ALGO_RES_MNGR_IS_ALLOCATED(
          ALGO_QOS_MODULE_ID,
          ((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          element,
          is_allocated);
  
      DNX_SW_STATE_LOG(
          unit,
          DNX_SW_STATE_RES_MNGR_IS_ALLOCATED_LOGGING,
          BSL_LS_SWSTATEDNX_RES_MNGRIS_ALLOCATED,
          ALGO_QOS_MODULE_ID,
          &((algo_qos_sw_state_t*)sw_state_roots_array[unit][ALGO_QOS_MODULE_ID])->egress_cos_profile,
          "algo_qos_db[%d]->egress_cos_profile",
          unit);
  
      DNX_SW_STATE_DIAG_INFO_POST_WITH_FLAGS(
          unit,
          ALGO_QOS_MODULE_ID,
          algo_qos_db_info,
          ALGO_QOS_DB_EGRESS_COS_PROFILE_INFO,
          DNX_SW_STATE_DIAG_RES_MNGR,
          NULL,
          DNXC_SW_STATE_NO_FLAGS);
  
      DNXC_SW_STATE_FUNC_RETURN;
  }
  
  
  
  /*
   * Global Variables
   */
  
  algo_qos_db_cbs algo_qos_db = 	{
  	
  	algo_qos_db_is_init,
  	algo_qos_db_init,
  		{
  		
  		algo_qos_db_ingress_qos_set,
  		algo_qos_db_ingress_qos_get,
  		algo_qos_db_ingress_qos_create,
  		algo_qos_db_ingress_qos_allocate_single,
  		algo_qos_db_ingress_qos_free_single,
  		algo_qos_db_ingress_qos_is_allocated,
  		algo_qos_db_ingress_qos_get_next,
  		algo_qos_db_ingress_qos_dump_info_get}
  	,
  		{
  		
  		algo_qos_db_ingress_qos_ecn_set,
  		algo_qos_db_ingress_qos_ecn_get,
  		algo_qos_db_ingress_qos_ecn_create,
  		algo_qos_db_ingress_qos_ecn_allocate_single,
  		algo_qos_db_ingress_qos_ecn_free_single,
  		algo_qos_db_ingress_qos_ecn_is_allocated,
  		algo_qos_db_ingress_qos_ecn_get_next,
  		algo_qos_db_ingress_qos_ecn_dump_info_get}
  	,
  		{
  		
  		algo_qos_db_ingress_qos_phb_opcode_set,
  		algo_qos_db_ingress_qos_phb_opcode_get,
  		algo_qos_db_ingress_qos_phb_opcode_create,
  		algo_qos_db_ingress_qos_phb_opcode_allocate_single,
  		algo_qos_db_ingress_qos_phb_opcode_free_single,
  		algo_qos_db_ingress_qos_phb_opcode_is_allocated}
  	,
  		{
  		
  		algo_qos_db_ingress_qos_remark_opcode_set,
  		algo_qos_db_ingress_qos_remark_opcode_get,
  		algo_qos_db_ingress_qos_remark_opcode_create,
  		algo_qos_db_ingress_qos_remark_opcode_allocate_single,
  		algo_qos_db_ingress_qos_remark_opcode_free_single,
  		algo_qos_db_ingress_qos_remark_opcode_is_allocated}
  	,
  		{
  		
  		algo_qos_db_ingress_qos_ecn_opcode_set,
  		algo_qos_db_ingress_qos_ecn_opcode_get,
  		algo_qos_db_ingress_qos_ecn_opcode_create,
  		algo_qos_db_ingress_qos_ecn_opcode_allocate_single,
  		algo_qos_db_ingress_qos_ecn_opcode_free_single,
  		algo_qos_db_ingress_qos_ecn_opcode_is_allocated}
  	,
  		{
  		
  		algo_qos_db_ingress_qos_policer_set,
  		algo_qos_db_ingress_qos_policer_get,
  		algo_qos_db_ingress_qos_policer_create,
  		algo_qos_db_ingress_qos_policer_allocate_single,
  		algo_qos_db_ingress_qos_policer_free_single,
  		algo_qos_db_ingress_qos_policer_is_allocated}
  	,
  		{
  		
  		algo_qos_db_ingress_qos_vlan_pcp_set,
  		algo_qos_db_ingress_qos_vlan_pcp_get,
  		algo_qos_db_ingress_qos_vlan_pcp_create,
  		algo_qos_db_ingress_qos_vlan_pcp_allocate_single,
  		algo_qos_db_ingress_qos_vlan_pcp_free_single,
  		algo_qos_db_ingress_qos_vlan_pcp_is_allocated,
  		algo_qos_db_ingress_qos_vlan_pcp_nof_allocated_elements_in_range_get}
  	,
  		{
  		
  		algo_qos_db_egress_qos_set,
  		algo_qos_db_egress_qos_get,
  		algo_qos_db_egress_qos_create,
  		algo_qos_db_egress_qos_allocate_single,
  		algo_qos_db_egress_qos_free_single,
  		algo_qos_db_egress_qos_is_allocated}
  	,
  		{
  		
  		algo_qos_db_egress_qos_opcode_set,
  		algo_qos_db_egress_qos_opcode_get,
  		algo_qos_db_egress_qos_opcode_create,
  		algo_qos_db_egress_qos_opcode_allocate_single,
  		algo_qos_db_egress_qos_opcode_allocate_several,
  		algo_qos_db_egress_qos_opcode_free_single,
  		algo_qos_db_egress_qos_opcode_free_several,
  		algo_qos_db_egress_qos_opcode_is_allocated}
  	,
  		{
  		
  		algo_qos_db_egress_qos_mpls_php_set,
  		algo_qos_db_egress_qos_mpls_php_get,
  		algo_qos_db_egress_qos_mpls_php_create,
  		algo_qos_db_egress_qos_mpls_php_allocate_single,
  		algo_qos_db_egress_qos_mpls_php_free_single,
  		algo_qos_db_egress_qos_mpls_php_is_allocated}
  	,
  		{
  		
  		algo_qos_db_egress_qos_php_opcode_set,
  		algo_qos_db_egress_qos_php_opcode_get,
  		algo_qos_db_egress_qos_php_opcode_create,
  		algo_qos_db_egress_qos_php_opcode_allocate_single,
  		algo_qos_db_egress_qos_php_opcode_free_single,
  		algo_qos_db_egress_qos_php_opcode_is_allocated}
  	,
  		{
  		
  		algo_qos_db_egress_qos_policer_set,
  		algo_qos_db_egress_qos_policer_get,
  		algo_qos_db_egress_qos_policer_create,
  		algo_qos_db_egress_qos_policer_allocate_single,
  		algo_qos_db_egress_qos_policer_free_single,
  		algo_qos_db_egress_qos_policer_is_allocated}
  	,
  		{
  		
  		algo_qos_db_egress_qos_oam_pcp_map_set,
  		algo_qos_db_egress_qos_oam_pcp_map_get,
  		algo_qos_db_egress_qos_oam_pcp_map_create,
  		algo_qos_db_egress_qos_oam_pcp_map_allocate_single,
  		algo_qos_db_egress_qos_oam_pcp_map_free_single,
  		algo_qos_db_egress_qos_oam_pcp_map_is_allocated,
  		algo_qos_db_egress_qos_oam_pcp_map_nof_allocated_elements_in_range_get}
  	,
  		{
  		
  		algo_qos_db_qos_egress_ttl_pipe_profile_set,
  		algo_qos_db_qos_egress_ttl_pipe_profile_get,
  		algo_qos_db_qos_egress_ttl_pipe_profile_create,
  		algo_qos_db_qos_egress_ttl_pipe_profile_allocate_single,
  		algo_qos_db_qos_egress_ttl_pipe_profile_free_single,
  		algo_qos_db_qos_egress_ttl_pipe_profile_exchange,
  		algo_qos_db_qos_egress_ttl_pipe_profile_profile_data_get}
  	,
  		{
  		
  		algo_qos_db_qos_ingress_propagation_profile_set,
  		algo_qos_db_qos_ingress_propagation_profile_get,
  		algo_qos_db_qos_ingress_propagation_profile_create,
  		algo_qos_db_qos_ingress_propagation_profile_exchange,
  		algo_qos_db_qos_ingress_propagation_profile_profile_data_get}
  	,
  		{
  		
  		algo_qos_db_qos_egress_network_qos_profile_set,
  		algo_qos_db_qos_egress_network_qos_profile_get,
  		algo_qos_db_qos_egress_network_qos_profile_create,
  		algo_qos_db_qos_egress_network_qos_profile_allocate_single,
  		algo_qos_db_qos_egress_network_qos_profile_free_single,
  		algo_qos_db_qos_egress_network_qos_profile_exchange,
  		algo_qos_db_qos_egress_network_qos_profile_profile_data_get,
  		algo_qos_db_qos_egress_network_qos_profile_profile_get}
  	,
  		{
  		
  		algo_qos_db_egress_cos_profile_set,
  		algo_qos_db_egress_cos_profile_get,
  		algo_qos_db_egress_cos_profile_create,
  		algo_qos_db_egress_cos_profile_allocate_single,
  		algo_qos_db_egress_cos_profile_free_single,
  		algo_qos_db_egress_cos_profile_is_allocated}
  	}
  ;
  #undef BSL_LOG_MODULE
  