src/dpdk/drivers/net/ice/ice_fdir_filter.c
static void
ice_fdir_teardown(struct ice_pf *pf)
{
	struct rte_eth_dev *eth_dev = pf->adapter->eth_dev;
	struct ice_hw *hw = ICE_PF_TO_HW(pf);
	struct ice_vsi *vsi;
	int err;

	vsi = pf->fdir.fdir_vsi;
	if (!vsi)
		return;

	ice_vsi_disable_queues_intr(vsi);

	err = ice_fdir_tx_queue_stop(eth_dev, pf->fdir.txq->queue_id);
	if (err)
		PMD_DRV_LOG(ERR, "Failed to stop TX queue.");

	err = ice_fdir_rx_queue_stop(eth_dev, pf->fdir.rxq->queue_id);
	if (err)
		PMD_DRV_LOG(ERR, "Failed to stop RX queue.");

	err = ice_fdir_counter_release(pf);
	if (err)
		PMD_DRV_LOG(ERR, "Failed to release FDIR counter resource.");

	ice_fdir_release_filter_list(pf);

	ice_tx_queue_release(pf->fdir.txq);
	pf->fdir.txq = NULL;
	ice_rx_queue_release(pf->fdir.rxq);
	pf->fdir.rxq = NULL;
	ice_fdir_prof_rm_all(pf);
	ice_fdir_prof_free(hw);
	ice_release_vsi(vsi);
	pf->fdir.fdir_vsi = NULL;

	if (pf->fdir.mz) {
		err = rte_memzone_free(pf->fdir.mz);
		pf->fdir.mz = NULL;
		if (err)
			PMD_DRV_LOG(ERR, "Failed to free FDIR memezone.");
	}
}
/*
 * ice_fdir_teardown - release the Flow Director resources
 * @pf: board private structure
 */
release the Flow Director resources
@pf: board private structure
release the Flow Director resources @pf : board private structure
static void
ice_fdir_teardown(struct ice_pf *pf)
{
	struct rte_eth_dev *eth_dev = pf->adapter->eth_dev;
	struct ice_hw *hw = ICE_PF_TO_HW(pf);
	struct ice_vsi *vsi;
	int err;
	vsi = pf->fdir.fdir_vsi;
	if (!vsi)
		return;
	ice_vsi_disable_queues_intr(vsi);
	err = ice_fdir_tx_queue_stop(eth_dev, pf->fdir.txq->queue_id);
	if (err)
		PMD_DRV_LOG(ERR, "Failed to stop TX queue.");
	err = ice_fdir_rx_queue_stop(eth_dev, pf->fdir.rxq->queue_id);
	if (err)
		PMD_DRV_LOG(ERR, "Failed to stop RX queue.");
	err = ice_fdir_counter_release(pf);
	if (err)
		PMD_DRV_LOG(ERR, "Failed to release FDIR counter resource.");
	ice_fdir_release_filter_list(pf);
	ice_tx_queue_release(pf->fdir.txq);
	pf->fdir.txq = NULL;
	ice_rx_queue_release(pf->fdir.rxq);
	pf->fdir.rxq = NULL;
	ice_fdir_prof_rm_all(pf);
	ice_fdir_prof_free(hw);
	ice_release_vsi(vsi);
	pf->fdir.fdir_vsi = NULL;
	if (pf->fdir.mz) {
		err = rte_memzone_free(pf->fdir.mz);
		pf->fdir.mz = NULL;
		if (err)
			PMD_DRV_LOG(ERR, "Failed to free FDIR memezone.");
	}
}
static void ice_fdir_teardown ( struct ice_pf * pf ) { struct rte_eth_dev * eth_dev = pf -> adapter -> eth_dev ; struct ice_hw * hw = ICE_PF_TO_HW ( pf ) ; struct ice_vsi * vsi ; int err ; vsi = pf -> fdir . fdir_vsi ; if ( ! vsi ) return ; ice_vsi_disable_queues_intr ( vsi ) ; err = ice_fdir_tx_queue_stop ( eth_dev , pf -> fdir . txq -> queue_id ) ; if ( err ) PMD_DRV_LOG ( ERR , " " ) ; err = ice_fdir_rx_queue_stop ( eth_dev , pf -> fdir . rxq -> queue_id ) ; if ( err ) PMD_DRV_LOG ( ERR , " " ) ; err = ice_fdir_counter_release ( pf ) ; if ( err ) PMD_DRV_LOG ( ERR , " " ) ; ice_fdir_release_filter_list ( pf ) ; ice_tx_queue_release ( pf -> fdir . txq ) ; pf -> fdir . txq = NULL ; ice_rx_queue_release ( pf -> fdir . rxq ) ; pf -> fdir . rxq = NULL ; ice_fdir_prof_rm_all ( pf ) ; ice_fdir_prof_free ( hw ) ; ice_release_vsi ( vsi ) ; pf -> fdir . fdir_vsi = NULL ; if ( pf -> fdir . mz ) { err = rte_memzone_free ( pf -> fdir . mz ) ; pf -> fdir . mz = NULL ; if ( err ) PMD_DRV_LOG ( ERR , " " ) ; } }
ice_fdir_teardown - release the Flow Director resources
 @pf: board private structure
ice_fdir_teardown - release the Flow Director resources @pf : board private structure