Lines Matching +full:back +full:- +full:to +full:- +full:back
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (C) 2018-2020, Intel Corporation. */
8 * ice_fltr_free_list - free filter lists helper
9 * @dev: pointer to the device struct
10 * @h: pointer to the list head to be freed
12 * Helper function to free filter lists previously created using
20 list_del(&e->list_entry); in ice_fltr_free_list()
26 * ice_fltr_add_entry_to_list - allocate and add filter entry to list
27 * @dev: pointer to device needed by alloc function
28 * @info: filter info struct that gets added to the passed in list
29 * @list: pointer to the list which contains MAC filters entry
39 return -ENOMEM; in ice_fltr_add_entry_to_list()
41 entry->fltr_info = *info; in ice_fltr_add_entry_to_list()
43 INIT_LIST_HEAD(&entry->list_entry); in ice_fltr_add_entry_to_list()
44 list_add(&entry->list_entry, list); in ice_fltr_add_entry_to_list()
50 * ice_fltr_add_mac_list - add list of MAC filters
51 * @vsi: pointer to VSI struct
57 return ice_add_mac(&vsi->back->hw, list); in ice_fltr_add_mac_list()
61 * ice_fltr_remove_mac_list - remove list of MAC filters
62 * @vsi: pointer to VSI struct
68 return ice_remove_mac(&vsi->back->hw, list); in ice_fltr_remove_mac_list()
72 * ice_fltr_add_vlan_list - add list of VLAN filters
73 * @vsi: pointer to VSI struct
79 return ice_add_vlan(&vsi->back->hw, list); in ice_fltr_add_vlan_list()
83 * ice_fltr_remove_vlan_list - remove list of VLAN filters
84 * @vsi: pointer to VSI struct
90 return ice_remove_vlan(&vsi->back->hw, list); in ice_fltr_remove_vlan_list()
94 * ice_fltr_add_eth_list - add list of ethertype filters
95 * @vsi: pointer to VSI struct
101 return ice_add_eth_mac(&vsi->back->hw, list); in ice_fltr_add_eth_list()
105 * ice_fltr_remove_eth_list - remove list of ethertype filters
106 * @vsi: pointer to VSI struct
112 return ice_remove_eth_mac(&vsi->back->hw, list); in ice_fltr_remove_eth_list()
116 * ice_fltr_remove_all - remove all filters associated with VSI
117 * @vsi: pointer to VSI struct
121 ice_remove_vsi_fltr(&vsi->back->hw, vsi->idx); in ice_fltr_remove_all()
125 * ice_fltr_add_mac_to_list - add MAC filter info to exsisting list
126 * @vsi: pointer to VSI struct
127 * @list: list to add filter info to
128 * @mac: MAC address to add
141 info.vsi_handle = vsi->idx; in ice_fltr_add_mac_to_list()
145 return ice_fltr_add_entry_to_list(ice_pf_to_dev(vsi->back), &info, in ice_fltr_add_mac_to_list()
150 * ice_fltr_add_vlan_to_list - add VLAN filter info to exsisting list
151 * @vsi: pointer to VSI struct
152 * @list: list to add filter info to
153 * @vlan_id: VLAN ID to add
166 info.vsi_handle = vsi->idx; in ice_fltr_add_vlan_to_list()
169 return ice_fltr_add_entry_to_list(ice_pf_to_dev(vsi->back), &info, in ice_fltr_add_vlan_to_list()
174 * ice_fltr_add_eth_to_list - add ethertype filter info to exsisting list
175 * @vsi: pointer to VSI struct
176 * @list: list to add filter info to
191 info.vsi_handle = vsi->idx; in ice_fltr_add_eth_to_list()
199 return ice_fltr_add_entry_to_list(ice_pf_to_dev(vsi->back), &info, in ice_fltr_add_eth_to_list()
204 * ice_fltr_prepare_mac - add or remove MAC rule
205 * @vsi: pointer to VSI struct
206 * @mac: MAC address to add
207 * @action: action to be performed on filter match
208 * @mac_action: pointer to add or remove MAC function
220 ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list); in ice_fltr_prepare_mac()
225 ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list); in ice_fltr_prepare_mac()
230 * ice_fltr_prepare_mac_and_broadcast - add or remove MAC and broadcast filter
231 * @vsi: pointer to VSI struct
232 * @mac: MAC address to add
233 * @action: action to be performed on filter match
234 * @mac_action: pointer to add or remove MAC function
249 ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list); in ice_fltr_prepare_mac_and_broadcast()
254 ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list); in ice_fltr_prepare_mac_and_broadcast()
259 * ice_fltr_prepare_vlan - add or remove VLAN filter
260 * @vsi: pointer to VSI struct
261 * @vlan_id: VLAN ID to add
262 * @action: action to be performed on filter match
263 * @vlan_action: pointer to add or remove VLAN function
278 ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list); in ice_fltr_prepare_vlan()
283 * ice_fltr_prepare_eth - add or remove ethertype filter
284 * @vsi: pointer to VSI struct
285 * @ethertype: ethertype of packet to be filtered
287 * @action: action to be performed on filter match
288 * @eth_action: pointer to add or remove ethertype function
303 ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list); in ice_fltr_prepare_eth()
308 * ice_fltr_add_mac - add single MAC filter
309 * @vsi: pointer to VSI struct
310 * @mac: MAC to add
311 * @action: action to be performed on filter match
320 * ice_fltr_add_mac_and_broadcast - add single MAC and broadcast
321 * @vsi: pointer to VSI struct
322 * @mac: MAC to add
323 * @action: action to be performed on filter match
334 * ice_fltr_remove_mac - remove MAC filter
335 * @vsi: pointer to VSI struct
336 * @mac: filter MAC to remove
337 * @action: action to remove
346 * ice_fltr_add_vlan - add single VLAN filter
347 * @vsi: pointer to VSI struct
348 * @vlan_id: VLAN ID to add
349 * @action: action to be performed on filter match
359 * ice_fltr_remove_vlan - remove VLAN filter
360 * @vsi: pointer to VSI struct
361 * @vlan_id: filter VLAN to remove
362 * @action: action to remove
372 * ice_fltr_add_eth - add specyfic ethertype filter
373 * @vsi: pointer to VSI struct
375 * @flag: direction of packet to be filtered, Tx or Rx
376 * @action: action to be performed on filter match
386 * ice_fltr_remove_eth - remove ethertype filter
387 * @vsi: pointer to VSI struct
390 * @action: action to remove