diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2020-04-30 11:49:10 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-30 17:43:29 -0700 |
commit | cd169d799beeb738fa2d3e891960924cdcaf8414 (patch) | |
tree | 3a19a7137124e174efa96796a81c5e55d7335c59 /drivers/net/dsa/b53/b53_common.c | |
parent | e3da4038f4ca1094596a7604c6edac4a6a4f6ee9 (diff) | |
download | linux-cd169d799beeb738fa2d3e891960924cdcaf8414.tar.bz2 |
net: dsa: b53: Bound check ARL searches
ARL searches are done by reading two ARL entries at a time, do not cap
the search at 1024 which would only limit us to half of the possible ARL
capacity, but use b53_max_arl_entries() instead which does the right
multiplication between bins and indexes.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/b53/b53_common.c')
-rw-r--r-- | drivers/net/dsa/b53/b53_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index aa0836ac751c..9550d972f8c5 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1702,7 +1702,7 @@ int b53_fdb_dump(struct dsa_switch *ds, int port, break; } - } while (count++ < 1024); + } while (count++ < b53_max_arl_entries(priv) / 2); return 0; } |