]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: store a namespaced VCAP filter ID
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 29 Jan 2021 01:00:01 +0000 (03:00 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 30 Jan 2021 05:24:30 +0000 (21:24 -0800)
commit98853f8b64ea10a0b4581c3dedc82d902fe0a7d4
tree6adccf47480132dab0030afb54b4b8d3a1f9cf9c
parentfb42d7cded100a00baa0cbe778e6228600453eac
net: mscc: ocelot: store a namespaced VCAP filter ID

We will be adding some private VCAP filters that should not interfere in
any way with the filters added using tc-flower. So we need to allocate
some IDs which will not be used by tc.

Currently ocelot uses an u32 id derived from the flow cookie, which in
itself is an unsigned long. This is a problem in itself, since on 64 bit
systems, sizeof(unsigned long)=8, so the driver is already truncating
these.

Create a struct ocelot_vcap_id which contains the full unsigned long
cookie from tc, as well as a boolean that is supposed to namespace the
filters added by tc with the ones that aren't.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mscc/ocelot_flower.c
drivers/net/ethernet/mscc/ocelot_vcap.c
drivers/net/ethernet/mscc/ocelot_vcap.h
include/soc/mscc/ocelot_vcap.h