From: Jingjing Wu Date: Fri, 21 Nov 2014 00:46:46 +0000 (+0800) Subject: i40e: flush flow director table X-Git-Tag: spdx-start~10105 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8ae001ba176e3a35e823a3d62da4ae70bd853427;p=dpdk.git i40e: flush flow director table implement operation to flush flow director table Signed-off-by: Jingjing Wu Acked-by: Konstantin Ananyev --- diff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_fdir.c index 2cfbc75fb5..143754a454 100644 --- a/lib/librte_pmd_i40e/i40e_fdir.c +++ b/lib/librte_pmd_i40e/i40e_fdir.c @@ -832,7 +832,7 @@ i40e_fdir_flush(struct rte_eth_dev *dev) struct i40e_hw *hw = I40E_PF_TO_HW(pf); uint32_t reg; uint16_t guarant_cnt, best_cnt; - int i; + uint16_t i; I40E_WRITE_REG(hw, I40E_PFQF_CTL_1, I40E_PFQF_CTL_1_CLEARFDTABLE_MASK); I40E_WRITE_FLUSH(hw); @@ -881,7 +881,7 @@ i40e_fdir_ctrl_func(struct rte_eth_dev *dev, return ret; } - if (arg == NULL) + if (arg == NULL && filter_op != RTE_ETH_FILTER_FLUSH) return -EINVAL; switch (filter_op) { @@ -895,6 +895,9 @@ i40e_fdir_ctrl_func(struct rte_eth_dev *dev, (struct rte_eth_fdir_filter *)arg, FALSE); break; + case RTE_ETH_FILTER_FLUSH: + ret = i40e_fdir_flush(dev); + break; default: PMD_DRV_LOG(ERR, "unknown operation %u.", filter_op); ret = -EINVAL;