summaryrefslogtreecommitdiffstats
path: root/include/soc/mscc/ocelot_vcap.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-02-16 15:30:07 +0100
committerDavid S. Miller <davem@davemloft.net>2022-02-17 15:06:51 +0100
commitb9bace6e534d431871a9d69cbd06d3a798f5086d (patch)
tree94df8138e35c5a6ce44081c5aa5912993cdba3cf /include/soc/mscc/ocelot_vcap.h
parentnet: mscc: ocelot: delete OCELOT_MRP_CPUQ (diff)
downloadlinux-b9bace6e534d431871a9d69cbd06d3a798f5086d.tar.xz
linux-b9bace6e534d431871a9d69cbd06d3a798f5086d.zip
net: mscc: ocelot: use a single VCAP filter for all MRP traps
The MRP assist code installs a VCAP IS2 trapping rule for each port, but since the key and the action is the same, just the ingress port mask differs, there isn't any need to do this. We can save some space in the TCAM by using a single filter and adjusting the ingress port mask. Reuse the ocelot_trap_add() and ocelot_trap_del() functions for this purpose. Now that the cookies are no longer per port, we need to change the allocation scheme such that MRP traps use a fixed number. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc/mscc/ocelot_vcap.h')
-rw-r--r--include/soc/mscc/ocelot_vcap.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/soc/mscc/ocelot_vcap.h b/include/soc/mscc/ocelot_vcap.h
index 562bcd972132..14ada097db0b 100644
--- a/include/soc/mscc/ocelot_vcap.h
+++ b/include/soc/mscc/ocelot_vcap.h
@@ -21,8 +21,8 @@
#define OCELOT_VCAP_IS2_IPV4_EV_PTP_TRAP(ocelot) ((ocelot)->num_phys_ports + 3)
#define OCELOT_VCAP_IS2_IPV6_GEN_PTP_TRAP(ocelot) ((ocelot)->num_phys_ports + 4)
#define OCELOT_VCAP_IS2_IPV6_EV_PTP_TRAP(ocelot) ((ocelot)->num_phys_ports + 5)
+#define OCELOT_VCAP_IS2_MRP_TRAP(ocelot) ((ocelot)->num_phys_ports + 6)
#define OCELOT_VCAP_IS2_MRP_REDIRECT(ocelot, port) (port)
-#define OCELOT_VCAP_IS2_MRP_TRAP(ocelot, port) ((ocelot)->num_phys_ports + (port))
/* =================================================================
* VCAP Common