Message ID | 20231110081209.189481-1-ivecera@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1303605vqs; Fri, 10 Nov 2023 10:29:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuu4yNX1wYo/YSsz2Wv0BKakazy3icn+Nv0lnSxe57nDk5k3OEIXoHsdqec0Q2nA7f5VkA X-Received: by 2002:a17:902:e892:b0:1cc:7d96:3fba with SMTP id w18-20020a170902e89200b001cc7d963fbamr115607plg.17.1699640947826; Fri, 10 Nov 2023 10:29:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699640947; cv=none; d=google.com; s=arc-20160816; b=F9cH+bweG8PLTEjxourh6+4cERVuIrH+sJfYT43zcLU0EseOpzxfSlBN0UzaSS7qR3 /zbfk4Ag+fBryqz3xm3Hljiok4wU8FFoI3fpNAnhsqmCKdan8rinohiF7uFsjwnzQdE6 P/5pl3OHSxpleuvJ4if5M0Vf7O9FnRrW/aHpcdzjNgRTijtB8lx21sOnCgexR3bxGJ0a gtIE+r50S3+IhpQrYi0KHOApjfN1FMPoeeL1WXJfiaL1elWCfN2MeIqCunUS3tHZMHox aLbzl3JsGbGMiISDwsLi8ClkU7c/TG3Sb4EHect510sMGWY098SDDRVeWSkJ2ZOlgkWl F2Vg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=3nK/HAcjQd19QuF6/CNQqVs85Tk5g0Fx2VwPP5v9z+I=; fh=2OV0/gw8x61BW8gWnKD+mDrUpZ1xUSVZVQKAmn9IqFU=; b=u9Ayz0Glaj84UvlyZv2Azm19tU4HdoJKqicc7h33O4z4GPpnD0DRqiuFOEtKgp7Y0H 9c/JAiMlaN5YeF5TMWfvTfYix0oBo784fS8slPsCjrfqrJX3dw8OuUrDI9RR6QBBX3Rp U78rCqwnJktZI2MTlesiN9MrI1S3WhBKLJkqMrXRQKbCBQashc2DutXjU647Qz+tDnpy z69qj8h76ZHZ07A1WOeQkTYnW3cEoIiRM7Q37ndidgVc+6+2L5K8thUF1MZSTMxz/ryO 3AFRDoSty4OMWj6ZKl7fwgJ0Opx7+0guNLmroJRcjjNxZrLc4izekxbbPth41gDFgAIz +Iuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ona3d9yf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id j7-20020a170902da8700b001ca89920d2fsi8780550plx.588.2023.11.10.10.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 10:29:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ona3d9yf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 4D6588385EDE; Fri, 10 Nov 2023 10:28:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345518AbjKJSXh (ORCPT <rfc822;lhua1029@gmail.com> + 30 others); Fri, 10 Nov 2023 13:23:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235341AbjKJSWR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Nov 2023 13:22:17 -0500 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 BC2D08A77 for <linux-kernel@vger.kernel.org>; Fri, 10 Nov 2023 00:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699603937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3nK/HAcjQd19QuF6/CNQqVs85Tk5g0Fx2VwPP5v9z+I=; b=Ona3d9yfOnQF58kARJC90URoJZp5ThVWg9h9cLjnToDGYLIloAvjFAR3AeJcMvz1TTyzdA zJCD+38EjjnDNJClYbmULeIyZt6VAkHsx7wvw7IIm+KGx9XJxVzCd9s8mb00MLgXc6BurI j/A+Y/gbI1Opo3P+lK7xSBrbicIgjEg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-107-HYGfeWpsPHG_pxfz21skTg-1; Fri, 10 Nov 2023 03:12:12 -0500 X-MC-Unique: HYGfeWpsPHG_pxfz21skTg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D28111C06500; Fri, 10 Nov 2023 08:12:11 +0000 (UTC) Received: from p1.luc.cera.cz (unknown [10.45.225.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0596F40C6EB9; Fri, 10 Nov 2023 08:12:09 +0000 (UTC) From: Ivan Vecera <ivecera@redhat.com> To: intel-wired-lan@lists.osuosl.org Cc: Jacob Keller <jacob.e.keller@intel.com>, Wojciech Drewek <wojciech.drewek@intel.com>, Jesse Brandeburg <jesse.brandeburg@intel.com>, Tony Nguyen <anthony.l.nguyen@intel.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Todd Fujinaka <todd.fujinaka@intel.com>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH iwl-net] i40e: Fix unexpected MFS warning message Date: Fri, 10 Nov 2023 09:12:09 +0100 Message-ID: <20231110081209.189481-1-ivecera@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 10 Nov 2023 10:28:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782202706887037250 X-GMAIL-MSGID: 1782202706887037250 |
Series |
[iwl-net] i40e: Fix unexpected MFS warning message
|
|
Commit Message
Ivan Vecera
Nov. 10, 2023, 8:12 a.m. UTC
Commit 3a2c6ced90e1 ("i40e: Add a check to see if MFS is set") added
a warning message that reports unexpected size of port's MFS (max
frame size) value. This message use for the port number local
variable 'i' that is wrong.
In i40e_probe() this 'i' variable is used only to iterate VSIs
to find FDIR VSI:
<code>
...
/* if FDIR VSI was set up, start it now */
for (i = 0; i < pf->num_alloc_vsi; i++) {
if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR) {
i40e_vsi_open(pf->vsi[i]);
break;
}
}
...
</code>
So the warning message use for the port number indext of FDIR VSI
if this exists or pf->num_alloc_vsi if not.
Fix the message by using 'pf->hw.port' for the port number.
Fixes: 3a2c6ced90e1 ("i40e: Add a check to see if MFS is set")
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, Nov 10, 2023 at 09:12:09AM +0100, Ivan Vecera wrote: > Commit 3a2c6ced90e1 ("i40e: Add a check to see if MFS is set") added > a warning message that reports unexpected size of port's MFS (max > frame size) value. This message use for the port number local > variable 'i' that is wrong. > In i40e_probe() this 'i' variable is used only to iterate VSIs > to find FDIR VSI: > > <code> > ... > /* if FDIR VSI was set up, start it now */ > for (i = 0; i < pf->num_alloc_vsi; i++) { > if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR) { > i40e_vsi_open(pf->vsi[i]); > break; > } > } > ... > </code> > > So the warning message use for the port number indext of FDIR VSI > if this exists or pf->num_alloc_vsi if not. > > Fix the message by using 'pf->hw.port' for the port number. > > Fixes: 3a2c6ced90e1 ("i40e: Add a check to see if MFS is set") > Signed-off-by: Ivan Vecera <ivecera@redhat.com> Thanks Ivan, I agree with your analysis that this change corrects the port number printed. And that the problem is introduced in the cited commit. Reviewed-by: Simon Horman <horms@kernel.org>
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index e870afa0e401..c36535145a41 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -16225,7 +16225,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) I40E_PRTGL_SAH_MFS_MASK) >> I40E_PRTGL_SAH_MFS_SHIFT; if (val < MAX_FRAME_SIZE_DEFAULT) dev_warn(&pdev->dev, "MFS for port %x has been set below the default: %x\n", - i, val); + pf->hw.port, val); /* Add a filter to drop all Flow control frames from any VSI from being * transmitted. By doing so we stop a malicious VF from sending out