From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 22C7D7F9D for ; Fri, 21 Nov 2014 01:37:01 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 20 Nov 2014 16:47:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,426,1413270000"; d="scan'208";a="625913876" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 20 Nov 2014 16:47:28 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id sAL0lQn7004176; Fri, 21 Nov 2014 08:47:26 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id sAL0lOMi002278; Fri, 21 Nov 2014 08:47:26 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sAL0lOiu002274; Fri, 21 Nov 2014 08:47:24 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Fri, 21 Nov 2014 08:46:46 +0800 Message-Id: <1416530816-2159-13-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1416530816-2159-1-git-send-email-jingjing.wu@intel.com> References: <1414654006-7472-1-git-send-email-jingjing.wu@intel.com> <1416530816-2159-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v6 12/22] i40e: implement operation to flush flow director table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2014 00:37:03 -0000 implement operation to flush flow director table Signed-off-by: jingjing.wu --- lib/librte_pmd_i40e/i40e_fdir.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_fdir.c index 5205530..93aa8a1 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; -- 1.8.1.4