1/* 2 * Copyright (c) 2014, 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 fal_leaky FAL_LEAKY 18 * @{ 19 */ 20#ifndef _FAL_LEAKY_H_ 21#define _FAL_LEAKY_H_ 22 23#ifdef __cplusplus 24extern "C" { 25#endif /* __cplusplus */ 26 27#include "common/sw.h" 28#include "fal/fal_type.h" 29 30 /** 31 @brief This enum defines the leaky control mode. 32 */ 33 typedef enum { 34 FAL_LEAKY_PORT_CTRL = 0, /**< control leaky through port which packets received*/ 35 FAL_LEAKY_FDB_CTRL, /**< control leaky through fdb entry*/ 36 FAL_LEAKY_CTRL_MODE_BUTT 37 } 38 fal_leaky_ctrl_mode_t; 39 40 41 42 sw_error_t 43 fal_uc_leaky_mode_set(a_uint32_t dev_id, 44 fal_leaky_ctrl_mode_t ctrl_mode); 45 46 47 48 sw_error_t 49 fal_uc_leaky_mode_get(a_uint32_t dev_id, 50 fal_leaky_ctrl_mode_t * ctrl_mode); 51 52 53 54 sw_error_t 55 fal_mc_leaky_mode_set(a_uint32_t dev_id, 56 fal_leaky_ctrl_mode_t ctrl_mode); 57 58 59 60 sw_error_t 61 fal_mc_leaky_mode_get(a_uint32_t dev_id, 62 fal_leaky_ctrl_mode_t * ctrl_mode); 63 64 65 66 sw_error_t 67 fal_port_arp_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 68 a_bool_t enable); 69 70 71 72 sw_error_t 73 fal_port_arp_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 74 a_bool_t * enable); 75 76 77 78 sw_error_t 79 fal_port_uc_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 80 a_bool_t enable); 81 82 83 84 sw_error_t 85 fal_port_uc_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 86 a_bool_t * enable); 87 88 89 90 sw_error_t 91 fal_port_mc_leaky_set(a_uint32_t dev_id, fal_port_t port_id, 92 a_bool_t enable); 93 94 95 96 sw_error_t 97 fal_port_mc_leaky_get(a_uint32_t dev_id, fal_port_t port_id, 98 a_bool_t * enable); 99 100 101#ifdef __cplusplus 102} 103#endif /* __cplusplus */ 104#endif /* _FAL_LEAKY_H_ */ 105/** 106 * @} 107 */ 108