Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp172265imm; Tue, 22 May 2018 16:19:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZorNWek7U1DAzZM+BGWenZ+qbFvBT2bc8m8sICY8L2+A8MwHhPKIRBMfXMOwKBeEcbdSCin X-Received: by 2002:a63:7f5c:: with SMTP id p28-v6mr376131pgn.64.1527031193806; Tue, 22 May 2018 16:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527031193; cv=none; d=google.com; s=arc-20160816; b=OX8txn43rQTPwSS7V5Rkazn6Pzz0rt61SRz/EC40j5uhNjN3yFa06NX9ecMMUz2C/4 VcZqah9XAY1wbftCkp7NTPJKeLGM47coriMfFF0GdZzHaLbxWiOaVlXvruW1KBOT0Zmj H2CV7R7ncgR/UDfsl+zkurIRp4eRYg6fDdS6TU75gwGH4ibhgD+kEdpzqnsLDbE8AJF4 lUuE+bs3DbJXJL1H82rojrNrfglKM5oJ+0BpyPy9jaSFqVAKBeg9f9vXfTqB50SZIOvS lLjbGNoBExTKNiCS47oxedUSzr6UE80zjQ9D/NHPE64VvbTUh7kzDoGwWPTcAwQA/pt6 y1zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=PSL3G1GIN3sf1jsXntaCTC2OY0wSHqzkBqBed/etgqE=; b=Gm/y8eSjfv2RUq0QgnGMffe8aZu0Ca8GebWRQIcON15PkuKjwG6vSON4n+OhLqpGD0 CZ2U4uyJCqdtwvAnQ9W6lnnTNpSden1cGCKp7g6se2OlkEdfEAZ1nie/InPWlRrpNF83 k+Xrw9cyGnwk994WZjoSjR96ynzgmR88EW9nY4M+8IVsEJCzHt5B0w7R8Ih7XhGzMZa7 32p2m5hD7z38EKGOzVdk7bglA8R7xFL8S1rcuKQz55STMj+y+vQTimiBAoq5fSeuuWWJ Awxrm90xTWalalDzlLmt6yC1/tX870N72AmYJZIhb2H1LTS0d9rq0gziEKs7DvM/RdJ0 jr6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=dQLLiSoK; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si13045912pge.105.2018.05.22.16.19.36; Tue, 22 May 2018 16:19:53 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=dQLLiSoK; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753014AbeEVXT2 (ORCPT + 99 others); Tue, 22 May 2018 19:19:28 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:41991 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753008AbeEVXT0 (ORCPT ); Tue, 22 May 2018 19:19:26 -0400 Received: by mail-oi0-f65.google.com with SMTP id t27-v6so17811366oij.9 for ; Tue, 22 May 2018 16:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=PSL3G1GIN3sf1jsXntaCTC2OY0wSHqzkBqBed/etgqE=; b=dQLLiSoKgtedJEmTxLdY1YkneuOpDvqq15JdCrrh2qeTrAFzUfn15q8qOU9+06L+OF 54kMZ2X8t5zyKVCEg0luBY5L6Qelf2iQmuA0LEyYurDFDRrGS/R4kV0D75jZvAAv0al/ oQrUTgq2p5nTd685gwvCt1XOqKyh+FF0qF06H8IVkMOZJhutbxkm0iMYEudIV9IowqzJ XrdQRlDHct8yoCB8U3tZOeppoJtoHhbzgdZAMmoCXLrO9FvvcYxAU2IqG6+UQAIfNBfW ddDRQSUk3qkax56i1Vlod01UQR/SpJkvjofvTs91rZ6UWurtdXq7xqA99Ij3jsj5WM6T Ojlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=PSL3G1GIN3sf1jsXntaCTC2OY0wSHqzkBqBed/etgqE=; b=RumxevQvDCIivEiO8FL3ktNhtCKoc0xcFdWauOPHcsTEdYze1jjL3zdqctVIVKukXT mM9InjXsOyWuQo/ypppcVXlHNxisXzQu7XJtz+ElxfQvjLM+t9ezThn1d2FrHSgEmLmJ j7sS8gWef71sGGI+iNBk8XJB5ePm7hNdE13HDchVt0WaEOKs2Qx256e1dfjU0vnuYPFH ied2nvKn75ZvVZQ3m31gbUFa/wNHLbAwSjFcVet+eGubMbSvO7us6XOFMbQTVFv1T72x KGPYWr4fQFJD0yZGSx3Ieod3wor1zovT5yYfEPULRuL84R/6J/r6UFHBM9dPwTZ5YJwv a0PQ== X-Gm-Message-State: ALKqPwf28qqnbiu2MMJghoBC0SBByGo+p60SgEJq7mMUXMOkHvTiP+6c N1m/iVC6hDbLdtxFjO6locduBizrE0wvsrtXy3gHxA== X-Received: by 2002:aca:4f57:: with SMTP id d84-v6mr254115oib.138.1527031165480; Tue, 22 May 2018 16:19:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:b57:0:0:0:0:0 with HTTP; Tue, 22 May 2018 16:18:45 -0700 (PDT) In-Reply-To: References: <20180522222805.80314-1-rajatja@google.com> <20180522222805.80314-6-rajatja@google.com> From: Rajat Jain Date: Tue, 22 May 2018 16:18:45 -0700 Message-ID: Subject: Re: [PATCH 5/5] Documentation/PCI: Add details of PCI AER statistics To: "Alex G." Cc: Bjorn Helgaas , Jonathan Corbet , Philippe Ombredanne , Kate Stewart , Thomas Gleixner , Greg Kroah-Hartman , Frederick Lawler , Oza Pawandeep , Keith Busch , Gabriele Paoloni , Thomas Tai , "Steven Rostedt (VMware)" , linux-pci , linux-doc@vger.kernel.org, Linux Kernel Mailing List , Jes Sorensen , Kyle McMartin , Rajat Jain Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, May 22, 2018 at 3:52 PM, Alex G. wrote: > On 05/22/2018 05:28 PM, Rajat Jain wrote: >> Add the PCI AER statistics details to >> Documentation/PCI/pcieaer-howto.txt >> >> Signed-off-by: Rajat Jain >> --- >> Documentation/PCI/pcieaer-howto.txt | 35 +++++++++++++++++++++++++++++ >> 1 file changed, 35 insertions(+) >> >> diff --git a/Documentation/PCI/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt >> index acd0dddd6bb8..86ee9f9ff5e1 100644 >> --- a/Documentation/PCI/pcieaer-howto.txt >> +++ b/Documentation/PCI/pcieaer-howto.txt >> @@ -73,6 +73,41 @@ In the example, 'Requester ID' means the ID of the device who sends >> the error message to root port. Pls. refer to pci express specs for >> other fields. >> >> +2.4 AER statistics >> + >> +When AER messages are captured, the statistics are exposed via the following >> +sysfs attributes under the "aer_stats" folder for the device: >> + >> +2.4.1 Device sysfs Attributes >> + >> +These attributes show up under all the devices that are AER capable. These >> +indicate the errors "as seen by the device". Note that this may mean that if >> +an end point is causing problems, the AER counters may increment at its link >> +partner (e.g. root port) because the errors will be "seen" by the link partner >> +and not the the problematic end point itself (which may report all counters >> +as 0 as it never saw any problems). > > I was afraid of that. Is there a way to look at the requester ID to log > AER errors to the correct device? I do not think it is possible to pin point the source of the problem. Errors may be caused due to sub optimal link tuning, or signal integrity, or either of the link partners. Both the link partners will detect and report the errors that they "see". The bits and errors defined by the PCIe spec, follow the same semantics i.e. => the spec defines the different error conditions "as seen/encountered by the device", => Thus the device reports those errors to the root port => which is what we are counting and reporting here. IMHO, any interpretation / analysis of this error data / counters should be left to the user so that he can look at different devices and the errors they see, and then conclude on what might be the problem. Thanks, Rajat > > Alex