Skip to content

net: bridge: convert multicast to generic rhashtable

Nikolay Aleksandrov bridge netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyIn review
  2. v23 patches 3 repliesSuperseded
  3. v13 patches 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: bridge: convert multicast to generic rhashtablenet/bridge/br_device.c net/bridge/br_mdb.c net/bridge/br_multicast.c +3 more+163 -4360 replies
2/4net: bridge: multicast: use non-bh rcu flavornet/bridge/br_mdb.c net/bridge/br_multicast.c net/bridge/br_private.h+6 -230 replies
3/4net: bridge: mark hash_elasticity as obsoletenet/bridge/br_multicast.c net/bridge/br_netlink.c net/bridge/br_private.h +1 more+7 -120 replies
4/4net: bridge: increase multicast's default maximum number of entriesnet/bridge/br_multicast.c net/bridge/br_private.h+3 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net-next v3 0/4] net: bridge: convert multicast to generic rhashtable

Hi,
The current bridge multicast code uses a custom rhashtable implementation which predates the generic rhashtable API. Patch 01 converts it to use the generic kernel rhashtable which simplifies the code a lot and removes duplicated functionality. The convert also makes hash_elasticity obsolete as the generic rhashtable already has such checks and has a fixed elasticity of RHT_ELASTICITY (16 currently) so we emit a warning whenever elasticity is set and return RHT_ELASTICITY when read (patch 03). Patch 02 converts the multicast code to use non-bh RCU flavor as it was mixing bh and non-bh. Since now we have the generic rhashtable which autoshrinks we can be more liberal with the default hash maximum so patch 04 increases it to 4096 and moves it to a define in br_private.h.

v3: add non-rcu br_mdb_get variant and use it where we have
multicast_lock, drop special hash_max handling and just set it where needed and use non-bh RCU consistently (patch 02, new)
v2: send the latest version of the set which handles when IGMP snooping
is not defined, changes are in patch 01

Thanks,
Nik

Nikolay Aleksandrov (4):
net: bridge: convert multicast to generic rhashtable
net: bridge: multicast: use non-bh rcu flavor
net: bridge: mark hash_elasticity as obsolete
net: bridge: increase multicast's default maximum number of entries

 net/bridge/br_device.c    |  10 +
 net/bridge/br_mdb.c       | 122 +++++------
 net/bridge/br_multicast.c | 439 +++++++-------------------------------
 net/bridge/br_netlink.c   |  20 +-
 net/bridge/br_private.h   |  42 ++--
 net/bridge/br_sysfs_br.c  |  14 +-
 6 files changed, 177 insertions(+), 470 deletions(-)
Signature · 1 line
2.17.2