diff options
| author | David S. Miller <davem@davemloft.net> | 2015-10-11 15:28:57 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-10-11 15:28:57 +0300 |
| commit | 5010ea59e1b986d89023c0552fa38e32b519a617 (patch) | |
| tree | 079695ca71bcde8fcb2b7ce89beec414d64082ce /include | |
| parent | 6e86ac120e144154d345ebb5839d50b6f713149b (diff) | |
| parent | 8057b3e7a1cfb4da61717ba609e1ea642bb82f9b (diff) | |
| download | linux-5010ea59e1b986d89023c0552fa38e32b519a617.tar.xz | |
Merge branch 'dsa-next'
Vivien Didelot says:
====================
net: dsa: push switchdev prepare phase in FDB ops
This patchset pushes the switchdev prepare phase for the FDB add and del
operations down to the DSA drivers. Currently only mv88e6xxx is affected.
Since the dump requires a bit of refactoring in the driver, it'll come in a
future patchset.
Changes in v2:
* forward declare switchdev structs instead of fixing the dsa.h include.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/dsa.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index b34d812bc5d0..e00588625bc2 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -197,6 +197,9 @@ static inline u8 dsa_upstream_port(struct dsa_switch *ds) return ds->pd->rtable[dst->cpu_switch]; } +struct switchdev_trans; +struct switchdev_obj_port_fdb; + struct dsa_switch_driver { struct list_head list; @@ -316,10 +319,14 @@ struct dsa_switch_driver { /* * Forwarding database */ + int (*port_fdb_prepare)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_fdb *fdb, + struct switchdev_trans *trans); int (*port_fdb_add)(struct dsa_switch *ds, int port, - const unsigned char *addr, u16 vid); + const struct switchdev_obj_port_fdb *fdb, + struct switchdev_trans *trans); int (*port_fdb_del)(struct dsa_switch *ds, int port, - const unsigned char *addr, u16 vid); + const struct switchdev_obj_port_fdb *fdb); int (*port_fdb_getnext)(struct dsa_switch *ds, int port, unsigned char *addr, u16 *vid, bool *is_static); |
