Skip to content

Commit

Permalink
net: bridge: increase multicast's default maximum number of entries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nikolay Aleksandrov authored and David S. Miller committed Dec 6, 2018
1 parent cf332bc commit d08c6bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ static void br_ip6_multicast_query_expired(struct timer_list *t)

void br_multicast_init(struct net_bridge *br)
{
br->hash_max = 512;
br->hash_max = BR_MULTICAST_DEFAULT_HASH_MAX;

br->multicast_router = MDB_RTR_TYPE_TEMP_QUERY;
br->multicast_last_member_count = 2;
Expand Down
2 changes: 2 additions & 0 deletions net/bridge/br_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#define BR_PORT_BITS 10
#define BR_MAX_PORTS (1<<BR_PORT_BITS)

#define BR_MULTICAST_DEFAULT_HASH_MAX 4096

#define BR_VERSION "2.3"

/* Control of forwarding link local multicast */
Expand Down

0 comments on commit d08c6bc

Please sign in to comment.