From: Wei Zhao Date: Fri, 13 Jan 2017 08:13:00 +0000 (+0800) Subject: net/ixgbe: restore TCP SYN filter X-Git-Tag: spdx-start~4817 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8b39890ab12c4df552ab8bb93098e86597ed198e;p=dpdk.git net/ixgbe: restore TCP SYN filter Add support for restoring TCP SYN filter in SW. Signed-off-by: Wenzhuo Lu Signed-off-by: Wei Zhao Acked-by: Beilei Xing Acked-by: Wei Dai --- diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 8f6f98b0b1..1cedec1a10 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -8483,11 +8483,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; }