Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6676023rwb; Tue, 22 Nov 2022 17:22:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf4jRmaoQ0SnSZWRKIR6Al097oNMD4DUv1dXDNfejfL+iQ6tif1DJND1VenuCViCvqNJ89El X-Received: by 2002:a17:906:144c:b0:7ad:cda3:93c7 with SMTP id q12-20020a170906144c00b007adcda393c7mr22068585ejc.500.1669166550727; Tue, 22 Nov 2022 17:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669166550; cv=none; d=google.com; s=arc-20160816; b=0zxucshwFqcyotdAC0REaruP1LL9CffQHDwR6geB0idX7YLFuFN/UbVTOYOzA6uQWw g45nPL95FkbWXb9L3Hn4C4Ijf0uB4ZhzGU+KKtqUOggJd7Gn3XqA/t6czwelolJFs9cg uINbe8m0PS6LCjrCIsI42wFBmAdWpkRwDKsyADCsLSvEU1p97EhoGucMfev1v2yb9zGa UnSEFqoTki+kHLS5igtadGnFcdNVgYhXjrvn5/mOjTb4FWW6GXBI78QAuxf5c0LY2QUu IIHV0CBIW+aqpfIvWDaeS8OnvuzuGnNCwqPg1xnXiuQALnnRuddk79Wuq0SngSFptpxo 08Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ChWuCRj2lztiuijm5XOjLHSRF/5QHbLZueG3gnKY4L8=; b=d1sHFP4YqH0NbssqmNUYxLYwhwH5IYDhQ8TlDmJR6VbdC+b0g+vqFmYyU9acMeSr77 IvRyzQnMBOjWyLHqHr3YXDCsO3k3QlHWMkr35JgMnuKMMtTpLTiTL4G0iHuqkg9TgD5j xdk5WYkDWEs5DtSom97Sq4qppbEH99hj8YzoRYeuvlrn4Ckc8u1tLTqRM0ZJkdnrJzYP Jd0niC+L0rStwiVWGkbXHatgx4E8t23FcYuuiexJhSCQpudnVL78rpY47I++13iqbZze rKfJj5dtErw5VqmZ+mwGbpGX52jphEWz1L8GkViF12xp8mQRVszkHC5IIG39afjPkGU2 prvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b=YwVkPoat; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ey3-20020a0564022a0300b004617d769429si12352127edb.459.2022.11.22.17.22.08; Tue, 22 Nov 2022 17:22:30 -0800 (PST) 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=@daynix-com.20210112.gappssmtp.com header.s=20210112 header.b=YwVkPoat; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235397AbiKWBEa (ORCPT + 89 others); Tue, 22 Nov 2022 20:04:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234375AbiKWBE3 (ORCPT ); Tue, 22 Nov 2022 20:04:29 -0500 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC6E3DA4D1 for ; Tue, 22 Nov 2022 17:04:27 -0800 (PST) Received: by mail-pf1-x431.google.com with SMTP id 130so15933570pfu.8 for ; Tue, 22 Nov 2022 17:04:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ChWuCRj2lztiuijm5XOjLHSRF/5QHbLZueG3gnKY4L8=; b=YwVkPoatcqi4jXSpmqwULOaickgxdfWjzYRsRGsfVhr2gxfiYnamK0eNVwHMQ+R1gR +r74F/yWjXL9Dwrm5ZeY9fWRnuoK0fghHmEDfEcsSmSDGw7L8jOd7SWE1uge/vkGcr+2 hiCW2e96JXLas1N+CmvNFdVCsg/mBHpooxEpDAgG5QV0bqhRObQK7WmSF4VMlfPWAoip DyN3g1MpJGVdoiXz9hNv1bpm3MHQPqh7Wxb4PoyQm/DYbS/RJQAO+9vtfuRQBPJk2RJo AdGTeCW4/TKO/gL+9GJulh+3Ktb5JVA65swTrWQKzlUscwYRkPM8jSjjxS3FVCokQ9mW LqoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ChWuCRj2lztiuijm5XOjLHSRF/5QHbLZueG3gnKY4L8=; b=kC8zrE2jeYrVe4Tb+wHmb/32rh01jM4UDXC+nLsfYLzw3DhV9wh8KJ34g5A4PWSKfG Yx+z/k1U6uzst9+KSnehaOZVKaw/6/T2F9lCPRM5SW1xeI+gA6E8VwcHZgCwa9EldmSv J8mDze2c3IIXfqPoli5aK0gKvc94PuBjGZgdqW0lkril4t5Y65Rd8zWNNgAhL9XjfQP1 RDTQWryZNiWnnT8lTT1Imgqs7H1ZGT5TxUd3z0CrIIWcRa5ddBxPrdD3gVfiyfgVXmT0 OaNA4Zh87lWTOFhsHNh91ndjGgR8wwrD6uvc/KrIXvqYmvw+p0WmzC0v4nQGH9KYxrm1 +XMA== X-Gm-Message-State: ANoB5pmk+CDghXsHUgAP6Uq/Rjy8Z9l8q/To9A69fNBXgdidgpGFsmcf ib41WI2sI/vxpGtSkRwFk/zECg== X-Received: by 2002:aa7:854d:0:b0:56d:6e51:60ee with SMTP id y13-20020aa7854d000000b0056d6e5160eemr6422159pfn.25.1669165467251; Tue, 22 Nov 2022 17:04:27 -0800 (PST) Received: from ?IPV6:2400:4050:c360:8200:8ae8:3c4:c0da:7419? ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id s187-20020a625ec4000000b0056b8181861esm11673965pfb.19.2022.11.22.17.04.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 17:04:26 -0800 (PST) Message-ID: Date: Wed, 23 Nov 2022 10:04:22 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH v2] igbvf: Regard vf reset nack as success To: Maciej Fijalkowski Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Paul Menzel , Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yan Vugenfirer , Yuri Benditovich References: <20221122152630.76190-1-akihiko.odaki@daynix.com> Content-Language: en-US From: Akihiko Odaki In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Hi, On 2022/11/23 1:22, Maciej Fijalkowski wrote: > On Wed, Nov 23, 2022 at 12:26:30AM +0900, Akihiko Odaki wrote: >> vf reset nack actually represents the reset operation itself is >> performed but no address is assigned. Therefore, e1000_reset_hw_vf >> should fill the "perm_addr" with the zero address and return success on >> such an occasion. This prevents its callers in netdev.c from saying PF >> still resetting, and instead allows them to correctly report that no >> address is assigned. > > What's the v1->v2 diff? Sorry, I mistakenly added you to CC (and didn't tell you the context). The diff is only in the message. For details, please look at: https://patchew.org/linux/20221122092707.30981-1-akihiko.odaki@daynix.com/#647a4053-bae0-6c06-3049-274d389c2bdd@daynix.com > Probably route to net and add fixes tag? It is hard to determine the cause of the bug because it is about undocumented ABI. Linux introduced E1000_VF_RESET | E1000_VT_MSGTYPE_NACK response with commit 6ddbc4cf1f4d ("igb: Indicate failure on vf reset for empty mac address") so one can say it is the cause of the bug. However, the PF may be driven by someone else Linux (Windows in particular), and if such system have already had E1000_VF_RESET | E1000_VT_MSGTYPE_NACK response defined, it can be said the bug existed even before Linux changes how the PF responds to E1000_VF_RESET request. Regards, Akihiko Odaki > >> >> Signed-off-by: Akihiko Odaki >> --- >> drivers/net/ethernet/intel/igbvf/vf.c | 15 ++++++++++++--- >> 1 file changed, 12 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/net/ethernet/intel/igbvf/vf.c b/drivers/net/ethernet/intel/igbvf/vf.c >> index b8ba3f94c363..2691ae2a8002 100644 >> --- a/drivers/net/ethernet/intel/igbvf/vf.c >> +++ b/drivers/net/ethernet/intel/igbvf/vf.c >> @@ -1,6 +1,8 @@ >> // SPDX-License-Identifier: GPL-2.0 >> /* Copyright(c) 2009 - 2018 Intel Corporation. */ >> >> +#include >> + >> #include "vf.h" >> >> static s32 e1000_check_for_link_vf(struct e1000_hw *hw); >> @@ -131,11 +133,18 @@ static s32 e1000_reset_hw_vf(struct e1000_hw *hw) >> /* set our "perm_addr" based on info provided by PF */ >> ret_val = mbx->ops.read_posted(hw, msgbuf, 3); >> if (!ret_val) { >> - if (msgbuf[0] == (E1000_VF_RESET | >> - E1000_VT_MSGTYPE_ACK)) >> + switch (msgbuf[0]) { >> + case E1000_VF_RESET | E1000_VT_MSGTYPE_ACK: >> memcpy(hw->mac.perm_addr, addr, ETH_ALEN); >> - else >> + break; >> + >> + case E1000_VF_RESET | E1000_VT_MSGTYPE_NACK: >> + eth_zero_addr(hw->mac.perm_addr); >> + break; >> + >> + default: >> ret_val = -E1000_ERR_MAC_INIT; >> + } >> } >> } >> >> -- >> 2.38.1 >>