From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B338C4F8A8 for ; Thu, 7 Dec 2023 21:00:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QibC/3d0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB7ADC433C8; Thu, 7 Dec 2023 20:59:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701982802; bh=WngsTC3WrtSoVu+SNUKTyQTquv6b6nCOOxtyRjZcQUM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QibC/3d05hHmYkX1Jz7cRepb48hT+nxuEF8Tc6YNUvxJ84NrHVGRiCQeuBxxqZeVm SHeU9JCpRwyJ8h5pAwdr29OCfBxBbKVbKcM0nuAzoS4+GTkVTe7Pm+Wb6CeHNMMe4h 8UcKlwKdewK0LvFdKIewBBxjNQWOYm0r5YjTZDQtInBidqo9d4TJzTG2yRBVYECxtj y0Ib2P/vAGUHMtfhm5j55e8vBJc/QWBOsWVhTJWgJh4T6JOm5erdQPiepn6RK5FJQL Wwvq00KWbFuXqmj8HqwNn3wp1XnRZl8FAyjOpTtQz0KvXxVEB0xTkX0cEntp99Ne1K kcZX4K7d4+B2w== Date: Thu, 7 Dec 2023 20:59:56 +0000 From: Simon Horman To: Pedro Tammela Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us, marcelo.leitner@gmail.com, vladbu@nvidia.com, Jiri Pirko , Victor Nogueira Subject: Re: [PATCH net-next v3 1/5] rtnl: add helper to check if rtnl group has listeners Message-ID: <20231207205956.GJ50400@kernel.org> References: <20231206164416.543503-1-pctammela@mojatatu.com> <20231206164416.543503-2-pctammela@mojatatu.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231206164416.543503-2-pctammela@mojatatu.com> On Wed, Dec 06, 2023 at 01:44:12PM -0300, Pedro Tammela wrote: > From: Jamal Hadi Salim > > As of today, rtnl code creates a new skb and unconditionally fills and > broadcasts it to the relevant group. For most operations this is okay > and doesn't waste resources in general. > > When operations are done without the rtnl_lock, as in tc-flower, such > skb allocation, message fill and no-op broadcasting can happen in all > cores of the system, which contributes to system pressure and wastes > precious cpu cycles when no one will receive the built message. > > Introduce this helper so rtnetlink operations can simply check if someone > is listening and then proceed if necessary. > > Reviewed-by: Jiri Pirko > Signed-off-by: Jamal Hadi Salim > Signed-off-by: Victor Nogueira > Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman