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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 8CD5FC76186 for ; Wed, 17 Jul 2019 09:32:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 703012173E for ; Wed, 17 Jul 2019 09:32:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729703AbfGQJcR (ORCPT ); Wed, 17 Jul 2019 05:32:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:56182 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726180AbfGQJcQ (ORCPT ); Wed, 17 Jul 2019 05:32:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CB8BDAFBF; Wed, 17 Jul 2019 09:32:15 +0000 (UTC) Date: Wed, 17 Jul 2019 18:32:09 +0900 From: Benjamin Poirier To: Firo Yang Cc: Ajit Khaparde , Sathya Perla , Somnath Kotur , Sriharsha Basavapatna , David Miller , Saeed Mahameed , "netdev@vger.kernel.org" Subject: Re: [PATCH net] be2net: Signal that the device cannot transmit during reconfiguration Message-ID: <20190717093208.GA6511@f1> References: <20190716081655.7676-1-bpoirier@suse.com> <20190717082340.GA6015@f1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019/07/17 17:56, Firo Yang wrote: > I don't think this change could fix this problem because if SMP, dev_watchdog() could run on a different CPU. hmm, SMP is clearly part of the picture here. The change I proposed revolves around the synchronization offered by dev->tx_global_lock: we have \ dev_watchdog \ netif_tx_lock spin_lock(&dev->tx_global_lock); ... \ netif_tx_unlock and \ be_update_queues \ netif_tx_lock_bh \ netif_tx_lock spin_lock(&dev->tx_global_lock); Makes sense?