From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Zhao Subject: [PATCH 06/18] net/ixgbe: restore SYN filter Date: Fri, 2 Dec 2016 18:43:02 +0800 Message-ID: <1480675394-59179-7-git-send-email-wei.zhao1@intel.com> References: <1480675394-59179-1-git-send-email-wei.zhao1@intel.com> Cc: wenzhuo.lu@intel.com, wei zhao1 To: dev@dpdk.org Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AFF0658C8 for ; Fri, 2 Dec 2016 11:46:53 +0100 (CET) In-Reply-To: <1480675394-59179-1-git-send-email-wei.zhao1@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: wei zhao1 Add support for restoring SYN filter in SW. Signed-off-by: Wenzhuo Lu Signed-off-by: wei zhao1 --- drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index f1dee4d..efbaa62 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -7815,11 +7815,29 @@ ixgbe_ethertype_filter_restore(struct rte_eth_dev *dev) } } +/* restore SYN filter */ +static inline void +ixgbe_syn_filter_restore(struct rte_eth_dev *dev) +{ + struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); + struct ixgbe_filter_info *filter_info = + IXGBE_DEV_PRIVATE_TO_FILTER_INFO(dev->data->dev_private); + uint32_t synqf; + + synqf = filter_info->syn_info; + + if (synqf & IXGBE_SYN_FILTER_ENABLE) { + IXGBE_WRITE_REG(hw, IXGBE_SYNQF, synqf); + IXGBE_WRITE_FLUSH(hw); + } +} + static int ixgbe_filter_restore(struct rte_eth_dev *dev) { ixgbe_ntuple_filter_restore(dev); ixgbe_ethertype_filter_restore(dev); + ixgbe_syn_filter_restore(dev); return 0; } -- 2.5.5