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 garuda_leaky GARUDA_LEAKY 18 * @{ 19 */ 20#ifndef _GARUDA_LEAKY_H_ 21#define _GARUDA_LEAKY_H_ 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "fal/fal_leaky.h" 28 29 sw_error_t garuda_leaky_init(a_uint32_t dev_id); 30 31#ifdef IN_LEAKY 32#define GARUDA_LEAKY_INIT(rv, dev_id) \ 33 { \ 34 rv = garuda_leaky_init(dev_id); \ 35 SW_RTN_ON_ERROR(rv); \ 36 } 37#else 38#define GARUDA_LEAKY_INIT(rv, dev_id) 39#endif 40 41#ifdef HSL_STANDALONG 42 43 44 HSL_LOCAL sw_error_t 45 garuda_uc_leaky_mode_set(a_uint32_t dev_id, 46 fal_leaky_ctrl_mode_t ctrl_mode); 47 48 49 50 HSL_LOCAL sw_error_t 51 garuda_uc_leaky_mode_get(a_uint32_t dev_id, 52 fal_leaky_ctrl_mode_t * ctrl_mode); 53 54 55 56 HSL_LOCAL sw_error_t 57 garuda_mc_leaky_mode_set(a_uint32_t dev_id, 58 fal_leaky_ctrl_mode_t ctrl_mode); 59 60 61 HSL_LOCAL sw_error_t 62 garuda_mc_leaky_mode_get(a_uint32_t dev_id, 63 fal_leaky_ctrl_mode_t * ctrl_mode); 64 65 66 67 HSL_LOCAL sw_error_t 68 garuda_port_arp_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 69 a_bool_t enable); 70 71 72 73 HSL_LOCAL sw_error_t 74 garuda_port_arp_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 75 a_bool_t * enable); 76 77 78 79 HSL_LOCAL sw_error_t 80 garuda_port_uc_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 81 a_bool_t enable); 82 83 84 85 HSL_LOCAL sw_error_t 86 garuda_port_uc_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 87 a_bool_t * enable); 88 89 90 HSL_LOCAL sw_error_t 91 garuda_port_mc_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 92 a_bool_t enable); 93 94 95 96 HSL_LOCAL sw_error_t 97 garuda_port_mc_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 98 a_bool_t * enable); 99#endif 100 101#ifdef __cplusplus 102} 103#endif /* __cplusplus */ 104#endif /* _GARUDA_LEAKY_H_ */ 105/** 106 * @} 107 */ 108