Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1654322pxp; Thu, 17 Mar 2022 13:42:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY8t8KV9znlkjxGZ/ldWGelCntpoD9CzjwgQuezKCtXNX9JSuWak1ScqGRXaj0Ej+sr9K3 X-Received: by 2002:a17:90b:3849:b0:1c6:9f29:c55e with SMTP id nl9-20020a17090b384900b001c69f29c55emr2665565pjb.36.1647549775921; Thu, 17 Mar 2022 13:42:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647549775; cv=none; d=google.com; s=arc-20160816; b=kPiAaMgGo7UWhOY88cu9MEm+d4e6Cv+XD8uEsTRNT6/3AOJoPenoEKgn5swKjZxeTe qI7sO/WJ/7BQr9DZD2AbW5ZEWKfP+SNfhGc56wYQC5wq+sMpiUaeq6Yt3L9P4mPZVBW1 jS4nh6RfQnDdtpBtDMQxKSgrmjPgEk+1yhw7AYUjcqnBYvIISjpfooVk6GjJ7Vj0P53s mVDjVdWNwPoqR5nQX2n8yBoHHP8X5Xz6z6IBEZT/r6yJmjMR/vdzNcuT8RJ2HmcOA7yF zn/6r4OLQxam77Q1HCKqBsYwBmA7OlsKcCXKuXCVb1Grm61+brn698ukseBIpfY506Kh JdaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=iWUQdGpS+d41b/eu1fx0+pdKy786Pq/8z9KFfkv0mks=; b=LP7ew9qnu7sDPK4Ddw0oRTzGfM77PsATZgQnneUDJSsTL7MienMVlTbRDPsvTMhGJG ahqOZ+l9iYtF0e6Vix+pv3KPZ6FhAeth7NucXfXyATr7wUVhTh8ILzTXA/L1oLy4+EFs kU+sgqefPGMg2QHZYO1XzfkhS8fNaMk949AwgBMC6rPqOiJrPSSaHmEVNbFCsZSKjEAs CkRGqHF1Nk5nCyvihHIF3SuPRLQAx2JGTkwlXUFrmxwgO8G9kna6zY67o15+51Zh7cPN +BDvYJYSDgAphkW99RXgkM5h/0s8BvCAQV7M18lbUZxWHOPjsT9ZD+EOsmGMHyXKJPBU Ok2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EXCr8puB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id e27-20020a63501b000000b003816043eff5si2843265pgb.490.2022.03.17.13.42.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:42:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EXCr8puB; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EE8E81A48A1; Thu, 17 Mar 2022 13:11:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236356AbiCQQMZ (ORCPT + 99 others); Thu, 17 Mar 2022 12:12:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236354AbiCQQMY (ORCPT ); Thu, 17 Mar 2022 12:12:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B480F214F85; Thu, 17 Mar 2022 09:11:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5146660F77; Thu, 17 Mar 2022 16:11:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AF3FC340E9; Thu, 17 Mar 2022 16:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647533466; bh=DipHHogWaewP/FbS/bJMU0tYn92ipv83Ht+R98R5vt4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EXCr8puBCcTF1evc3yydkeMu6vvvojbBLLTdSyKk40ZNklT859Qnq6nnvbc0wipId +KnFe28cqBEFqFA+aYb3hLYP6OD7Qqi+LfklWIxbSDNtPgq/hqcWcS5PAPGGLhwF45 LzHaJutqvOuTh/STuaLX7U8JMymrRm+vaGgfYjLbZkAMcVoCIw51hYF9k+JDxReoZH sICvY13gwyuTYYJDutbphlu3+pZuiwu6RP5ChyWquRbez1nTxcsTqLsfh71vT9Lp4r H8vUOkC2iXo/IeKX6k7TkaBwb255O/bJwyCw73oyaQOL8r+/KyfIP0ONefwhAg1GZb enxP06EGUVvKg== Date: Thu, 17 Mar 2022 09:11:04 -0700 From: Jakub Kicinski To: Jesse Brandeburg , Tony Nguyen Cc: Ivan Vecera , netdev@vger.kernel.org, poros@redhat.com, "David S. Miller" , Paolo Abeni , Slawomir Laba , Mateusz Palczewski , Jacob Keller , Phani Burra , intel-wired-lan@lists.osuosl.org (moderated list:INTEL ETHERNET DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH] iavf: Fix hang during reboot/shutdown Message-ID: <20220317091104.1d911864@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20220317104524.2802848-1-ivecera@redhat.com> References: <20220317104524.2802848-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Mar 2022 11:45:24 +0100 Ivan Vecera wrote: > Recent commit 974578017fc1 ("iavf: Add waiting so the port is > initialized in remove") adds a wait-loop at the beginning of > iavf_remove() to ensure that port initialization is finished > prior unregistering net device. This causes a regression > in reboot/shutdown scenario because in this case callback > iavf_shutdown() is called and this callback detaches the device, > makes it down if it is running and sets its state to __IAVF_REMOVE. > Later shutdown callback of associated PF driver (e.g. ice_shutdown) > is called. That callback calls among other things sriov_disable() > that calls indirectly iavf_remove() (see stack trace below). > As the adapter state is already __IAVF_REMOVE then the mentioned > loop is end-less and shutdown process hangs. Tony, Jesse, looks like the regression is from 5.17-rc6, should I take this directly so it makes 5.17 final?