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=-9.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C977AC4361A for ; Fri, 4 Dec 2020 17:36:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86B1222B43 for ; Fri, 4 Dec 2020 17:36:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731236AbgLDRfp (ORCPT ); Fri, 4 Dec 2020 12:35:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728495AbgLDRfo (ORCPT ); Fri, 4 Dec 2020 12:35:44 -0500 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BF19C061A53 for ; Fri, 4 Dec 2020 09:35:04 -0800 (PST) Received: by mail-pg1-x541.google.com with SMTP id g18so3945099pgk.1 for ; Fri, 04 Dec 2020 09:35:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mZnBi3hnF6ooLl87IFaFAweqdfFiQr8/x3VXkzRn/0c=; b=mMOi482uSb4JqOPWY0Z/tsuFan2Y8MAU25W21q4pxNJq0aNoWRUhgkn9+tUSgm+0v6 TngNZZwc4X+LyAcJWA3XxkYIcZud91RxIBodRUouBup4jBKy9EFJXOYtWj+v3SKl1Ui6 8MuNXu6yC58aNgjA92cMm0pdUrgNu01delpVvOOP0rjlPpYmOtXyjaoXqNEfTQWLpvYj tWZqX30R1Ikv7dn5k9dFHel1n+nQ4rZj7TeQpt/APRPrQ/qidWve8GhYfHv4y8xIkCjb SThvRfxTcwnbppR1WLRPLRXRHu+u9YvEap7T3iP12vaP34Grz+LIXQje4PxlRPSibiHs M0wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mZnBi3hnF6ooLl87IFaFAweqdfFiQr8/x3VXkzRn/0c=; b=kKbClPnPl/HYIx4it4ePnbQQoiQ1DMhjBD2yQA/1o1H+z9Byui8DSSoR/wOJ8xKGCs JlDvYiyePVnp0yLZw7ulV5GWQ5QkX+mj220A3LmTk1ViQJFVKYjBgXdJuSFzXCAzOZxM niFqWIEPkrOcPpXBTr02i/2gTz9dRhWvhs7IaWxHjxr+tDeyYTRpRvjZ3kiGbfx/ozcw uItGnBp4swb36Y7Ove0XniP0OnO0r9//t7IpHS9AUG+vDGfTewMaqJpvAABzZrNCzRP7 BeiygRhAD9N7N6CvmnyYbqlEWvjxphjdrnHz5CX86rzD8eSyEEveI90/+sNb4dGIyCkB ZMHg== X-Gm-Message-State: AOAM531Zt0Ta2OQO86Ofb33RO+BUZEfy24LCbyi3aZQXS7LCe8N3+W9y Z3DXd+C0nrEZOg1ayPnaFeA= X-Google-Smtp-Source: ABdhPJwzJlWTVc5dZzrnVOBVyZ++oId9SWQAdoyfs6WM0X0cl8Bjf+UCf8pthl7576khf75pbMIEpQ== X-Received: by 2002:a63:368e:: with SMTP id d136mr8323865pga.239.1607103303842; Fri, 04 Dec 2020 09:35:03 -0800 (PST) Received: from [10.230.29.29] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id c132sm2875966pfc.119.2020.12.04.09.34.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2020 09:35:03 -0800 (PST) Subject: Re: [PATCH net] net: mscc: ocelot: install MAC addresses in .ndo_set_rx_mode from process context To: Vladimir Oltean , "David S . Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, Alexandre Belloni , Andrew Lunn , Vivien Didelot , Horatiu Vultur , "Allan W . Nielsen" , Claudiu Manoil , Steen Hegelund References: <20201204170938.1415582-1-vladimir.oltean@nxp.com> From: Florian Fainelli Message-ID: Date: Fri, 4 Dec 2020 09:34:54 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20201204170938.1415582-1-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 12/4/2020 9:09 AM, Vladimir Oltean wrote: > Currently ocelot_set_rx_mode calls ocelot_mact_learn directly, which has > a very nice ocelot_mact_wait_for_completion at the end. Introduced in > commit 639c1b2625af ("net: mscc: ocelot: Register poll timeout should be > wall time not attempts"), this function uses readx_poll_timeout which > triggers a lot of lockdep warnings and is also dangerous to use from > atomic context, leading to lockups and panics. > > Steen Hegelund added a poll timeout of 100 ms for checking the MAC > table, a duration which is clearly absurd to poll in atomic context. > So we need to defer the MAC table access to process context, which we do > via a dynamically allocated workqueue which contains all there is to > know about the MAC table operation it has to do. > > Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Did you want to have a Fixes tag to help identify how far back this needs to be back ported? -- Florian