1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2018-2020, Intel Corporation. */
3 
4 #ifndef _ICE_FLTR_H_
5 #define _ICE_FLTR_H_
6 
7 void ice_fltr_free_list(struct device *dev, struct list_head *h);
8 int
9 ice_fltr_set_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi,
10 			      u8 promisc_mask);
11 int
12 ice_fltr_clear_vlan_vsi_promisc(struct ice_hw *hw, struct ice_vsi *vsi,
13 				u8 promisc_mask);
14 int
15 ice_fltr_clear_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
16 			   u16 vid);
17 int
18 ice_fltr_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
19 			 u16 vid);
20 int
21 ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
22 			 const u8 *mac, enum ice_sw_fwd_act_type action);
23 int
24 ice_fltr_add_mac(struct ice_vsi *vsi, const u8 *mac,
25 		 enum ice_sw_fwd_act_type action);
26 int
27 ice_fltr_add_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac,
28 			       enum ice_sw_fwd_act_type action);
29 int ice_fltr_add_mac_list(struct ice_vsi *vsi, struct list_head *list);
30 int
31 ice_fltr_remove_mac(struct ice_vsi *vsi, const u8 *mac,
32 		    enum ice_sw_fwd_act_type action);
33 int ice_fltr_remove_mac_list(struct ice_vsi *vsi, struct list_head *list);
34 
35 int
36 ice_fltr_add_vlan(struct ice_vsi *vsi, u16 vid,
37 		  enum ice_sw_fwd_act_type action);
38 int
39 ice_fltr_remove_vlan(struct ice_vsi *vsi, u16 vid,
40 		     enum ice_sw_fwd_act_type action);
41 
42 int
43 ice_fltr_add_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag,
44 		 enum ice_sw_fwd_act_type action);
45 int
46 ice_fltr_remove_eth(struct ice_vsi *vsi, u16 ethertype, u16 flag,
47 		    enum ice_sw_fwd_act_type action);
48 void ice_fltr_remove_all(struct ice_vsi *vsi);
49 
50 int
51 ice_fltr_update_flags(struct ice_vsi *vsi, u16 rule_id, u16 recipe_id,
52 		      u32 new_flags);
53 #endif
54