Shad Ansari | 2f7f9be | 2017-06-07 13:34:53 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * <:copyright-BRCM:2016:DUAL/GPL:standard |
| 4 | * |
| 5 | * Copyright (c) 2016 Broadcom |
| 6 | * All Rights Reserved |
| 7 | * |
| 8 | * Unless you and Broadcom execute a separate written software license |
| 9 | * agreement governing use of this software, this software is licensed |
| 10 | * to you under the terms of the GNU General Public License version 2 |
| 11 | * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php, |
| 12 | * with the following added to such license: |
| 13 | * |
| 14 | * As a special exception, the copyright holders of this software give |
| 15 | * you permission to link this software with independent modules, and |
| 16 | * to copy and distribute the resulting executable under terms of your |
| 17 | * choice, provided that you also meet, for each linked independent |
| 18 | * module, the terms and conditions of the license of that module. |
| 19 | * An independent module is a module which is not derived from this |
| 20 | * software. The special exception does not apply to any modifications |
| 21 | * of the software. |
| 22 | * |
| 23 | * Not withstanding the above, under no circumstances may you combine |
| 24 | * this software in any way with any other Broadcom software provided |
| 25 | * under a license other than the GPL, without Broadcom's express prior |
| 26 | * written consent. |
| 27 | * |
| 28 | * :> |
| 29 | * |
| 30 | *****************************************************************************/ |
| 31 | |
| 32 | /** |
| 33 | * @file bal_switch_tm_queue.c |
| 34 | * @brief BAL Switch util functions that handle tm requests |
| 35 | * @addtogroup sw_util |
| 36 | */ |
| 37 | |
| 38 | /*@{*/ |
| 39 | #include <bal_common.h> |
| 40 | #include <bcm_dev_log.h> |
| 41 | #include <bal_msg.h> |
| 42 | #include "bcmos_errno.h" |
| 43 | #include "bal_switch_util.h" |
| 44 | #include "tm_sched_fsm.h" |
| 45 | |
| 46 | |
| 47 | /* sw_util_tm_queue_validate() is called by the Core to validate the attributes of the tm_queue object |
| 48 | * p_msg a pointer to the object bcmbal_tm_queue_cfg |
| 49 | */ |
| 50 | bcmos_errno sw_util_tm_queue_validate(void *p_msg) |
| 51 | { |
| 52 | return BCM_ERR_OK; |
| 53 | } |
| 54 | |
| 55 | /* sw_util_tm_queue_set() is called by the Core to create an instance of TM Queue in the switch |
| 56 | * p_tm_queue_inst a pointer to the data structure tm_queue_inst that used in the Core to manage |
| 57 | * the received tm_queue configuration request from the BAL client |
| 58 | * |
| 59 | * Required attributes |
| 60 | * Key - key to unique identify the TM queue and the parent scheduler |
| 61 | * Max size - queue size |
| 62 | * Priority - SP priority, if parent scheduler is of type SP |
| 63 | * Weight - WFQ weight, if parent scheduler is of type WFQ |
| 64 | * |
| 65 | * Optional |
| 66 | * Rate - for rate limit, if not specified default to FULL rate |
| 67 | */ |
| 68 | bcmos_errno sw_util_tm_queue_set(tm_queue_inst *p_tm_queue_inst) |
| 69 | { |
| 70 | return BCM_ERR_OK; |
| 71 | } |
| 72 | |
| 73 | /* sw_util_tm_queue_clear() is called by the Core to remove an instance of TM queue in the switch |
| 74 | * p_tm_queue_inst a pointer to the data structure tm_queue_inst that used in the Core to manage |
| 75 | * the received tm_queue configuration request from the BAL client |
| 76 | * |
| 77 | * Required attributes |
| 78 | * Key - key to unique identify the TM queue |
| 79 | * |
| 80 | * Note: CLEAR request should be rejected if any flow is still referencing it |
| 81 | */ |
| 82 | bcmos_errno sw_util_tm_queue_clear(tm_queue_inst *p_tm_queue_inst) |
| 83 | { |
| 84 | return BCM_ERR_OK; |
| 85 | } |
| 86 | |
| 87 | /*@}*/ |
| 88 | |
| 89 | |