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 shiva_leaky SHIVA_LEAKY 18 * @{ 19 */ 20#ifndef _SHIVA_LEAKY_H_ 21#define _SHIVA_LEAKY_H_ 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "fal/fal_leaky.h" 28 29 sw_error_t shiva_leaky_init(a_uint32_t dev_id); 30 31#ifdef IN_LEAKY 32#define SHIVA_LEAKY_INIT(rv, dev_id) \ 33 { \ 34 rv = shiva_leaky_init(dev_id); \ 35 SW_RTN_ON_ERROR(rv); \ 36 } 37#else 38#define SHIVA_LEAKY_INIT(rv, dev_id) 39#endif 40 41#ifdef HSL_STANDALONG 42 43 44 HSL_LOCAL sw_error_t 45 shiva_uc_leaky_mode_set(a_uint32_t dev_id, 46 fal_leaky_ctrl_mode_t ctrl_mode); 47 48 49 HSL_LOCAL sw_error_t 50 shiva_uc_leaky_mode_get(a_uint32_t dev_id, 51 fal_leaky_ctrl_mode_t * ctrl_mode); 52 53 54 HSL_LOCAL sw_error_t 55 shiva_mc_leaky_mode_set(a_uint32_t dev_id, 56 fal_leaky_ctrl_mode_t ctrl_mode); 57 58 59 HSL_LOCAL sw_error_t 60 shiva_mc_leaky_mode_get(a_uint32_t dev_id, 61 fal_leaky_ctrl_mode_t * ctrl_mode); 62 63 64 HSL_LOCAL sw_error_t 65 shiva_port_arp_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 66 a_bool_t enable); 67 68 69 HSL_LOCAL sw_error_t 70 shiva_port_arp_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 71 a_bool_t * enable); 72 73 74 HSL_LOCAL sw_error_t 75 shiva_port_uc_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 76 a_bool_t enable); 77 78 79 HSL_LOCAL sw_error_t 80 shiva_port_uc_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 81 a_bool_t * enable); 82 83 84 HSL_LOCAL sw_error_t 85 shiva_port_mc_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 86 a_bool_t enable); 87 88 89 HSL_LOCAL sw_error_t 90 shiva_port_mc_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 91 a_bool_t * enable); 92#endif 93 94#ifdef __cplusplus 95} 96#endif /* __cplusplus */ 97#endif /* _SHIVA_LEAKY_H_ */ 98/** 99 * @} 100 */ 101