aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2015-10-22 09:34:38 -0400
committerDavid S. Miller <davem@davemloft.net>2015-10-22 07:38:35 -0700
commitea70ba980666cffacb57d90d867b2c7952d90700 (patch)
tree0d830a198b504eb3e23a02d0d6da78a415da930e /include/net/dsa.h
parentMerge tag 'mac80211-next-for-davem-2015-10-21' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next (diff)
downloadlinux-dev-ea70ba980666cffacb57d90d867b2c7952d90700.tar.xz
linux-dev-ea70ba980666cffacb57d90d867b2c7952d90700.zip
net: dsa: add port_fdb_dump function
Not all switch chips support a Get Next operation to iterate on its FDB. So add a more simple port_fdb_dump function for them. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index e00588625bc2..0cfa44af8fd2 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -198,6 +198,7 @@ static inline u8 dsa_upstream_port(struct dsa_switch *ds)
}
struct switchdev_trans;
+struct switchdev_obj;
struct switchdev_obj_port_fdb;
struct dsa_switch_driver {
@@ -330,6 +331,9 @@ struct dsa_switch_driver {
int (*port_fdb_getnext)(struct dsa_switch *ds, int port,
unsigned char *addr, u16 *vid,
bool *is_static);
+ int (*port_fdb_dump)(struct dsa_switch *ds, int port,
+ struct switchdev_obj_port_fdb *fdb,
+ int (*cb)(struct switchdev_obj *obj));
};
void register_switch_driver(struct dsa_switch_driver *type);