* [PATCH] bridge: Fix enforcement of multicast hash_max limit
@ 2012-07-11 8:29 Thomas Graf
2012-07-17 5:59 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Graf @ 2012-07-11 8:29 UTC (permalink / raw)
To: davem; +Cc: netdev
The hash size is doubled when it needs to grow and compared against
hash_max. The >= comparison will limit the hash table size to half
of what is expected i.e. the default 512 hash_max will not allow
the hash table to grow larger than 256.
Also print the hash table limit instead of the desirable size when
the limit is reached.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
---
net/bridge/br_multicast.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index b665812..8213618 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -540,10 +540,11 @@ static struct net_bridge_mdb_entry *br_multicast_get_group(
if (mdb->size >= max) {
max *= 2;
- if (unlikely(max >= br->hash_max)) {
- br_warn(br, "Multicast hash table maximum "
- "reached, disabling snooping: %s, %d\n",
- port ? port->dev->name : br->dev->name, max);
+ if (unlikely(max > br->hash_max)) {
+ br_warn(br, "Multicast hash table maximum of %d "
+ "reached, disabling snooping: %s\n",
+ br->hash_max,
+ port ? port->dev->name : br->dev->name);
err = -E2BIG;
disable:
br->multicast_disabled = 1;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bridge: Fix enforcement of multicast hash_max limit
2012-07-11 8:29 [PATCH] bridge: Fix enforcement of multicast hash_max limit Thomas Graf
@ 2012-07-17 5:59 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-17 5:59 UTC (permalink / raw)
To: tgraf; +Cc: netdev
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 11 Jul 2012 10:29:19 +0200
> The hash size is doubled when it needs to grow and compared against
> hash_max. The >= comparison will limit the hash table size to half
> of what is expected i.e. the default 512 hash_max will not allow
> the hash table to grow larger than 256.
>
> Also print the hash table limit instead of the desirable size when
> the limit is reached.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied to net-next, thanks Thomas.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-17 5:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-11 8:29 [PATCH] bridge: Fix enforcement of multicast hash_max limit Thomas Graf
2012-07-17 5:59 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.