diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-05-07 07:00:15 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-07 07:00:15 +0300 |
commit | 8fc0b6992a06998404321f26a57ea54522659b64 (patch) | |
tree | 64882d226006e96d1ac3c1fb6e53b34bf166cae7 /net/dsa/dsa.c | |
parent | 0a02e282bad4dad455553fc2b9268cf1d003f132 (diff) | |
parent | fe5233b0ba0d2216d549f93e4540542b99b97642 (diff) | |
download | linux-8fc0b6992a06998404321f26a57ea54522659b64.tar.xz |
Merge branch 'simplify-migration-of-host-filtered-addresses-in-felix-driver'
Vladimir Oltean says:
====================
Simplify migration of host filtered addresses in Felix driver
The purpose of this patch set is to remove the functions
dsa_port_walk_fdbs() and dsa_port_walk_mdbs() from the DSA core, which
were introduced when the Felix driver gained support for unicast
filtering on standalone ports. They get called when changing the tagging
protocol back and forth between "ocelot" and "ocelot-8021q".
I did not realize we could get away without having them.
The patch set was regression-tested using the local_termination.sh
selftest using both tagging protocols.
====================
Link: https://lore.kernel.org/r/20220505162213.307684-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 0c6ae32742ec..be7b320cda76 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -458,46 +458,6 @@ struct dsa_port *dsa_port_from_netdev(struct net_device *netdev) } EXPORT_SYMBOL_GPL(dsa_port_from_netdev); -int dsa_port_walk_fdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb) -{ - struct dsa_port *dp = dsa_to_port(ds, port); - struct dsa_mac_addr *a; - int err = 0; - - mutex_lock(&dp->addr_lists_lock); - - list_for_each_entry(a, &dp->fdbs, list) { - err = cb(ds, port, a->addr, a->vid, a->db); - if (err) - break; - } - - mutex_unlock(&dp->addr_lists_lock); - - return err; -} -EXPORT_SYMBOL_GPL(dsa_port_walk_fdbs); - -int dsa_port_walk_mdbs(struct dsa_switch *ds, int port, dsa_fdb_walk_cb_t cb) -{ - struct dsa_port *dp = dsa_to_port(ds, port); - struct dsa_mac_addr *a; - int err = 0; - - mutex_lock(&dp->addr_lists_lock); - - list_for_each_entry(a, &dp->mdbs, list) { - err = cb(ds, port, a->addr, a->vid, a->db); - if (err) - break; - } - - mutex_unlock(&dp->addr_lists_lock); - - return err; -} -EXPORT_SYMBOL_GPL(dsa_port_walk_mdbs); - bool dsa_db_equal(const struct dsa_db *a, const struct dsa_db *b) { if (a->type != b->type) |