Received: by 10.192.165.148 with SMTP id m20csp1614180imm; Thu, 10 May 2018 13:36:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrFxOefJGv9PqZ8RXMrwQArnAvyufGd3IeGXtv9NQiY/i5ZgHf4TBpEzMB4A5ELc1YakJa7 X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr2782833pld.268.1525984588968; Thu, 10 May 2018 13:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525984588; cv=none; d=google.com; s=arc-20160816; b=kvJtyTx/5bh314WQUZUx1O1YcSiLJ+OJo6wHVbdCRld9DJAh4y907iTLOz/20GvXIL cXtvkzQhJN8m2O8ZFcpAMhYPqnh045c1/g2o4gBYFsW6T1gT6j6rcIgTcTPFLR6dQvVB jnOBH6/ESrpNJR/zIfgz5veIEbVe2Jxqc6gSGD9yXY9wyIFPrTi8yYIXVmZt5k3XaRQA NQUUbU9bBYYtA39ePIVSm9tCaNxVU7aLcEalXm7ZSnpuMxeQ5E3WH5FN7aJp434gD+m7 f4iGrrQCTmLl6dKAipagLeedQq3hxSRRHChlk2ApF5l/yQT/brWAZ33e5e7QUjqbJdnV przA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:references :in-reply-to:date:cc:to:reply-to:from:subject:message-id :arc-authentication-results; bh=BexUcBwnv57g3dFExuyOuqz0LWPcG1PNfSAfmiYrTdg=; b=0/YljXnvbt/UOPzkJuBI0l7KL3rk+PccE7Ue2yMj+U+oG2gYIxIPJhJOfNx2PiosAU qxV4vvMeLHDbiMXBJlBkQrbc4I5q0cY1xVMtTO0NHX9NSKvP8pvqjmFRQbnjPQ0DyaZq TsAiqbpmVANim05EVXA2Jfks7EM5bdpluaxeIcfnvDQm/eeXRrPQehlFq+A/r3lw6jN/ qRz/Pxzhh9b1DwRoZKfO+H6bEsd2w+Q/utQY9llMU6bB6kgaVZtBio8xkaGIfuPAv/PS KYkhs0W3dwqznQpdQgC9ldJLv5Lqi4UUhTlTls+txU8mTICAPP7XVr+QFcH2Q/ccQTom tiuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2-v6si1290063pgp.298.2018.05.10.13.36.13; Thu, 10 May 2018 13:36:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752237AbeEJUgC (ORCPT + 99 others); Thu, 10 May 2018 16:36:02 -0400 Received: from mga18.intel.com ([134.134.136.126]:39400 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752054AbeEJUgA (ORCPT ); Thu, 10 May 2018 16:36:00 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 May 2018 13:35:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,386,1520924400"; d="asc'?scan'208";a="38377717" Received: from jtkirshe-nuc.jf.intel.com ([134.134.177.59]) by fmsmga007.fm.intel.com with ESMTP; 10 May 2018 13:35:59 -0700 Message-ID: <182a863cd7502dd9d872beb5265487a4ce39453d.camel@intel.com> Subject: Re: [PATCH v6 4/5] ixgbe: Report PCIe link properties with pcie_print_link_status() From: Jeff Kirsher Reply-To: jeffrey.t.kirsher@intel.com To: Bjorn Helgaas , Ganesh Goudar , Michael Chan , Ariel Elior Cc: linux-pci@vger.kernel.org, everest-linux-l2@cavium.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tal Gilboa , Tariq Toukan , Jacob Keller , Jakub Kicinski Date: Thu, 10 May 2018 13:37:17 -0700 In-Reply-To: <152537763602.62474.15659483976051204438.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152537719056.62474.2571390812509425478.stgit@bhelgaas-glaptop.roam.corp.google.com> <152537763602.62474.15659483976051204438.stgit@bhelgaas-glaptop.roam.corp.google.com> Organization: Intel Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-pn319CNs1sSWaLiR7sVo" X-Mailer: Evolution 3.28.1 (3.28.1-2.fc28) Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-pn319CNs1sSWaLiR7sVo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2018-05-03 at 15:00 -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas >=20 > Previously the driver used pcie_get_minimum_link() to warn when the > NIC > is in a slot that can't supply as much bandwidth as the NIC could > use. >=20 > pcie_get_minimum_link() can be misleading because it finds the > slowest link > and the narrowest link (which may be different links) without > considering > the total bandwidth of each link. For a path with a 16 GT/s x1 link > and a > 2.5 GT/s x16 link, it returns 2.5 GT/s x1, which corresponds to 250 > MB/s of > bandwidth, not the true available bandwidth of about 1969 MB/s for a > 16 GT/s x1 link. >=20 > Use pcie_print_link_status() to report PCIe link speed and possible > limitations instead of implementing this in the driver itself. This > finds > the slowest link in the path to the device by computing the total > bandwidth > of each link and compares that with the capabilities of the device. >=20 > The dmesg change is: >=20 > - PCI Express bandwidth of %dGT/s available > - (Speed:%s, Width: x%d, Encoding Loss:%s) > + %u.%03u Gb/s available PCIe bandwidth (%s x%d link) >=20 > or, if the device is capable of better performance than is available > in the > current slot: >=20 > - This is not sufficient for optimal performance of this card. > - For optimal performance, at least %dGT/s of bandwidth is > required. > - A slot with more lanes and/or higher speed is suggested. > + %u.%03u Gb/s available PCIe bandwidth, limited by %s x%d link at > %s (capable of %u.%03u Gb/s with %s x%d link) >=20 > Note that the driver previously used dev_warn() to suggest using a > different slot, but pcie_print_link_status() uses dev_info() because > if the > platform has no faster slot available, the user can't do anything > about the > warning and may not want to be bothered with it. >=20 > Signed-off-by: Bjorn Helgaas Acked-by: Jeff Kirsher Since this is apart of a series, I am not planning to pick this up and push to David Miller in my ixgbe updates. This should remain in the series so David can pick up the entire series at once. > --- > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 47 +------------ > ------------ > 1 file changed, 1 insertion(+), 46 deletions(-) --=-pn319CNs1sSWaLiR7sVo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiTyZWz+nnTrOJ1LZ5W/vlVpL7c4FAlr0rX0ACgkQ5W/vlVpL 7c4B1g/9GFdyqM9Jr9tJUa4p9tx12FENwn4QFgkxMsgrgVxSMajW6xErR7SeNDB9 wjYkJa8buc6P2LQSk9Ix8xfI2ZJKU2yyrr3TqEjq0klrU80kWBhht2iwvWd/4Kvw pcWUA4T2v2e5GpiH0SxBZMrrqHFZxt5RCc3Z/N5VViD/IvsYUcEoibA+pvdAe8QB TTAKjA83oDUrpPuir9aPgHHoLc80taD2bIrD37yjtS9he5C4KZ/Pt7zIpHiRWbLO HnPaiYG/TPYoOB1Zmr0EWvte0SMEzYYmTefmv/3snYEztN4ZQcxcOxH9iHsfQ6Be EDkk2mwbNfZE/COuHAFIXF/TXi0zSsQ4O5D5Xyjh0zsimTs9n773gVHoZNaRwi71 Ev/5lY0vEQ3Z0opqE5ODpcOscDK/+AxnKVnUtwNN+WF7TYz6GG6T82xH6+KaZN8T 1cXpNbIi0gtuh/Ub6UQtSFArgvxc5TrNjpcYLhlUmogz/m0QOXy+WL+Xbz+XhWxd fcQs+aonGvYjt7HhU4vwgZWMFkE7l1VcTUWEo4YcFY+1bv6s1DDoBLGEm5IUd4Pi To2kYpILUoPBMsWS2z4GjjPmsuB18PH4g+i68DM7+3/koIwGss4OgO5D7uTaq59M v8Uq2PTUobhnxQcecUjaUaTgpqKvNBfOmaITdWoHU54wJTMfRU0= =Z8SL -----END PGP SIGNATURE----- --=-pn319CNs1sSWaLiR7sVo--