From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68D6BC4361A for ; Fri, 4 Dec 2020 18:16:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 228DD22C9F for ; Fri, 4 Dec 2020 18:16:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728523AbgLDSPq (ORCPT ); Fri, 4 Dec 2020 13:15:46 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:50783 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727729AbgLDSPp (ORCPT ); Fri, 4 Dec 2020 13:15:45 -0500 X-Greylist: delayed 37108 seconds by postgrey-1.27 at vger.kernel.org; Fri, 04 Dec 2020 13:15:45 EST X-Originating-IP: 86.194.74.19 Received: from localhost (lfbn-lyo-1-997-19.w86-194.abo.wanadoo.fr [86.194.74.19]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id D82C71BF20E; Fri, 4 Dec 2020 18:15:02 +0000 (UTC) Date: Fri, 4 Dec 2020 19:15:02 +0100 From: Alexandre Belloni To: Vladimir Oltean Cc: Jakub Kicinski , "David S . Miller" , "netdev@vger.kernel.org" , "UNGLinuxDriver@microchip.com" , Andrew Lunn , Florian Fainelli , Vivien Didelot , Horatiu Vultur , "Allan W . Nielsen" , Claudiu Manoil , Steen Hegelund Subject: Re: [PATCH v2 net] net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context Message-ID: <20201204181502.GN74177@piout.net> References: <20201204175125.1444314-1-vladimir.oltean@nxp.com> <20201204100021.0b026725@kicinski-fedora-pc1c0hjn.DHCP.thefacebook.com> <20201204181250.t5d4hc7wis7pzqa2@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201204181250.t5d4hc7wis7pzqa2@skbuf> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 04/12/2020 18:12:51+0000, Vladimir Oltean wrote: > Yeah, well I more or less deliberately lose track of the workqueue as > soon as ocelot_enqueue_mact_action is over, and that is by design. There > is potentially more than one address to offload to the hardware in progress > at the same time, and any sort of serialization in .ndo_set_rx_mode (so > I could add the workqueue to a list of items to cancel on unbind) > would mean > (a) more complicated code > (b) more busy waiting > > > > drivers/net/ethernet/mscc/ocelot_net.c | 83 +++++++++++++++++++++++++- > > > 1 file changed, 80 insertions(+), 3 deletions(-) > > > > This is a little large for a rc7 fix :S > > Fine, net-next it is then. > > > What's the expected poll time? maybe it's not that bad to busy wait? > > Clearly nobody noticed the issue in 2 years (you mention lockdep so > > not a "real" deadlock) which makes me think the wait can't be that long? > > Not too much, but the sleep is there. > Also, all 3 of ocelot/felix/seville are memory-mapped devices. But I > heard from Alex a while ago that he intends to add support for a switch > managed over a slow bus like SPI, and to use the same regmap infrastructure. > That would mean that this problem would need to be resolved anyway. > This is still on the way but it will not happen this year unfortunately. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com