mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 22:14:41 +08:00
1b8f15b64a
Move filter functions to separate file. Add functions that prepare suitable ice_fltr_info struct depending on the filter type and add this struct to earlier created list: - ice_fltr_add_mac_to_list - ice_fltr_add_vlan_to_list - ice_fltr_add_eth_to_list This functions are used in adding and removing filters. Create wrappers for functions mentioned above that alloc list, add suitable ice_fltr_info to it and call add or remove function. - ice_fltr_prepare_mac - ice_fltr_prepare_mac_and_broadcast - ice_fltr_prepare_vlan - ice_fltr_prepare_eth Signed-off-by: Michal Swiatkowski <michal.swiatkowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
40 lines
1.3 KiB
C
40 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2018-2020, Intel Corporation. */
|
|
|
|
#ifndef _ICE_FLTR_H_
|
|
#define _ICE_FLTR_H_
|
|
|
|
void ice_fltr_free_list(struct device *dev, struct list_head *h);
|
|
enum ice_status
|
|
ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
|
|
const u8 *mac, enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_add_mac(struct ice_vsi *vsi, const u8 *mac,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_add_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list);
|
|
enum ice_status
|
|
ice_fltr_remove_mac(struct ice_vsi *vsi, const u8 *mac,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list);
|
|
|
|
enum ice_status
|
|
ice_fltr_add_vlan(struct ice_vsi *vsi, u16 vid,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_remove_vlan(struct ice_vsi *vsi, u16 vid,
|
|
enum ice_sw_fwd_act_type action);
|
|
|
|
enum ice_status
|
|
ice_fltr_add_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag,
|
|
enum ice_sw_fwd_act_type action);
|
|
enum ice_status
|
|
ice_fltr_remove_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag,
|
|
enum ice_sw_fwd_act_type action);
|
|
void ice_fltr_remove_all(struct ice_vsi *vsi);
|
|
#endif
|