1/* 2 * Copyright (c) 2012, The Linux Foundation. All rights reserved. 3 * Permission to use, copy, modify, and/or distribute this software for 4 * any purpose with or without fee is hereby granted, provided that the 5 * above copyright notice and this permission notice appear in all copies. 6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 13 */ 14 15 16/** 17 * @defgroup isisc_cosmap ISISC_COSMAP 18 * @{ 19 */ 20#ifndef _ISISC_COSMAP_H_ 21#define _ISISC_COSMAP_H_ 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "fal/fal_cosmap.h" 28 29 sw_error_t isisc_cosmap_init(a_uint32_t dev_id); 30 31#ifdef IN_COSMAP 32#define ISISC_COSMAP_INIT(rv, dev_id) \ 33 { \ 34 rv = isisc_cosmap_init(dev_id); \ 35 SW_RTN_ON_ERROR(rv); \ 36 } 37#else 38#define ISISC_COSMAP_INIT(rv, dev_id) 39#endif 40 41#ifdef HSL_STANDALONG 42 43 HSL_LOCAL sw_error_t 44 isisc_cosmap_dscp_to_pri_set(a_uint32_t dev_id, a_uint32_t dscp, 45 a_uint32_t pri); 46 47 HSL_LOCAL sw_error_t 48 isisc_cosmap_dscp_to_pri_get(a_uint32_t dev_id, a_uint32_t dscp, 49 a_uint32_t * pri); 50 51 HSL_LOCAL sw_error_t 52 isisc_cosmap_dscp_to_dp_set(a_uint32_t dev_id, a_uint32_t dscp, 53 a_uint32_t dp); 54 55 HSL_LOCAL sw_error_t 56 isisc_cosmap_dscp_to_dp_get(a_uint32_t dev_id, a_uint32_t dscp, 57 a_uint32_t * dp); 58 59 HSL_LOCAL sw_error_t 60 isisc_cosmap_up_to_pri_set(a_uint32_t dev_id, a_uint32_t up, 61 a_uint32_t pri); 62 63 HSL_LOCAL sw_error_t 64 isisc_cosmap_up_to_pri_get(a_uint32_t dev_id, a_uint32_t up, 65 a_uint32_t * pri); 66 67 HSL_LOCAL sw_error_t 68 isisc_cosmap_up_to_dp_set(a_uint32_t dev_id, a_uint32_t up, 69 a_uint32_t dp); 70 71 HSL_LOCAL sw_error_t 72 isisc_cosmap_up_to_dp_get(a_uint32_t dev_id, a_uint32_t up, 73 a_uint32_t * dp); 74 75 HSL_LOCAL sw_error_t 76 isisc_cosmap_pri_to_queue_set(a_uint32_t dev_id, a_uint32_t pri, 77 a_uint32_t queue); 78 79 HSL_LOCAL sw_error_t 80 isisc_cosmap_pri_to_queue_get(a_uint32_t dev_id, a_uint32_t pri, 81 a_uint32_t * queue); 82 83 HSL_LOCAL sw_error_t 84 isisc_cosmap_pri_to_ehqueue_set(a_uint32_t dev_id, a_uint32_t pri, 85 a_uint32_t queue); 86 87 HSL_LOCAL sw_error_t 88 isisc_cosmap_pri_to_ehqueue_get(a_uint32_t dev_id, a_uint32_t pri, 89 a_uint32_t * queue); 90 91 HSL_LOCAL sw_error_t 92 isisc_cosmap_egress_remark_set(a_uint32_t dev_id, a_uint32_t tbl_id, 93 fal_egress_remark_table_t * tbl); 94 95 HSL_LOCAL sw_error_t 96 isisc_cosmap_egress_remark_get(a_uint32_t dev_id, a_uint32_t tbl_id, 97 fal_egress_remark_table_t * tbl); 98 99#endif 100 101#ifdef __cplusplus 102} 103#endif /* __cplusplus */ 104#endif /* _ISISC_COSMAP_H_ */ 105 106/** 107 * @} 108 */ 109 110