Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp175526rwe; Wed, 31 Aug 2022 00:13:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR67RMctvdUfrRTuOd5u5FwBtvBPyrirQAA4+GWe0nW5GzC89wci97C/gf2bNyWjrQB0uI2N X-Received: by 2002:a05:6402:1514:b0:448:312:368 with SMTP id f20-20020a056402151400b0044803120368mr18560279edw.263.1661929990002; Wed, 31 Aug 2022 00:13:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661929989; cv=none; d=google.com; s=arc-20160816; b=NiNHsE3ubaAy4l5nzTT3+2ZYmPP41T1fyF2bmB6zMTm4XcGI3f5rpxbKsEpa/GgEvz nZ0wKcKj0IaQxhw+6WvjbHTy3T1j9zPgOZcRNRJKhTqwsSZmAL7ATpclxDERZZIstJwn qkZbF5zdoJjWRkCzlL0NOlXpPNSyLvLO34Bf0sgDLQa/cBHv/0ULl+7OumGykjyX3HH8 wdoklda3wwe849DNmQzSW/Bccu90CACeGLtQQ6GHub0tTdKahiG5dHS30jw3ZLeZd9bq 2FP89xWaDI7ueR4YQmSWw3AkMa69ZiiOFZ9Am0yQ2wb2F6axohmuJApL459gG8Rtuhkl A44g== 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=mg8FDivTjK0Fno47rCTZSDZ/G71sgK45gh5D1Ko2fqs=; b=bGth87W+F7MnrsKf312wHiWER+Fn7szmqxKp605Y+zsm4z8YbqaqZVeFiD+WxGe4JC kBtcmX4cwABuHLe6+sK4BSAespDJKBHbM5zd8X3FTDOX9DV5uDzNiU2f79OG2jxV3xTS ia1aHNxe5Oxgefqo/DW7/tka+KTK6NTfo72RaeaXdboOeU/ADTZQbxozkMjOQPv1dS2n /A4xV2LlHa+l4V40YmJQBoAiyCcYiejCX+IUfHf7pjvWI/6Nyh1/YXJHCdTSFn7+blxe dyrVYIhr2V51VXDWsCKeYSkQ77/vvniMImd3gwUeVlIB27yq78qQj8Ak+U8Jd1cTetWT 2HIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A+ukfoAf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w19-20020a056402269300b00448da245f3bsi3204735edd.6.2022.08.31.00.12.45; Wed, 31 Aug 2022 00:13:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=A+ukfoAf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229630AbiHaHFz (ORCPT + 99 others); Wed, 31 Aug 2022 03:05:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbiHaHFv (ORCPT ); Wed, 31 Aug 2022 03:05:51 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2AE75AA1C for ; Wed, 31 Aug 2022 00:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661929549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mg8FDivTjK0Fno47rCTZSDZ/G71sgK45gh5D1Ko2fqs=; b=A+ukfoAf+0xKVelM1nOZ81FQaOW4bfdudAzE6j3jpK6gdxEQH3kFBn34KayU6+XSMuA/bL lYgjhUANw4EgI4ho4IJvtttSFLmTsvKxadBFwUIO2ZDC1OEuEUyUelRBeaFEal90kDsTme m9LLEaurH4iQ9c8D16qu7kWUZgCItdk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-201-dFBVqmFwO4yY4rhIp3n_XA-1; Wed, 31 Aug 2022 03:05:45 -0400 X-MC-Unique: dFBVqmFwO4yY4rhIp3n_XA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D6063800C30; Wed, 31 Aug 2022 07:05:45 +0000 (UTC) Received: from p1.luc.cera.cz (unknown [10.40.195.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5091C15BB3; Wed, 31 Aug 2022 07:05:41 +0000 (UTC) Date: Wed, 31 Aug 2022 09:05:40 +0200 From: Ivan Vecera To: "Laba, SlawomirX" Cc: "netdev@vger.kernel.org" , "Keller, Jacob E" , "Piotrowski, Patryk" , Vitaly Grinberg , "Brandeburg, Jesse" , "Nguyen, Anthony L" , "David S. Miller" , "Eric Dumazet" , Jakub Kicinski , Paolo Abeni , Jeff Kirsher , "moderated list:INTEL ETHERNET DRIVERS" , open list Subject: Re: [PATCH net v2] iavf: Detach device during reset task Message-ID: <20220831090540.53e324af@p1.luc.cera.cz> In-Reply-To: References: <20220830081627.1205872-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_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 Tue, 30 Aug 2022 20:49:54 +0000 "Laba, SlawomirX" wrote: > Ivan, what do you think about this flow [1]? Shouldn't it also goto reset_finish label? > > if (i == IAVF_RESET_WAIT_COMPLETE_COUNT) { > dev_err(&adapter->pdev->dev, "Reset never finished (%x)\n", > reg_val); > iavf_disable_vf(adapter); > mutex_unlock(&adapter->client_lock); > mutex_unlock(&adapter->crit_lock); > return; /* Do not attempt to reinit. It's dead, Jim. */ > } > > I am concerned that if the reset never finishes and iavf goes into disabled state, and then for example if driver reload operation is performed, bad things can happen. I think we should not re-attach device back as the VF is disabled. Detached device causes that userspace (user) won't be able to configure associated interface that is correct. Driver reload won't cause anything special in this situation because during module removal the interface is unregistered. Thanks, Ivan