aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/sja1105/sja1105.h
diff options
context:
space:
mode:
authorVladimir Oltean <olteanv@gmail.com>2019-05-02 23:23:31 +0300
committerDavid S. Miller <davem@davemloft.net>2019-05-03 10:49:17 -0400
commit291d1e72b756424eac7b1ea2be326a59f004a580 (patch)
tree011166eea275692a9f8ee7e7cb45c38df7499668 /drivers/net/dsa/sja1105/sja1105.h
parentnet: dsa: Introduce driver for NXP SJA1105 5-port L2 switch (diff)
downloadlinux-dev-291d1e72b756424eac7b1ea2be326a59f004a580.tar.xz
linux-dev-291d1e72b756424eac7b1ea2be326a59f004a580.zip
net: dsa: sja1105: Add support for FDB and MDB management
Currently only the (more difficult) first generation E/T series is supported. Here the TCAM is only 4-way associative, and to know where the hardware will search for a FDB entry, we need to perform the same hash algorithm in order to install the entry in the correct bin. On P/Q/R/S, the TCAM should be fully associative. However the SPI command interface is different, and because I don't have access to a new-generation device at the moment, support for it is TODO. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105.h')
-rw-r--r--drivers/net/dsa/sja1105/sja1105.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105.h b/drivers/net/dsa/sja1105/sja1105.h
index e01cb854cbcd..50ab9282c4f1 100644
--- a/drivers/net/dsa/sja1105/sja1105.h
+++ b/drivers/net/dsa/sja1105/sja1105.h
@@ -123,6 +123,8 @@ int sja1105_dynamic_config_write(struct sja1105_private *priv,
enum sja1105_blk_idx blk_idx,
int index, void *entry, bool keep);
+u8 sja1105_fdb_hash(struct sja1105_private *priv, const u8 *addr, u16 vid);
+
/* Common implementations for the static and dynamic configs */
size_t sja1105_l2_forwarding_entry_packing(void *buf, void *entry_ptr,
enum packing_op op);