aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/soc
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2022-02-16 16:30:10 +0200
committerDavid S. Miller <davem@davemloft.net>2022-02-17 14:06:51 +0000
commite42bd4ed09aaf57949f199ae02d20a7108ccf73b (patch)
treeb4ec4808d9c6d01c9f7314118988aa7aa294a4c3 /include/soc
parentnet: dsa: felix: use DSA port iteration helpers (diff)
downloadwireguard-linux-e42bd4ed09aaf57949f199ae02d20a7108ccf73b.tar.xz
wireguard-linux-e42bd4ed09aaf57949f199ae02d20a7108ccf73b.zip
net: mscc: ocelot: keep traps in a list
When using the ocelot-8021q tagging protocol, the CPU port isn't configured as an NPI port, but is a regular port. So a "trap to CPU" operation is actually a "redirect" operation. So DSA needs to set up the trapping action one way or another, depending on the tagging protocol in use. To ease DSA's work of modifying the action, keep all currently installed traps in a list, so that DSA can live-patch them when the tagging protocol changes. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/mscc/ocelot.h1
-rw-r--r--include/soc/mscc/ocelot_vcap.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 2d7456c0e77d..78f56502bc09 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -689,6 +689,7 @@ struct ocelot {
u8 base_mac[ETH_ALEN];
struct list_head vlans;
+ struct list_head traps;
/* Switches like VSC9959 have flooding per traffic class */
int num_flooding_pgids;
diff --git a/include/soc/mscc/ocelot_vcap.h b/include/soc/mscc/ocelot_vcap.h
index ae0eec7f5dd2..69b3d880302d 100644
--- a/include/soc/mscc/ocelot_vcap.h
+++ b/include/soc/mscc/ocelot_vcap.h
@@ -682,6 +682,7 @@ struct ocelot_vcap_id {
struct ocelot_vcap_filter {
struct list_head list;
+ struct list_head trap_list;
enum ocelot_vcap_filter_type type;
int block_id;