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_trunk FAL_TRUNK 18 * @{ 19 */ 20#ifndef _FAL_TRUNK_H_ 21#define _FAL_TRUNK_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#define FAL_TRUNK_HASH_KEY_DA 0x1 32#define FAL_TRUNK_HASH_KEY_SA 0x2 33#define FAL_TRUNK_HASH_KEY_DIP 0x4 34#define FAL_TRUNK_HASH_KEY_SIP 0x8 35 36 37 sw_error_t 38 fal_trunk_group_set(a_uint32_t dev_id, a_uint32_t trunk_id, 39 a_bool_t enable, fal_pbmp_t member); 40 41 42 sw_error_t 43 fal_trunk_group_get(a_uint32_t dev_id, a_uint32_t trunk_id, 44 a_bool_t * enable, fal_pbmp_t * member); 45 46 47 sw_error_t 48 fal_trunk_hash_mode_set(a_uint32_t dev_id, a_uint32_t hash_mode); 49 50 51 sw_error_t 52 fal_trunk_hash_mode_get(a_uint32_t dev_id, a_uint32_t * hash_mode); 53 54 55 sw_error_t 56 fal_trunk_manipulate_sa_set(a_uint32_t dev_id, fal_mac_addr_t * addr); 57 58 59 sw_error_t 60 fal_trunk_manipulate_sa_get(a_uint32_t dev_id, fal_mac_addr_t * addr); 61 62 63#ifdef __cplusplus 64} 65#endif /* __cplusplus */ 66#endif /* _FAL_TRUNK_H_ */ 67 68/** 69 * @} 70 */ 71