From: Nikolay Aleksandrov Subject: Re: [PATCH net-next v2 0/3] net: bridge: convert multicast to generic rhashtable Date: Wed, 5 Dec 2018 01:45:16 +0200 Message-ID: <1235eb6f-2048-3fb5-b235-7af5b28bcd2b@cumulusnetworks.com> References: <20181204150119.26395-1-nikolay@cumulusnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: roopa@cumulusnetworks.com, davem@davemloft.net To: netdev@vger.kernel.org Return-path: Received: from mail-wr1-f68.google.com ([209.85.221.68]:44014 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbeLDXpU (ORCPT ); Tue, 4 Dec 2018 18:45:20 -0500 Received: by mail-wr1-f68.google.com with SMTP id r10so17741332wrs.10 for ; Tue, 04 Dec 2018 15:45:19 -0800 (PST) In-Reply-To: <20181204150119.26395-1-nikolay@cumulusnetworks.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 12/4/18 5:01 PM, Nikolay Aleksandrov wrote: > 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 02). Since now we have the generic rhashtable which > autoshrinks we can be more liberal with the default hash maximum so patch > 03 increases it to 4096 and moves it to a define in br_private.h. > > v2: send the latest version of the set which handles when IGMP snooping > is not defined, changes are in patch 01 > > Thanks, > Nik Unfortunately I'll have to send a v3, I missed the fact that rhashtable_lookup requires RCU to be always held and even though br_mdb_ip_get() does the lookups under multicast_lock, we can still trigger suspicious RCU usage because RCU is not held in those protected places. Need to add a non-rcu mdb lookup variant. On a related note I saw Paul's call_rcu patches hit, so I'll wait for those to go in and will rebase on top of them before sending the v3 as the bridge change will have a conflict with this set. Thanks, Nik