* i40e_fdir_teardown - release the Flow Director resources * @pf: board private structure */
| 280 | * @pf: board private structure |
| 281 | */ |
| 282 | void |
| 283 | i40e_fdir_teardown(struct i40e_pf *pf) |
| 284 | { |
| 285 | struct i40e_hw *hw = I40E_PF_TO_HW(pf); |
| 286 | struct i40e_vsi *vsi; |
| 287 | |
| 288 | vsi = pf->fdir.fdir_vsi; |
| 289 | if (!vsi) |
| 290 | return; |
| 291 | |
| 292 | /* disable FDIR MSIX interrupt */ |
| 293 | i40e_vsi_queues_unbind_intr(vsi); |
| 294 | i40e_vsi_disable_queues_intr(vsi); |
| 295 | |
| 296 | int err = i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); |
| 297 | if (err) |
| 298 | PMD_DRV_LOG(DEBUG, "Failed to do FDIR TX switch off"); |
| 299 | err = i40e_switch_rx_queue(hw, vsi->base_queue, FALSE); |
| 300 | if (err) |
| 301 | PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off"); |
| 302 | |
| 303 | i40e_rx_queue_release(pf->fdir.rxq); |
| 304 | pf->fdir.rxq = NULL; |
| 305 | i40e_tx_queue_release(pf->fdir.txq); |
| 306 | pf->fdir.txq = NULL; |
| 307 | i40e_vsi_release(vsi); |
| 308 | pf->fdir.fdir_vsi = NULL; |
| 309 | } |
| 310 | |
| 311 | /* check whether the flow director table in empty */ |
| 312 | static inline int |
no test coverage detected