Skip to content

Commit d08c6bc

Browse files
Nikolay Aleksandrovdavem330
authored andcommitted
net: bridge: increase multicast's default maximum number of entries
bridge's default hash_max was 512 which is rather conservative, now that we're using the generic rhashtable API which autoshrinks let's increase it to 4096 and move it to a define in br_private.h. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cf332bc commit d08c6bc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

net/bridge/br_multicast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1741,7 +1741,7 @@ static void br_ip6_multicast_query_expired(struct timer_list *t)
17411741

17421742
void br_multicast_init(struct net_bridge *br)
17431743
{
1744-
br->hash_max = 512;
1744+
br->hash_max = BR_MULTICAST_DEFAULT_HASH_MAX;
17451745

17461746
br->multicast_router = MDB_RTR_TYPE_TEMP_QUERY;
17471747
br->multicast_last_member_count = 2;

net/bridge/br_private.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#define BR_PORT_BITS 10
3232
#define BR_MAX_PORTS (1<<BR_PORT_BITS)
3333

34+
#define BR_MULTICAST_DEFAULT_HASH_MAX 4096
35+
3436
#define BR_VERSION "2.3"
3537

3638
/* Control of forwarding link local multicast */

0 commit comments

Comments
 (0)