Skip to content
Commit 3e1df191 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Xulin Sun
Browse files

net: mscc: ocelot: fix VCAP filters remaining active after being deleted



When ocelot_flower.c calls ocelot_vcap_filter_add(), the filter has a
given filter->id.cookie. This filter is added to the block->rules list.

However, when ocelot_flower.c calls ocelot_vcap_block_find_filter_by_id()
which passes the cookie as argument, the filter is never found by
filter->id.cookie when searching through the block->rules list.

This is unsurprising, since the filter->id.cookie is an unsigned long,
but the cookie argument provided to ocelot_vcap_block_find_filter_by_id()
is a signed int, and the comparison fails.

Fixes: 50c6cc5b ("net: mscc: ocelot: store a namespaced VCAP filter ID")
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20210930125330.2078625-1-vladimir.oltean@nxp.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
(cherry picked from commit 019d9329)
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
[Xulin: Original patch taken from
https://github.com/vladimiroltean/linux/commits/felix-dsa-tag-vlan-stable

]
Signed-off-by: default avatarXulin Sun <xulin.sun@windriver.com>
parent 8909c4ce
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment