summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-01-29 03:00:01 +0200
committerJakub Kicinski <kuba@kernel.org>2021-01-29 21:24:30 -0800
commit50c6cc5b9283efdbf72162dee467bd68c7167807 (patch)
tree6adccf47480132dab0030afb54b4b8d3a1f9cf9c /include
parent0e9bb4e9d93f2711897b8e2a613899f7b8a15a3b (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/soc/mscc/ocelot_vcap.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/soc/mscc/ocelot_vcap.h b/include/soc/mscc/ocelot_vcap.h
index 7f1b82fba63c..76e01c927e17 100644
--- a/include/soc/mscc/ocelot_vcap.h
+++ b/include/soc/mscc/ocelot_vcap.h
@@ -648,6 +648,11 @@ enum ocelot_vcap_filter_type {
OCELOT_VCAP_FILTER_OFFLOAD,
};
+struct ocelot_vcap_id {
+ unsigned long cookie;
+ bool tc_offload;
+};
+
struct ocelot_vcap_filter {
struct list_head list;
@@ -657,7 +662,7 @@ struct ocelot_vcap_filter {
int lookup;
u8 pag;
u16 prio;
- u32 id;
+ struct ocelot_vcap_id id;
struct ocelot_vcap_action action;
struct ocelot_vcap_stats stats;