Commit ebb1bb40 authored by Horatiu Vultur's avatar Horatiu Vultur Committed by David S. Miller

net: ocelot: Add PGID_BLACKHOLE

Add a new PGID that is used not to forward frames anywhere. It is used
by MRP to make sure that MRP Test frames will not reach CPU port.
Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d405970
...@@ -2051,6 +2051,9 @@ int ocelot_init(struct ocelot *ocelot) ...@@ -2051,6 +2051,9 @@ int ocelot_init(struct ocelot *ocelot)
ocelot_write_rix(ocelot, val, ANA_PGID_PGID, i); ocelot_write_rix(ocelot, val, ANA_PGID_PGID, i);
} }
ocelot_write_rix(ocelot, 0, ANA_PGID_PGID, PGID_BLACKHOLE);
/* Allow broadcast and unknown L2 multicast to the CPU. */ /* Allow broadcast and unknown L2 multicast to the CPU. */
ocelot_rmw_rix(ocelot, ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)), ocelot_rmw_rix(ocelot, ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)), ANA_PGID_PGID_PGID(BIT(ocelot->num_phys_ports)),
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
*/ */
/* Reserve some destination PGIDs at the end of the range: /* Reserve some destination PGIDs at the end of the range:
* PGID_BLACKHOLE: used for not forwarding the frames
* PGID_CPU: used for whitelisting certain MAC addresses, such as the addresses * PGID_CPU: used for whitelisting certain MAC addresses, such as the addresses
* of the switch port net devices, towards the CPU port module. * of the switch port net devices, towards the CPU port module.
* PGID_UC: the flooding destinations for unknown unicast traffic. * PGID_UC: the flooding destinations for unknown unicast traffic.
...@@ -59,6 +60,7 @@ ...@@ -59,6 +60,7 @@
* PGID_MCIPV6: the flooding destinations for IPv6 multicast traffic. * PGID_MCIPV6: the flooding destinations for IPv6 multicast traffic.
* PGID_BC: the flooding destinations for broadcast traffic. * PGID_BC: the flooding destinations for broadcast traffic.
*/ */
#define PGID_BLACKHOLE 57
#define PGID_CPU 58 #define PGID_CPU 58
#define PGID_UC 59 #define PGID_UC 59
#define PGID_MC 60 #define PGID_MC 60
...@@ -73,7 +75,7 @@ ...@@ -73,7 +75,7 @@
#define for_each_nonreserved_multicast_dest_pgid(ocelot, pgid) \ #define for_each_nonreserved_multicast_dest_pgid(ocelot, pgid) \
for ((pgid) = (ocelot)->num_phys_ports + 1; \ for ((pgid) = (ocelot)->num_phys_ports + 1; \
(pgid) < PGID_CPU; \ (pgid) < PGID_BLACKHOLE; \
(pgid)++) (pgid)++)
#define for_each_aggr_pgid(ocelot, pgid) \ #define for_each_aggr_pgid(ocelot, pgid) \
......
Markdown is supported
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