From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 318E62C71 for ; Fri, 30 Dec 2016 08:58:00 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 29 Dec 2016 23:57:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,428,1477983600"; d="scan'208";a="803524489" Received: from dpdk1.bj.intel.com ([172.16.182.84]) by FMSMGA003.fm.intel.com with ESMTP; 29 Dec 2016 23:57:58 -0800 From: Wei Zhao To: dev@dpdk.org Cc: Wenzhuo Lu , Wei Zhao Date: Fri, 30 Dec 2016 15:52:58 +0800 Message-Id: <1483084390-53159-7-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1483084390-53159-1-git-send-email-wei.zhao1@intel.com> References: <1483084390-53159-1-git-send-email-wei.zhao1@intel.com> Subject: [dpdk-dev] [PATCH v2 06/18] net/ixgbe: restore TCP SYN filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2016 07:58:00 -0000 Add support for restoring TCP SYN filter in SW. Signed-off-by: Wenzhuo Lu Signed-off-by: Wei Zhao --- v2: --change git log expression --- 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 e6e5f72..7281ba5 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -7899,11 +7899,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