net/sfc/base: fix manual filter delete in EF10

Message ID 1589983192-9909-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/sfc/base: fix manual filter delete in EF10 |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/travis-robot success Travis build: passed
ci/Intel-compilation fail Compilation issues
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing fail Testing issues

Commit Message

Andrew Rybchenko May 20, 2020, 1:59 p.m. UTC
  From: Igor Romanov <igor.romanov@oktetlabs.ru>

When user requests a filter deletion only filter with
manual priority must be deleted. When an automatic filter has
the same specification, it must be skipped.

Fixes: 585c22edb29c ("net/sfc/base: handle manual and auto filter clashes in EF10")
Cc: stable@dpdk.org

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit May 21, 2020, 3:48 p.m. UTC | #1
On 5/20/2020 2:59 PM, Andrew Rybchenko wrote:
> From: Igor Romanov <igor.romanov@oktetlabs.ru>
> 
> When user requests a filter deletion only filter with
> manual priority must be deleted. When an automatic filter has
> the same specification, it must be skipped.
> 
> Fixes: 585c22edb29c ("net/sfc/base: handle manual and auto filter clashes in EF10")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/sfc/base/ef10_filter.c b/drivers/net/sfc/base/ef10_filter.c
index 7a726ef977..12c84a5640 100644
--- a/drivers/net/sfc/base/ef10_filter.c
+++ b/drivers/net/sfc/base/ef10_filter.c
@@ -1161,7 +1161,8 @@  ef10_filter_delete(
 		i = (hash + depth) & (EFX_EF10_FILTER_TBL_ROWS - 1);
 		saved_spec = ef10_filter_entry_spec(table, i);
 		if (saved_spec && ef10_filter_equal(spec, saved_spec) &&
-		    ef10_filter_same_dest(spec, saved_spec)) {
+		    ef10_filter_same_dest(spec, saved_spec) &&
+		    saved_spec->efs_priority == EFX_FILTER_PRI_MANUAL) {
 			break;
 		}
 		if (depth == EF10_FILTER_SEARCH_LIMIT) {