From 817c579c2560075c86ce2e113ff8466d9fe2f240 Mon Sep 17 00:00:00 2001 From: Jingjing Wu Date: Wed, 25 Mar 2015 12:47:13 +0800 Subject: [PATCH] ixgbe: fix 5tuple filter overwrite This patch corrects the index to fix the issue that is second 5tuple filter overwrites the first one. Fixes: 4c54a7e7bd42 ("ixgbe: migrate ntuple filter to new API") Signed-off-by: Jingjing Wu Acked-by: Marvin Liu --- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index 92d75dbe65..5caee225ad 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -3882,10 +3882,10 @@ ixgbe_add_5tuple_filter(struct rte_eth_dev *dev, ftqf |= IXGBE_FTQF_POOL_MASK_EN; ftqf |= IXGBE_FTQF_QUEUE_ENABLE; - IXGBE_WRITE_REG(hw, IXGBE_DAQF(idx), filter->filter_info.dst_ip); - IXGBE_WRITE_REG(hw, IXGBE_SAQF(idx), filter->filter_info.src_ip); - IXGBE_WRITE_REG(hw, IXGBE_SDPQF(idx), sdpqf); - IXGBE_WRITE_REG(hw, IXGBE_FTQF(idx), ftqf); + IXGBE_WRITE_REG(hw, IXGBE_DAQF(i), filter->filter_info.dst_ip); + IXGBE_WRITE_REG(hw, IXGBE_SAQF(i), filter->filter_info.src_ip); + IXGBE_WRITE_REG(hw, IXGBE_SDPQF(i), sdpqf); + IXGBE_WRITE_REG(hw, IXGBE_FTQF(i), ftqf); l34timir |= IXGBE_L34T_IMIR_RESERVE; l34timir |= (uint32_t)(filter->queue << -- 2.20.1